New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Folding with zc enters visual mode. #366
Comments
Try using NeoVintageous mappings. Sublime Text mappings won't work so well. See Also maybe my mappings will help, I've played around with some folding mappings: https://github.com/gerardroche/sublimefiles/blob/master/User/.vintageousrc |
Then he would have the issue which relates to #308 Due to his key binding both starting with the same letter and muscle memory. |
@carlevison No I don't think that issue relates. The other issue is triggered when trying to map a single key like f and also use it as a prefix fb. Neo doesn't have the ability to trigger the first mapping after n secs, if no other key is pressed. There is no single key z command. |
I've removed all entries from my
But it still exhibits the same behavior. |
Make sure you reload your vintageousrc file via the Command Pallette: |
I can't reproduce it. When I close via zc my cursor is put on the first character at the start of the fold i.e. on the s of struct, and I'm in normal mode. You can start Neo in debug mode for more logs, run sublime from command with the debug env variable set
See https://github.com/NeoVintageous/NeoVintageous/blob/master/CONTRIBUTING.md. |
Here is the log for folding with
|
Everything looks good. It looks like the fold command is entering visual mode. I'm assuming it doesn't happen with commands like unfold. My guess is that you have a rouge key binding or a plugin is overriding the fold command. Check your User directory for keymap files ( |
It does happen for unfolding with Here is the context of the
|
After copying @hweom .vintageousrc file I can confirm I am experiencing the same issue that i'm being taken into VISUAL mode. |
Found it. Thanks. The reason I couldn't reproduce it is because I have a custom fix to work around the issue: There's no easy way for Neo to work around this issue. The fold commands themselves enter VISUAL mode. The workaround overrides the fold commands and fixes the cursor after fold commands are run. We can't really add this fix to Neo because overriding the default commands is a bit hacky. |
I don't know what part of original Sublime functionality these commands use. Just FYI, folding by clicking on the triangles right to the code blocks does not start VISUAL mode. |
Description
When folding code with zc, editor folds the scope, but switches to visual mode at the same time.
Steps to Reproduce
Install NeoVintageous, add the following to the keyboard settings:
Inside a code block, press
z
,a
.Expected behaviour
Folding without entering visual mode.
Actual behaviour
NeoVintageous enters visual mode after block folding.
Versions
Version 3.1.1 build 3176
Archlinux 64 bit.
Additional Information
The text was updated successfully, but these errors were encountered: