Skip to main content
added 93 characters in body
Source Link
einpoklum
  • 11.1k
  • 23
  • 91
  • 170

In my ~/.vim/vimrc, I have:

set shiftwidth=4 set tabstop=4 

and when I edit a plain text file, that is respected. However, when I edit a CMake file - these both becomes 8. I tried leafing through /usr/share/vim/vim90/syntax/cmake.vimlooking for the cause of this change, but couldn't find something which looks like an override of these values.figure it out:

  • Nothing in /usr/share/vim/vim90/syntax/cmake.vim seems to be related to tab stops, or to include another vim file.
  • Same for /usr/share/vim/vim90/syntax/cmake.vim.
  • The CMakeLists.txt files I'm editing have no modeline.

What's causing this? Is there a definition I've missed? And - can I override it somehow?

In my ~/.vim/vimrc, I have:

set shiftwidth=4 set tabstop=4 

and when I edit a plain text file, that is respected. However, when I edit a CMake file - these both becomes 8. I tried leafing through /usr/share/vim/vim90/syntax/cmake.vim, but couldn't find something which looks like an override of these values.

What's causing this? Is there a definition I've missed? And - can I override it somehow?

In my ~/.vim/vimrc, I have:

set shiftwidth=4 set tabstop=4 

and when I edit a plain text file, that is respected. However, when I edit a CMake file - these both becomes 8. I tried looking for the cause of this change, but couldn't figure it out:

  • Nothing in /usr/share/vim/vim90/syntax/cmake.vim seems to be related to tab stops, or to include another vim file.
  • Same for /usr/share/vim/vim90/syntax/cmake.vim.
  • The CMakeLists.txt files I'm editing have no modeline.

What's causing this? Is there a definition I've missed? And - can I override it somehow?

Source Link
einpoklum
  • 11.1k
  • 23
  • 91
  • 170

What's overriding my .vimrc tabstop size setting for CMake files?

In my ~/.vim/vimrc, I have:

set shiftwidth=4 set tabstop=4 

and when I edit a plain text file, that is respected. However, when I edit a CMake file - these both becomes 8. I tried leafing through /usr/share/vim/vim90/syntax/cmake.vim, but couldn't find something which looks like an override of these values.

What's causing this? Is there a definition I've missed? And - can I override it somehow?