19

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!

  • 2
    This has driven me nuts for years! – dotancohen Feb 26 '15 at 15:43
9

It's only a clumsy workaround, but if you :set list the cursor will be positioned on the other "side" of the tab.

| improve this answer | |
  • 6
    Thank 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! – Chad Paradis Feb 26 '15 at 15:59
6

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.

| improve this answer | |
  • 4
    Sorry, 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. – Chad Paradis Feb 26 '15 at 15:53
1

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.