svermeulen / vim-easyclip

Simplified clipboard functionality for Vim
693 stars 21 forks source link

Issue with block paste #72

Closed sassanh closed 8 years ago

sassanh commented 8 years ago

If I yank a visual block (selected with ) and then paste it, mouse cursor goes to beginning of the line no matter what options are set. It's not vim's default behavior (vim keeps cursor at top line without changing column).

svermeulen commented 8 years ago

Thanks for the report. If you don't set any options like g:EasyClipAlwaysMoveCursorToEndOfPaste then easy clip should preserve the normal vim behaviour. I'll take a look at this.

svermeulen commented 8 years ago

Ok I think I fixed it to retain the normal vim behaviour correctly when 'EasyClipAlwaysMoveCursorToEndOfPaste' is 0. Please correct me if I'm wrong

Let me know if you see any other cases that don't match your expectations.

I'm leaving this item open since it's unclear whether 'EasyClipAlwaysMoveCursorToEndOfPaste' is behaving correctly

svermeulen commented 8 years ago

Currently, 'EasyClipAlwaysMoveCursorToEndOfPaste' has the following behaviour:

When EasyClipAlwaysMoveCursorToEndOfPaste is false the correct behaviour should always be the default vim behaviour, but when its true we can decide on something non standard here. I've committed this change on the 'develop' branch (see diff above) and am going to try it for a bit to see how it feels. If anyone else has an opinion on this let me know!

sassanh commented 8 years ago

Well actually I use it with EasyClipAlwaysMoveCursorToEndOfPaste=0 cause I'm used to vim's normal behavior and after pulling new version it seems to be alright (referring the problem I posted here) I'll give EasyClipAlwaysMoveCursorToEndOfPaste a try. Thanks.

svermeulen commented 8 years ago

Ok after playing with the different interpretation of 'EasyClipAlwaysMoveCursorToEndOfPaste' for a bit I've concluded that the original behaviour of staying at the first column is better so I'm leaving it at that.

Also, I realized that I accidentally committed that other change to develop branch too - the change that uses the global pastetoggle by default. So that's probably why the new version works for your problem.

So I think if you update again you'll have to add this to your .vimrc:

let g:EasyClipUseGlobalPasteToggle = 0

If you want to use global paste toggle for something else