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

Vim-iced alters yank with clipboard unnamedplus

Open Futurile opened this issue 4 years ago • 1 comments

Vim-iced seems to be over-riding Vim's normal yank and paste functionality:

  • If I yank or cut a part of a comment Vim-iced will select the whole comment.
  • If I try and yank or cut a part of a function (single line) it will select the whole comment.
  • If I try and paste something in from the system clipboard it pastes in the function that it previously yanked.

My clipboard is set to unamedplus, I'm using vim-iced 2.3.2

  def smalltest
      "a small test"
      []
     (println "hello, first line")

(comment 
  (smalltest)
 
  (+ 3 3)
)

In vim v$y to select the println line and yank it. Go down a line and paste (p) - it pastes the whole function rather than the single line. The expected behaviour is it would paste in the single println that was selected.

In the comment it will not let you select the (+ 3 3) line, instead it selects the whole comment. Expected behaviour is to be able to paste in a single line.

Select something in another window (e.g. another vim instance in Tmux), in insert mode in Vim press v and it will paste in the last selection that vim-iced knows about. The expected behaviour is it will paste in what is in the system clipboard.

If I do :IcedDisconnect then it will work

I saw a closed bug if you have unnamedplus set but I was not sure what that issue covered.

Futurile avatar Feb 20 '21 17:02 Futurile

@Futurile vim-iced should not override yank and paste. There are no default mappings about yank and paste. https://github.com/liquidz/vim-iced/blob/2.3.2/ftplugin/clojure.vim#L345

Could you try that the problem can be reproduced or not with minimal configuration? https://liquidz.github.io/vim-iced/#minimal_configuration

liquidz avatar Feb 20 '21 21:02 liquidz