ardagnir / athame

Full vim for your shell (bash, zsh, gdb, python, etc)
GNU General Public License v3.0
1.63k stars 34 forks source link

text objects' functions gets spelt in full in the command line #78

Open resolritter opened 5 years ago

resolritter commented 5 years ago

When you have a map like this:

onoremap <silent> [key] :call TextObjectFunction()<CR>

Upon typing cw, the text object won't be changed right away. You'll first see the :call command get typed fully in the command-line before actually going through, which adds a noticeable delay and general unexpected visual noise.

Reverting to https://github.com/ardagnir/athame/commit/474f12c19aa641f12ae25b5adfbc46de448d4c0c solves this problem.

If the behavior is not clear enough, Monday I can post a short 4 second video demonstrating what actually happens. Currently I can't due to bad internet.

ardagnir commented 4 years ago

This is caused by https://github.com/vim/vim/issues/2889

This can be fixed in neovim by using \<Cmd> instead of ":".

For normal vim, I'm adding a helper function to workaround this problem (currently in branch 1.3).

resolritter commented 4 years ago

Thank you for taking a look at this. I'm still seeing the behavior in the OP on my end (testing on branch 1.3, using Vim, not Neovim).

shahzebs commented 4 years ago

I could really see myself using this. However, the described behavior is disturbing. Hoping for a fix soon.

ardagnir commented 3 years ago

Regular vim now has support for \<cmd> so this should now only be a problem for older-style mappings