5 ms·
No advice on moving from line to line? Word and character movements are great (and well worth learning), but how do you suggest moving to just the next line wit
by falcolas 14y ago
No advice on moving from line to line? Word and character movements are great (and well worth learning), but how do you suggest moving to just the next line without spamming `w`?
- wallish 14y agoFor moving directly vertical: :nnoremap k gk :nnoremap j gj These move up/down one character, even if it is the same line wrapped over. Really beneficial for things like LaTeX editing.
- imissmyjuno 14y agoI was going to say. Disabling hjkl makes moving between word wrapped lines impossible
- erifneerg 14y agousing '/' (search) comes to mind. Drew also did an episode cover some more ideas and touches on relative number moving. http://vimcasts.org/episodes/long-range-line-duplication/ http://vimcasts.org/episodes/long-range-line-duplication/
- hboon 14y ago+ and - to move 1 line up. Combine with a number, 4+ to move down 4 lines, complementing 4G or :4<CR> to move to 4th line.
- falcolas 14y agoI don't see those as an improvement (i.e. worth committing to muscle memory) for `j` and `k` that would incentivize me to no-op those two keys. You can do `4j` as well.
- llimllib 14y agoIf you want to go to the same cursor position on the next line, definitely j is the way to go. Much of the time, I want to go to a specific part of the next line. In which case, let's say I want to go to the parse function, I'll do "/par<enter>".
- akkartik 14y agoI use {} for moving paragraphs at a time. And HML for switching to top, middle or bottom of screen.