cknadler / vim-anywhere

Use Vim everywhere you've always wanted to
MIT License
3.67k stars 146 forks source link

feature proposition: Automatic pasting #101

Open TitouanT opened 5 years ago

TitouanT commented 5 years ago

I added this feature by appending this line to bin/run:

xdotool key ctrl+v

It does add a dependency but xdotool supports both linux and OSX.

OrionRandD commented 5 years ago

I do not have that line xdotool key ctrl+v in my bin/run even after updating vim-anywhere I have inserted that by hand and it does not work. So that I have to close gvim and issue Ctrl-v to paste the contents :(

TitouanT commented 5 years ago

@OrionRandD do you have xdotool installed ? If you use linux you can place it after this line: https://github.com/cknadler/vim-anywhere/blob/d3ea3c30e60f0216d7001b7e22487e6ca2f8ddc2/bin/run#L60

OrionRandD commented 5 years ago

@TitouanT Thx a lot. Worked beautifully But, I would like it to in the New versions of vim-anywhere So that, it would be not necessary to tweak by hand :)

TitouanT commented 5 years ago

I am glad it worked :)

As for adding it into the repo, I am not sure anymore. I don't use it anymore because Ctrl+v doesn't worked by default into terminals and I am often don't want to paste immediately after vim exits. At most, it could be an option.

You could do a fork with the change you made and use that fork on your machines, this way no need to tweak it each time you make a new install.

note: now I use two commands to do that stdvim | xclip -rmlastnl -selection clipboard (same as vim-anywhere) and xclip -o -selection primary | stdvim | xclip -rmlastnl -selection clipboard (which populate the file with the current selection) where stdvim is a script that I wrote to use vim in pipes.

OrionRandD commented 5 years ago

Thx for the reply and for the beautiful app. I also use ttys a lot I hadn't not thought about not pasting automatically. I will look into that.

On Thu, Aug 22, 2019 at 9:34 PM Titouan Teyssier notifications@github.com wrote:

I am glad it worked :)

As for adding it into the repo, I am not sure anymore. I don't use it anymore because ctrl+v doesn't worked by default into terminals and I am often don't want to paste immediately after quiting vim. At most, it could be an option.

You could do a fork with the change you made and use that fork on your machines, this way no need to tweak it each time you make a new install.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cknadler/vim-anywhere/issues/101?email_source=notifications&email_token=AKLPRKKWR6EC3A2NT4USCYDQF4WB5A5CNFSM4GHUUZTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD46Y7KA#issuecomment-524128168, or mute the thread https://github.com/notifications/unsubscribe-auth/AKLPRKPS6UGRRPSUBNN2WFDQF4WB5ANCNFSM4GHUUZTA .