From 60f9dffbdd226a7cc31652ad291295964203203c Mon Sep 17 00:00:00 2001 From: Julien Le Page Date: Mon, 13 Sep 2021 17:04:06 +0200 Subject: [PATCH 1/5] Improved overall configuration + added pluggin to automate basic config + added improved status line ! status line config to be fixed --- .gitmodules | 10 ++++++++- bundle/vim-airline | 1 + bundle/vim-airline-themes | 1 + bundle/vim-latex-live-preview | 1 - bundle/vim-sensible | 1 + vimrc | 38 +++++------------------------------ 6 files changed, 17 insertions(+), 35 deletions(-) create mode 160000 bundle/vim-airline create mode 160000 bundle/vim-airline-themes delete mode 160000 bundle/vim-latex-live-preview create mode 160000 bundle/vim-sensible diff --git a/.gitmodules b/.gitmodules index ab90f89..51eec28 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,4 +19,12 @@ [submodule "bundle/vim-cpp-modern"] path = bundle/vim-cpp-modern url = https://github.com/bfrg/vim-cpp-modern.git - +[submodule "bundle/vim-sensible"] + path = bundle/vim-sensible + url = https://github.com/tpope/vim-sensible +[submodule "bundle/vim-airline"] + path = bundle/vim-airline + url = https://github.com/vim-airline/vim-airline +[submodule "bundle/vim-airline-themes"] + path = bundle/vim-airline-themes + url = https://github.com/vim-airline/vim-airline-themes.git diff --git a/bundle/vim-airline b/bundle/vim-airline new file mode 160000 index 0000000..2e29ab9 --- /dev/null +++ b/bundle/vim-airline @@ -0,0 +1 @@ +Subproject commit 2e29ab965625d1315f0ad070c928794baea3d66f diff --git a/bundle/vim-airline-themes b/bundle/vim-airline-themes new file mode 160000 index 0000000..97cf3e6 --- /dev/null +++ b/bundle/vim-airline-themes @@ -0,0 +1 @@ +Subproject commit 97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 diff --git a/bundle/vim-latex-live-preview b/bundle/vim-latex-live-preview deleted file mode 160000 index 855c309..0000000 --- a/bundle/vim-latex-live-preview +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 855c30915547c7e9c19b7e6efb528730c071d2e8 diff --git a/bundle/vim-sensible b/bundle/vim-sensible new file mode 160000 index 0000000..2d9f34c --- /dev/null +++ b/bundle/vim-sensible @@ -0,0 +1 @@ +Subproject commit 2d9f34c09f548ed4df213389caa2882bfe56db58 diff --git a/vimrc b/vimrc index 7123b28..6994c5a 100644 --- a/vimrc +++ b/vimrc @@ -2,45 +2,17 @@ runtime bundle/vim-pathogen/autoload/pathogen.vim execute pathogen#infect() -"file type detection -filetype on - -"ligne number -set number - -"coloration -syntax on -set cursorline -"highlight ColorColumn ctermbg=DarkYellow +" colorscheme let g:spacegray_use_italics=1 colorscheme spacegray -"let g:minimap_highlight='Visual' +let g:airline_theme='distinguished' -"miscellaneous -set backspace=indent,eol,start +" custom settings +set number set tabstop=4 set shiftwidth=4 -set shiftround -set ruler -set nocompatible - -"inclomplete commands -set showcmd - -"indent -filetype plugin indent on -set autoindent -set smartindent -set cindent set pastetoggle= - -"matching parenthesis -set showmatch - -"escape sequence -set ttimeout -set timeout timeoutlen=300 -let mapleader=',' +"let mapleader=',' " window nav nnoremap w From df4e455fb613c14b25460cdd68a934d43f433a5b Mon Sep 17 00:00:00 2001 From: Steins7 Date: Tue, 14 Sep 2021 21:07:22 +0200 Subject: [PATCH 2/5] Added project configuration + added support for .project.vim config files * fixed minor issues --- ftplugin/c.vim | 1 + ftplugin/cpp.vim | 1 + ftplugin/tex.vim | 15 ++++++++++++++- vimrc | 7 ++++++- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ftplugin/c.vim b/ftplugin/c.vim index b4546ef..a807b07 100644 --- a/ftplugin/c.vim +++ b/ftplugin/c.vim @@ -1,4 +1,5 @@ set colorcolumn=81 +set textwidth=80 set cino=N-s let g:cpp_attributes_highlight = 1 diff --git a/ftplugin/cpp.vim b/ftplugin/cpp.vim index b4546ef..a807b07 100644 --- a/ftplugin/cpp.vim +++ b/ftplugin/cpp.vim @@ -1,4 +1,5 @@ set colorcolumn=81 +set textwidth=80 set cino=N-s let g:cpp_attributes_highlight = 1 diff --git a/ftplugin/tex.vim b/ftplugin/tex.vim index b6131ea..9e0f728 100644 --- a/ftplugin/tex.vim +++ b/ftplugin/tex.vim @@ -12,5 +12,18 @@ let g:vimtex_fold_enable = 1 let g:tex_flavor = 'latex' let g:vimtex_view_general_viewer = 'evince' let g:vimtex_compiler_method = 'latexmk' -let g:vimtex_compiler_latexmk['options'] = '-shell-escape' +let g:vimtex_compiler_latexmk = { + \ 'build_dir' : 'bin', + \ 'callback' : 1, + \ 'continuous' : 1, + \ 'executable' : 'latexmk', + \ 'hooks' : [], + \ 'options' : [ + \ '-verbose', + \ '-file-line-error', + \ '-synctex=1', + \ '-interaction=nonstopmode', + \ '-shell-escape', + \ ], + \} diff --git a/vimrc b/vimrc index 6994c5a..fa0eb59 100644 --- a/vimrc +++ b/vimrc @@ -40,10 +40,15 @@ nmap :noh nmap gg=G nmap :NERDTreeToggle -"headers +" headers let g:header_auto_add_header=0 let g:header_field_author='Steins7' let g:header_field_author_email='steinsset@gmail.com' let g:header_field_license_id='GNU' nmap :AddHeader +" allow project-specific configs +if filereadable("./.project.vim") + source ./.project.vim +endif + From 3763771791477bfdaf60d3931fe915dcde1f3b12 Mon Sep 17 00:00:00 2001 From: Steins7 Date: Thu, 6 Jan 2022 14:13:35 +0100 Subject: [PATCH 3/5] Reworked visual appearance and bindings + added more convenient bindings * visually improved interface + started working on implementing editorconfig --- .gitmodules | 12 ++++++------ bundle/editorconfig-vim | 1 + bundle/lightline.vim | 1 + bundle/vim-airline | 1 - bundle/vim-airline-themes | 1 - vimrc | 9 +++++---- 6 files changed, 13 insertions(+), 12 deletions(-) create mode 160000 bundle/editorconfig-vim create mode 160000 bundle/lightline.vim delete mode 160000 bundle/vim-airline delete mode 160000 bundle/vim-airline-themes diff --git a/.gitmodules b/.gitmodules index 51eec28..0ccfe26 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,9 +22,9 @@ [submodule "bundle/vim-sensible"] path = bundle/vim-sensible url = https://github.com/tpope/vim-sensible -[submodule "bundle/vim-airline"] - path = bundle/vim-airline - url = https://github.com/vim-airline/vim-airline -[submodule "bundle/vim-airline-themes"] - path = bundle/vim-airline-themes - url = https://github.com/vim-airline/vim-airline-themes.git +[submodule "bundle/lightline.vim"] + path = bundle/lightline.vim + url = https://github.com/itchyny/lightline.vim.git +[submodule "bundle/editorconfig-vim"] + path = bundle/editorconfig-vim + url = https://github.com/editorconfig/editorconfig-vim.git diff --git a/bundle/editorconfig-vim b/bundle/editorconfig-vim new file mode 160000 index 0000000..3078cd1 --- /dev/null +++ b/bundle/editorconfig-vim @@ -0,0 +1 @@ +Subproject commit 3078cd10b28904e57d878c0d0dab42aa0a9fdc89 diff --git a/bundle/lightline.vim b/bundle/lightline.vim new file mode 160000 index 0000000..b06d921 --- /dev/null +++ b/bundle/lightline.vim @@ -0,0 +1 @@ +Subproject commit b06d921023cf6536bcbee5754071d122296e8942 diff --git a/bundle/vim-airline b/bundle/vim-airline deleted file mode 160000 index 2e29ab9..0000000 --- a/bundle/vim-airline +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2e29ab965625d1315f0ad070c928794baea3d66f diff --git a/bundle/vim-airline-themes b/bundle/vim-airline-themes deleted file mode 160000 index 97cf3e6..0000000 --- a/bundle/vim-airline-themes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256 diff --git a/vimrc b/vimrc index fa0eb59..bc5054f 100644 --- a/vimrc +++ b/vimrc @@ -6,6 +6,9 @@ execute pathogen#infect() let g:spacegray_use_italics=1 colorscheme spacegray let g:airline_theme='distinguished' +let g:lightline = { +\ 'colorscheme': 'Tomorrow_Night', +\} " custom settings set number @@ -47,8 +50,6 @@ let g:header_field_author_email='steinsset@gmail.com' let g:header_field_license_id='GNU' nmap :AddHeader -" allow project-specific configs -if filereadable("./.project.vim") - source ./.project.vim -endif +set autochdir +let g:EditorConfig_verbose=1 From d6e0993d0ab8074489133d44d68045c0e57f554a Mon Sep 17 00:00:00 2001 From: Steins7 Date: Thu, 6 Jan 2022 14:16:57 +0100 Subject: [PATCH 4/5] Added support for openscad files + added openscad syntax support --- .gitmodules | 3 +++ bundle/openscad.vim | 1 + 2 files changed, 4 insertions(+) create mode 160000 bundle/openscad.vim diff --git a/.gitmodules b/.gitmodules index 0ccfe26..da581ad 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,3 +28,6 @@ [submodule "bundle/editorconfig-vim"] path = bundle/editorconfig-vim url = https://github.com/editorconfig/editorconfig-vim.git +[submodule "bundle/openscad.vim"] + path = bundle/openscad.vim + url = https://github.com/vim-scripts/openscad.vim diff --git a/bundle/openscad.vim b/bundle/openscad.vim new file mode 160000 index 0000000..c9d4685 --- /dev/null +++ b/bundle/openscad.vim @@ -0,0 +1 @@ +Subproject commit c9d46851d57cb3cc15d30ddb0e236804cb51213b From 8985a5dbe72d0476d7a705a4a81212dfd34f6f1b Mon Sep 17 00:00:00 2001 From: Steins7 Date: Thu, 7 Apr 2022 10:48:14 +0200 Subject: [PATCH 5/5] Removed hardcoded value to use project ones * ftplugin values override project ones, removing them fix the issue --- ftplugin/c.vim | 2 -- ftplugin/cpp.vim | 2 -- ftplugin/python.vim | 1 - vimrc | 1 - 4 files changed, 6 deletions(-) diff --git a/ftplugin/c.vim b/ftplugin/c.vim index a807b07..376c017 100644 --- a/ftplugin/c.vim +++ b/ftplugin/c.vim @@ -1,5 +1,3 @@ -set colorcolumn=81 -set textwidth=80 set cino=N-s let g:cpp_attributes_highlight = 1 diff --git a/ftplugin/cpp.vim b/ftplugin/cpp.vim index a807b07..376c017 100644 --- a/ftplugin/cpp.vim +++ b/ftplugin/cpp.vim @@ -1,5 +1,3 @@ -set colorcolumn=81 -set textwidth=80 set cino=N-s let g:cpp_attributes_highlight = 1 diff --git a/ftplugin/python.vim b/ftplugin/python.vim index 63b083a..64741b0 100644 --- a/ftplugin/python.vim +++ b/ftplugin/python.vim @@ -1,4 +1,3 @@ -set colorcolumn=81 "replace tabs with spaces set expandtab diff --git a/vimrc b/vimrc index bc5054f..feefb56 100644 --- a/vimrc +++ b/vimrc @@ -51,5 +51,4 @@ let g:header_field_license_id='GNU' nmap :AddHeader set autochdir -let g:EditorConfig_verbose=1