Open mattboehm opened 4 years ago
I think I'm going to have to make a custom :Normal
command that disables sneak first and re-enables it afterwards. I've used :normal!
to get around this, but this disables other custom mappings that I'd like to still be able to use.
With s_next
disabled it works fine. The problem seems to be g:sneak#s_next=1
("clever s"). Not sure anything can be done here, because "clever s" works by setting up temporary mappings.
@justinmk hmm I was thinking I could fix my specific problem by toggling this setting off/on on CmdLineEnter
/CmdLineLeave
events, but I believe these settings are just read once on init()
. The best hack I can think of for now is to unmap/remap f/t on these events.
Actually, CmdLineLeave
probably triggers before the normal mode changes are executed, so I'd probably actually need to wrap :normal
in a custom command that does this.
@mattboehm Awesome, you might just have solved a problem regarding our somewhat related issue (which in fact could apply to Sneak too). CmdlineEnter
seems a fine way to detect :normal
execution, I haven't thought about that. Many thanks :) CmdlineLeave
triggering before the actual execution of the changes seems a problem though.
I recently updated my vimrc to use sneak's versions of f/t:
However, if I try to run a command like
:%normal f(D
, I often get unexpected results. For instance on this file:I end up with:
(
<blank line>
is a literal blank line)If I unmap f, I get the expected result:
Do you know if there's a fix/workaround for this? Thanks!