When I run vim with no configuration (--clean), in a bash file I cannot move the cursor before any indented tabs. I remember being annoyed by this before I regularly used vim, but early on as I grew my own configuration this stopped happening at some point.

What is the setting that makes this happen? I would like to experiment with using it in case I find that I now prefer this strong tab adherence.

  • I'm unclear what you mean by "cannot move the cursor before any indented tabs". Could you please edit the question to include what specific motion commands, what's happening, and what you want to happen instead?
    – Rich
    Jan 31 at 13:27
  • @Rich I mean that on a line with an indented tab, the cursor cannot go any further left than the ^ position. It's something I noticed when I started using vim and I noticed it again on a fresh server with no added configuration when I wrote this question, but at the moment I cannot reproduce this behaviour (on a fresh instance) and I'm confused about that.
    – paradroid
    Jan 31 at 18:54
  • Could you edit that into the question, please? Also, what motions are you trying?
    – Rich
    Feb 1 at 14:37

3 Answers 3


If you mean move your cursor by using the Bcksp key.

The setting that control what you can delete with backspace is backspace option:

set backspace=indent,eol,start

I you mean move the cursor using the arrows or h, l then @romainl is right and it is the list option:

set nolist

Actually it is not that the cursor cannot go behind the character.


  • list the cursor is positioned at the start of the tab presentation and
  • nolist the cursor is positioned at the end of the tab representation
  • I'm quite sure the 'list' option doesn't involve in the process. This option is to display lines unambiguously (useful when you have spaces and tabs mixed in lines)
    – gildux
    Jan 25 at 21:47
  • @gildux read :help 'list' one more time.
    – romainl
    Jan 25 at 22:06
  • @romainl strange, I can read at pubs.opengroup.org/onlinepubs/9699919799/utilities/… that "If list is set, edit buffer lines written while in ex command mode shall be written as specified for the print command with the l flag specified. In open or visual mode, each edit buffer line shall be displayed as specified for the ex print command with the l flag specified. In open or visual text input mode, when the cursor does not rest on any character in the line, it shall rest on the '$' marking the end of the line." And that' how I've been using it since ed
    – gildux
    Jan 25 at 22:56
  • @romainl just ran Vim and :help 'list' to read that "List mode: By default show tabs as CTRL-I is displayed, display $ after end of line. Useful to see the difference between tabs and spaces and for trailing blanks. Further changed by the 'listchars' option." My old friend's still behaving the same: show lines unambiguously, not moving cursor before/after tab stop. Next paragraph: "The cursor is displayed at the start of the space a Tab character occupies, not at the end as usual in Normal mode. To get this cursor position while displaying Tabs with spaces, use: :set list lcs=tab:\ \ "
    – gildux
    Jan 25 at 23:07
  • Not sure where you are going with that wall of copypasta.
    – romainl
    Jan 26 at 8:13

:set expandtab makes it possible to jump to the start of the line using 0 in normal mode.

  • This is because expandtab makes indents into space characters. Jan 26 at 13:23
  • This seems very plausible, but it's not making any difference on my setup (ie setting noexpandtab). Nothing so far suggested has worked, so I am thinking that it is a combination of options (or rather lack of) that makes this happen.
    – paradroid
    Jan 26 at 23:40

$ vim --clean is not "Vim with no configuration", it is "Vim with the default configuration". See :help defaults.vim.

Where the cursor lands in a tabulation depends on :help 'list'. It is disabled by default and not enabled in defaults.vim.

  • FWIW, that information is very easy to find, just by scanning the documentation of each option in your vimrc.
    – romainl
    Jan 25 at 14:19
  • "With no user configuration" would be easy to deduce for a person with a normal temperament. Every program has default settings. And I have been looking for this setting for weeks before asking. I was looking at formatoptions. What may seem easy for you may depend on what you already know.
    – paradroid
    Jan 25 at 14:34
  • Don't you mean where the cursor lands depends on 'tabstop' ?
    – gildux
    Jan 25 at 21:50
  • @gildux, no, :help 'tabstop' has nothing to do with any of this.
    – romainl
    Jan 25 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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