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 the cursor will be at the left side of the whitespace instead. Thanks!
3 Answers
It's only a clumsy workaround, but if you :set list
the cursor will be positioned on the other "side" of the tab.
-
8Thank you! You helped me look in the right place.
:set list listchars=tab:\ \
results in what I asked for. Now I just need to see if it's as useful as I thought! Commented Feb 26, 2015 at 15:59
The cursor in normal mode is on the character not to either side. So you can do i
and a
to go to insert mode to the left or right of the tab respectively.
-
4Sorry, I should've been more clear. This has nothing to do with insert mode. I use hard tabs and each hard tab takes up four spaces. When I move the cursor (normal mode) onto a hard tab character it ends up on the right-most column of the tab. I want it to be at the left-most column of the tab. This is purely a aesthetic issue. Commented Feb 26, 2015 at 15:53
Just use command :set listchars=tab:\ \ list
.
I intentionally put list
in the end to preserve the space after last backslash in the listchars
option value.