tpope / vim-repeat

repeat.vim: enable repeating supported plugin maps with "."
http://www.vim.org/scripts/script.php?script_id=2136
2.58k stars 81 forks source link

vim-repeat + surround-vim HTML tag attributes get deleted VSCode #89

Closed ZackPlauche closed 3 years ago

ZackPlauche commented 3 years ago

There's an issue that I saw someone previously posted about using the "." command in an HTML block after changing the code... but it works perfectly on the vscodevim extension.

Example with Neo Vim and Neo Vim VSCode Plugin (haven't tested on normal Neo Vim): On Windows 10, inside my C:/Users/username/AppData/Local/nvim/init.vim file:

. . .
Plug 'tpope/vim-surround
Plug 'tpope/vim-repeat'
. . .

The result.

<div class="nav-link">Link 1</div>
<div class="nav-link">Link 2</div>

<!--- cst<a -->
<a class="nav-link">Link 1</a>
<!-- . -->
<a>Link 2</a>

Using the vscodevim extension:

<!-- cst<a --> 
<a class="nav-link">Link 1</a>
<!-- . -->
<a class="nav-link">Link 2</a>

This may just be a difference in configuration. Getting it to work properly in NeoVim is preferable, and I'm fine with using the vscodevim extension as well, but thought I'd share.

justinmk commented 3 years ago

but it works perfectly on the vscodevim extension.

That extension doesn't use vim, it is an emulator. So it is irrelevant here.

Regarding https://github.com/asvetliakov/vscode-neovim/ , its readme mentions that insert-mode is controlled by vscode. It's a miracle that dot-repeat works at all. There's nothing that vim-repeat can/should do to deal with the integration of vscode + neovim.

tpope commented 3 years ago

Can confirm, vscodevim is an independent project and not a meaningful comparison. If there is a behavior change you or anyone would like to propose, I'll be happy to review a PR.