As for the specialized indentation for C ++ and TCL, that is, special material that is applied in aditon to all the other configuration data that has been proposed. Vim has special indentation rules defined in the code for different languages. Some of these are found in the / indent directory of the vim installation, where there is a separate file for each file type. For more information on how this works, read the help for "indentexpr".
Indentation c and, I think, also indentation for C ++ are mainly defined in the Vim source code and have many parameters that you can set, plus it is specially configured in c.vim or C ++. vim indent file. Read the help for "cindent" and "c-indenting" for more help.
In short, the tcl.vim file manages special indentation for tcl files. If you want to reconsider how indents work with tcl, you would like to change the main function in this file. The c / C ++ indentation is mainly controlled by the internal components of Vim, but with many different parameter flags. You can control the indentation of c / C ++ by adjusting the parameters as you want, and / or writing a function for the indent file in the / indent directory. (I believe that there is no C ++ file in the / indent directory, I'm not sure if c.vim is a file to edit there, or you need to create a new C ++. Vim file. I think it will be c.vim the file to be used. which is basically an empty shell in a standard Vim installation, but you can read other .vim indent files to get an idea of ββhow they work.
Herbert sitz
source share