t9md / atom-vim-mode-plus

vim-mode improved
https://atom.io/packages/vim-mode-plus
MIT License
1.4k stars 111 forks source link

Duplicating a block of lines using `YP` in visual mode isn't consistent with Vim #1156

Closed mattalxndr closed 2 years ago

mattalxndr commented 2 years ago

Execute Vim Mode Plus: Clip Debug Info(which write info to clipboard) then paste here.

debug info ```json { "atom": "1.58.0", "platform": "linux", "release": "5.15.7-arch1-1", "vmpVersion": "1.36.7", "vmpConfig": { "startInInsertMode": true } } ```

Steps to reproduce

  1. Put this into a new buffer:

    xxx
    ooo
  2. Exit insert mode.

  3. Put cursor on first line (xxx).

  4. Vj to select both lines.

  5. YP to duplicate the block of lines.

Expected

xxx
ooo
xxx
ooo

Actual Result

xxx
xxx
ooo
ooo

Read and check all "Checklist" below.

Checklist

You have to check all before open issue.

t9md commented 2 years ago

Here is the reason for inconsistency with pure Vim and you can disable it by unchecking StayOnYank like the following gif on vmp package setting. https://github.com/t9md/atom-vim-mode-plus/wiki/DifferencesFromPureVim#config-vmp-stayontransformstring-stayonyank-stayondelete

image

mattalxndr commented 2 years ago

How can I make vmp behave as close to pure-vim's default as possible?

Thank you, very nice