Questions tagged [tab-characters]

Question about how to handle white spaces tab characters with vim, insert them, remove them, convert them to space characters, etc...

Related help topics:

68 questions
28
votes
2 answers

Elastic Tabstops in Vim?

Is there a plugin or a built-in feature in Vim that allows for elastic tabstops? I've searched a bit, and I found some references saying it was not possible in Vim, but those were quite old. Is there a way to have elastic tabstops in Vim? I am fine…
Jeroen
  • 381
  • 3
  • 5
4
votes
2 answers

softtabstop == tabstop VS softtabstop=0

Are this: set noexpandtab set shiftwidth=4 set tabstop=4 set softtabstop=0 ..and this: set noexpandtab set shiftwidth=4 set tabstop=4 set softtabstop=4 ..exactly the same? I thought that if softtabstop=0, then nothing happens if Tab is pressed,…
Martin
  • 945
  • 1
  • 9
  • 18
2
votes
1 answer

How to view tabs as conventional whitespace, not as control character ^I (caret I) in VIm?

I've somehow managed to have all tabs show up as the control character ^I in VIm, specifically gvim 8.1.1 on Windows 10. All I have related to tabs in vimrc is this: set tabstop=2 I do also have these lines that point to something else, so to…
ruffin
  • 123
  • 4
1
vote
3 answers

Why are characters variable width?

I have the following settings in my vimrc: set listchars=tab:►-,eol:¬,trail:● When I display unprintable characters in my makefile, I get something that looks like the following for one of the…
flashburn
  • 689
  • 6
  • 17
1
vote
1 answer

How to trigger file type specific settings after they they have been executed in vimrc?

I have the following setting in my vimrc autocmd FileType * setlocal tabstop=2 softtabstop=2 shiftwidth=2 expandtab This is just so that every file I open looks consistent. I also have another setting in after\ftplugin\make.vim setlocal tabstop=4…
flashburn
  • 689
  • 6
  • 17
1
vote
0 answers

The tab adds 8 spaces even though `set tabstop?` returns 4

For some reasons when I'm editing my ~/.config/nvim/init.vim, it adds 8 spaces even though I set set tabstop=4 on the file. Actually, :verbose set tabstop returns 4, so it should be 4 spaces. I already read the questions here and here, and…
Blaszard
  • 545
  • 1
  • 9
  • 27
1
vote
1 answer

how to make vim indentation file type specific?

I usually work on js files and php files. My js files require 2 spaces tab, whereas my php requires 4. How can I make vim dynamically change that depending on the file type I'm working on?
abbood
  • 733
  • 9
  • 23
0
votes
3 answers

What is the setting for the strict tab adherence when running vim with no configuration?

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…
paradroid
  • 367
  • 2
  • 10
0
votes
1 answer

Why can't save file without tab key?

Configuration in my .vimrc: set tabstop=4 set expandtab set softtabstop=4 set shiftwidth=4 I have edit a file which contain tab,saved and reopen to have a look at it with set list,the tab key saved,why set expandtab can't convert tab into 4 spaces…
showkey
  • 1,130
  • 2
  • 11
  • 30
0
votes
0 answers

Printed on pressing the tab key

It's not easy to articulate the question, as I touched something I don't understand. I am using a vim extension of VS-CODE. I pressed something, that turned my next pressed key, into a literal, namely . What is this functionality called? How…
Makan
  • 101
  • 2