Vintageous icon indicating copy to clipboard operation
Vintageous copied to clipboard

gj and gk motions don't work in visual line and block mode

Open kozie opened this issue 8 years ago • 2 comments

I like to bind j and k to gj and gk so that my cursor doens't skip over wrapped lines. Tho it seems that this works just fine with the following bind:

{"keys": ["j"], "command": "press_key", "args": {"key": "gj"}, "context": [{"key": "vi_command_mode_aware"},    {"key": "vi_use_ctrl_keys"}]},
{"keys": ["k"], "command": "press_key", "args": {"key": "gk"}, "context": [{"key": "vi_command_mode_aware"},    {"key": "vi_use_ctrl_keys"}]},

However, in VISUAL LINE and VISUAL BLOCK mode both gj and gk won't move the cursor (or selection) at all.

I'm having this on several different systems running Windows 7 and/or Windows 8.1, both 64 bit. I always use the latest (non dev) ST3; build 3083 in this case. I don't have Vintage mode turned on. This also happens when having the least packages installed (Package Control, Seti_UI and Vintageous).

kozie avatar Sep 16 '15 07:09 kozie

This is actually quite annoying because I vastly prefer to move by visual lines, yet I'd like visual line mode to still work. Is there a way to make these bindings only applicable to normal mode?

guidebin avatar Aug 09 '16 20:08 guidebin

@guidebin I am having the same preference but so far the only solution for me seems to be to remap the keys in the .vintageousrc file. First create the file:

Vintageous: Open .vintageousrc

and then my file reads:

:map j gj
:map k gk

unfortunately this only seems to work when I reset vintages from within sublime by typing

Vintageous: Reset

and then only for the current session.

I feel like I am missing something but maybe this is helpful to you.

Cheers

DrBones avatar Aug 17 '16 14:08 DrBones