Suppose I have many lines of various indentations. E.g.
qqqq wwwwwwww eeeeee rrrrrrr tttttt yyyyyyy
If I am anywhere on the fourth line above which is blank. Is there a shortcut to jump the cursor to directly under the first
e of the third line?
I don't believe so. Does the blank line have whitespace or is it totally empty? If the former you can use something like this:
:nnoremap <leader>^ kg^j
Or, courtesy of Mass, just
:nnoremap <leader>^ -j
<leader>^ can be replaced with any unused key combo you like. Enter it while in Normal mode and you'll get the effect you need. (If you want it to work with wrapped lines, too, then use
If the blank line is totally empty there's no easy way to go to an arbitrary column. You have to insert the appropriate amount of whitespace first. (Well, that's a bit of a lie...you can use
:set virtualedit=all but that's probably going beyond what you have in mind.)
If you have
set cindent, you can press
S (or equivalently
cc) to clear the line and start insert mode at that point. If you want to wind up in normal mode,
S <esc> would work, and fill the line with spaces up to and including under the first "e."