0

In my .vimrc file, i wrote down set tabstop=4 in order to have a tab equal to 4 spaces, but when I use tab in a C file, only one space is written. I have to put another tab to write 4 spaces.

How can I solve that ?

Thanks

zelph14
  • 11
  • 3

2 Answers2

1

A tabstop doesn't mean that every tab is equivalent to 4 spaces. It means that a tab character will represent 1-4 spaces so that the next character appears in a column that's a multiple of 4.

chepner
  • 497,756
  • 71
  • 530
  • 681
0

Here's what I have in my .vimrc file: When in insert mode, I press tab and four spaces appear in my file.

set tabstop=4
set shiftwidth=4
set expandtab
zundarz
  • 1,540
  • 3
  • 24
  • 40