0

I want to use only tabs in my code, my problem is that for some type of files tabs are converted to spaces.
When I write in my scss files the tabs are spaceless:
Tab in scss file
but when writing haml files, tabs are converted to spaces (each dot is a space):
Tab in haml

These are my tab settings in my ./gvimrc file:

set autoindent
set shiftwidth=2
set tabstop=2
set noexpandtab  
Ricardo CastaƱeda
  • 5,746
  • 6
  • 28
  • 41

1 Answers1

2

It sounds like the settings are getting overridden for haml files. Look for a command like this somewhere in your vimrc:

autocmd FileType haml set tabstop=4|set shiftwidth=4|set expandtab

If you find this, then delete it or comment it out to prevent tabs from being converted to spaces for haml files.

There are other ways that this might be getting set as well. Have a look at Changing Vim indentation behavior by file type.

Community
  • 1
  • 1
Jim K
  • 12,824
  • 2
  • 22
  • 51