I noted that shiftwidth is used to indent text.
This is my shiftwidth setting in _vimrc:
set shiftwidth=1
I don’t want to change it. I use it for other functions.
But… I want to indent with 2 spaces like this:
--function-myfunction()
----1st-block
------2nd-block
--------3rd-block
--------end3rd-block
------end2nd-block
----end1st-block
--endfunction
- = 1 space
Is this possible?
This are my indent settings in _vimrc:
set autoindent
set cindent
set cinkeys=!^F
You can
setlocal, for example:It doesn’t change global settings.