add syntax explanation in vim tuto file

This commit is contained in:
Hugo LAMY
2022-07-05 15:38:39 +02:00
parent 958a0c83b3
commit cb1e661904

View File

@@ -1,9 +1,3 @@
/SYNTAX/
to create a new syntax file, just copy an existing one :
cp /usr/share/vim/vimXX/syntax/extension.vim ~/.vim/syntax/
and change the name to match the extension
and change the content to whatever you want
/MODE INSERTION/
**i** mode insertion avant le curseur
**I** mode insertion au debut de la ligne
@@ -150,4 +144,12 @@ replacement2: **vim old %** va a la toute premiere occurence de 'old'
tres important pour que la fonction se réecrive a chaque
fois, sinon conflit
/SET SYNTAX FOR A FILE WITH EXTENSION NOT RECOGNIZE/
/in case the syntax already exist/
/like .tpp files with same syntax than .hpp, that have same syntax than .cpp/
/.hpp files are detected but not .tpp files/
**:set syntax=cpp** say to use cpp syntax
**in .vimrc :** filetype on
au BufNewFile,BufRead *.tpp set filetype=cpp