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

Last selection changed by using text object, e.g. ygc

Open kiryph opened this issue 6 years ago • 0 comments

  1. Select some text visually
  2. Move a round and use the text object dgc, ygc, >gc
  3. Type gv will select the text-object in step 2.

If I use a builtin text object in step 2, e.g. yap, gvselects the selection from step 1.

This has been reported at several locations:

  • https://github.com/wellle/targets.vim/issues/202
  • https://github.com/kana/vim-textobj-user/issues/58
  • https://vi.stackexchange.com/questions/18999/do-operator-ranges-movements-textobjects-always-overwrite-the-last-visual-select

The answer by Wellle and comment by kana indicate that this might be something which requires a change to vim and cannot be resolved on the plugin side.

kiryph avatar Feb 24 '19 08:02 kiryph