diff --git a/tutos/vim.txt b/tutos/vim.txt index ea24399..e3960d0 100644 --- a/tutos/vim.txt +++ b/tutos/vim.txt @@ -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 +