vim-anywhere icon indicating copy to clipboard operation
vim-anywhere copied to clipboard

feature proposition: Automatic pasting

Open TitouanT opened this issue 6 years ago • 5 comments

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.

TitouanT avatar Dec 02 '18 00:12 TitouanT

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 :(

OrionRandD avatar Aug 21 '19 16:08 OrionRandD

@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

TitouanT avatar Aug 21 '19 23:08 TitouanT

@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 :)

OrionRandD avatar Aug 22 '19 21:08 OrionRandD

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.

TitouanT avatar Aug 23 '19 00:08 TitouanT

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 [email protected] 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 .

OrionRandD avatar Aug 23 '19 18:08 OrionRandD