All Questions
Tagged with whitespace cursor-movement
4 questions
21
votes
3
answers
3k
views
How can I make Vim position the cursor at the start of a tab character instead of the end?
Open an empty buffer and insert a tab character then exit to normal mode. When you place the cursor (normal mode) on the tab it will be at the right side of the whitespace. I'm looking for a way so ...
3
votes
3
answers
4k
views
Moving to the end of the last word on a line
There are commands to distinguish between the beginning of a line (0) and the beginning of the first word of the line (^), basically ignoring leading whitespace. But I can only find one way to move ...
1
vote
1
answer
240
views
Next paragraph - don't skip lines with white spaces
When using { and } to skip to the next paragraph, the behavior is unpredictable since I can't see white spaces. I have tried to show line endings to see which lines have spaces, but I don't like the ...
0
votes
1
answer
265
views
Removing trailing spaces with the substitute command changes the cursor position
From http://vim.wikia.com/wiki/Remove_unwanted_spaces
function TrimWhiteSpace()
%s/\s\+$//e
endfunction
autocmd FileWritePre * call TrimWhiteSpace()
autocmd FileAppendPre * call TrimWhiteSpace()
...