From fea52246b35affb7240e48a853521a423c706f00 Mon Sep 17 00:00:00 2001 From: Hugo LAMY Date: Tue, 5 Jul 2022 15:13:18 +0200 Subject: [PATCH 1/3] in install sh fixed ref to skeleton_colors with s --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 845a1e8..9996405 100644 --- a/install.sh +++ b/install.sh @@ -74,7 +74,7 @@ function install install "$HOME/.screenrc" install "$HOME/.vimrc" install "$HOME/.zshrc" -install "$HOME/.vim/templates/skeleton_color.h" +install "$HOME/.vim/templates/skeleton_colors.h" install "$HOME/.vim/templates/skeleton.cpp" install "$HOME/.vim/templates/skeleton.hpp" install "$HOME/.vim/templates/skeleton_main.cpp" From 958a0c83b3bf4dbe0b242add72a658dac8c089fb Mon Sep 17 00:00:00 2001 From: Hugo LAMY Date: Tue, 5 Jul 2022 15:33:00 +0200 Subject: [PATCH 2/3] add syntax for tpp files in vimrc --- config_files/.vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config_files/.vimrc b/config_files/.vimrc index 336d6a6..456f413 100644 --- a/config_files/.vimrc +++ b/config_files/.vimrc @@ -57,6 +57,16 @@ set nowrap +"--------------------------------------------------------------- +" to use the syntax highlight of .hpp on .tpp files +"--------------------------------------------------------------- +"https://beerpla.net/2008/04/02/how-to-add-a-vim-file-extension-to-syntax-highlighting/ + +filetype on +au BufNewFile,BufRead *.tpp set filetype=cpp + + + "--------------------------------------------------------------- " pour pouvoir utiliser la norminette partout "--------------------------------------------------------------- From cb1e66190433d9ed9ec289350c845220a1bf877a Mon Sep 17 00:00:00 2001 From: Hugo LAMY Date: Tue, 5 Jul 2022 15:38:39 +0200 Subject: [PATCH 3/3] add syntax explanation in vim tuto file --- tutos/vim.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 +