Vim navigation #1350
Replies: 5 comments 8 replies
-
My approach to vim navigation may seem extreme but turns out quite efficient for vim and shell imo. I remove the spaces for all single letter characters and using the plugin hop I can navigate to any word in 1-5 strokes (depending on words on screen) which is equal to typing navigation. |
Beta Was this translation helpful? Give feedback.
-
just made a little plugin for the relative line number problem if you're interested? I had some ideas on how we could make easymotion even better (thanks to Preoniky on discord) Preoniky — 06/12/2021 |
Beta Was this translation helpful? Give feedback.
-
The main issue with easymotion approach is that there's the delay between "label display" → "human process label" → human stroke". Instead if the jump is to the character already displayed I think there's less overhead. ( I also use these (some added recently) Avoid switching normal/insert mode all the timeAlthough there isn't much point in using vim for this, vim is supposed to be modal (emacs is modeless) but I'm used to writing vimscript and inertia. I have those mappings
and some more mode-specific mappings, but the basic idea is that it's possible to map Plover stroke to Relative numberI have a system as well for 99 lines up/down per stroke (already mentioned above but I mistakenly write "2 strokes"?). This alone isn't very efficient, so I add the feature below. Movement (recently added)I have Example Other vim bindingsMy system is
Plan
Miscellaneous noteI set up some common 2-strokes that can be 1-stroked to beep so it may be easier to get out of bad habits |
Beta Was this translation helpful? Give feedback.
-
How are you envisioning this just out of curiosity? |
Beta Was this translation helpful? Give feedback.
-
Forward and reverse single word search:So I saw user 2's idea for two stroking a word search in vim (see gist) Then I found another way to two stroke words using the retro_everything plugin: so you can do something like: The entries for these retrostrokes are as follows: this is perfect for those using the control(j) binding above as you can just stay in insert mode and search through the file easily |
Beta Was this translation helpful? Give feedback.
-
Sometimes I'm quite annoyed that I inefficiently repeat
STPH-BS
({#Down Down Down}{^}
) orSTPH-BG
({#Control_L(Right)}{^}
) in Vim.Previously I turn on "relative line number" feature and can reach any line in 2 strokes, but I don't always press the right number for some reasons, and navigating on the same line is still problematic.
What do you use? (vim-sneak? I think it would be quite hard to use because I don't think I can type
s[1
in one or two strokes.) Something else?This is an experiment with vim-easymotion. (Go to start of any word in 2 strokes. First stroke
STPROEU
, then stroke the tag. The dictionary is a 1/2-character fingerspelling dictionary).vimrc
:easymotion.py
: (add this as a Python dictionary to Plover)What do you think?
Beta Was this translation helpful? Give feedback.
All reactions