Sublime Forum

GNU Coding Standarts tabs

#1

Is there the way I can make tabs behave like it is made in gcc source code (GNU Coding Standarts):

  1. When I press Tab button 2 spaces are inserted.
  2. When there are 8 spaces in a row they are substituted for one tab character (’\t’)?

The relevant vim configuration for this is:

set tabstop=8 set softtabstop=2 set shiftwidth=2 set noexpandtab set smarttab

0 Likes