Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
|
informatique:linux:vimrc_ide [2024/06/24 09:59] admin |
informatique:linux:vimrc_ide [2024/06/24 10:02] (Version actuelle) admin |
||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| " Load plugins | " Load plugins | ||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| + | | ||
| set nocompatible | set nocompatible | ||
| filetype off | filetype off | ||
| + | | ||
| " Set the runtime path to include Vundle and initialize | " Set the runtime path to include Vundle and initialize | ||
| set rtp+=~/.vim/bundle/Vundle.vim | set rtp+=~/.vim/bundle/Vundle.vim | ||
| + | | ||
| " Plugins will be downloaded under the specified directory. | " Plugins will be downloaded under the specified directory. | ||
| call vundle#begin('~/.vim/plugged') | call vundle#begin('~/.vim/plugged') | ||
| + | | ||
| " Let Vundle manage Vundle, required | " Let Vundle manage Vundle, required | ||
| Plugin 'VundleVim/Vundle.vim' | Plugin 'VundleVim/Vundle.vim' | ||
| + | | ||
| " Colorschemes | " Colorschemes | ||
| Plugin 'kristijanhusak/vim-hybrid-material' | Plugin 'kristijanhusak/vim-hybrid-material' | ||
| Ligne 23: | Ligne 23: | ||
| Plugin 'scheakur/vim-scheakur' | Plugin 'scheakur/vim-scheakur' | ||
| Plugin 'Badacadabra/vim-archery' | Plugin 'Badacadabra/vim-archery' | ||
| + | | ||
| " PloyGlot | " PloyGlot | ||
| Plugin 'sheerun/vim-polyglot' | Plugin 'sheerun/vim-polyglot' | ||
| + | | ||
| " Auto Pairs | " Auto Pairs | ||
| Plugin 'jiangmiao/auto-pairs' " Auto Pairs | Plugin 'jiangmiao/auto-pairs' " Auto Pairs | ||
| + | | ||
| " NERDTree | " NERDTree | ||
| Plugin 'preservim/nerdtree' | Plugin 'preservim/nerdtree' | ||
| + | | ||
| " Tagbar | " Tagbar | ||
| Plugin 'preservim/tagbar' | Plugin 'preservim/tagbar' | ||
| + | | ||
| " ctrlsf.vim | " ctrlsf.vim | ||
| Plugin'dyng/ctrlsf.vim' | Plugin'dyng/ctrlsf.vim' | ||
| + | | ||
| " vim-fswitch | " vim-fswitch | ||
| Plugin 'derekwyatt/vim-fswitch' | Plugin 'derekwyatt/vim-fswitch' | ||
| + | | ||
| " vim-protodef | " vim-protodef | ||
| Plugin 'derekwyatt/vim-protodef' | Plugin 'derekwyatt/vim-protodef' | ||
| + | | ||
| " List ends here. Plugins become visible to Vim after this call. | " List ends here. Plugins become visible to Vim after this call. | ||
| call vundle#end() | call vundle#end() | ||
| filetype plugin indent on | filetype plugin indent on | ||
| - | + | | |
| + | |||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| " auto-pairs configuration | " auto-pairs configuration | ||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| + | | ||
| let g:AutoPairsShortcutToggle = '<C-P>' | let g:AutoPairsShortcutToggle = '<C-P>' | ||
| - | + | | |
| + | |||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| " NERDTree configuration | " NERDTree configuration | ||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| + | | ||
| let NERDTreeShowBookmarks = 1 | let NERDTreeShowBookmarks = 1 | ||
| let NERDTreeShowHidden = 1 | let NERDTreeShowHidden = 1 | ||
| Ligne 67: | Ligne 67: | ||
| let NERDTreeWinPos = "left" | let NERDTreeWinPos = "left" | ||
| let NERDTreeWinSize = 31 | let NERDTreeWinSize = 31 | ||
| - | + | | |
| + | |||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| " tagbar configuration | " tagbar configuration | ||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| + | | ||
| let g:tagbar_autofocus = 1 | let g:tagbar_autofocus = 1 | ||
| let g:tagbar_autoshowtag = 1 | let g:tagbar_autoshowtag = 1 | ||
| let g:tagbar_position = 'botright vertical' | let g:tagbar_position = 'botright vertical' | ||
| - | + | | |
| + | |||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| " ctrlsf configuration | " ctrlsf configuration | ||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| + | | ||
| let g:ctrlsf_backend = 'ack' | let g:ctrlsf_backend = 'ack' | ||
| let g:ctrlsf_auto_close = { "normal": 0, "compact": 0 } | let g:ctrlsf_auto_close = { "normal": 0, "compact": 0 } | ||
| Ligne 92: | Ligne 92: | ||
| let g:ctrlsf_winsize = '46' | let g:ctrlsf_winsize = '46' | ||
| let g:ctrlsf_default_root = 'cwd' " projcet | let g:ctrlsf_default_root = 'cwd' " projcet | ||
| - | + | | |
| + | |||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| " fswitch configuration | " fswitch configuration | ||
| Ligne 100: | Ligne 100: | ||
| " Set fswichdst and fswitchloc variables when BufEnter event takes place | " Set fswichdst and fswitchloc variables when BufEnter event takes place | ||
| " on a file whose name matches {*.cpp}. | " on a file whose name matches {*.cpp}. | ||
| + | | ||
| au! BufEnter *.cpp let b:fswitchdst = 'hpp,h' | au! BufEnter *.cpp let b:fswitchdst = 'hpp,h' | ||
| au! BufEnter *.h let b:fswitchdst = 'cpp,c' | au! BufEnter *.h let b:fswitchdst = 'cpp,c' | ||
| + | | ||
| " fswitchdst - Denotes the files extensions that is the target extension of | " fswitchdst - Denotes the files extensions that is the target extension of | ||
| " the current file's companion file. | " the current file's companion file. | ||
| Ligne 110: | Ligne 110: | ||
| " that should be formulated when trying to find the alternate | " that should be formulated when trying to find the alternate | ||
| " file. | " file. | ||
| + | | ||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| " vim-protodef configuration | " vim-protodef configuration | ||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| + | | ||
| nmap <buffer> <silent> <leader> ,PP | nmap <buffer> <silent> <leader> ,PP | ||
| nmap <buffer> <silent> <leader> ,PN | nmap <buffer> <silent> <leader> ,PN | ||
| + | | ||
| " NOTE: This doesn't seem to disable the sorting. | " NOTE: This doesn't seem to disable the sorting. | ||
| let g:disable_protodef_sorting = 1 | let g:disable_protodef_sorting = 1 | ||
| - | + | | |
| + | |||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| " Vim configuration | " Vim configuration | ||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| + | | ||
| "set nu " Enable line numbers | "set nu " Enable line numbers | ||
| syntax on " Enable synax highlighting | syntax on " Enable synax highlighting | ||
| Ligne 135: | Ligne 135: | ||
| set shiftwidth=4 " How many columns of whitespace a “level of indentation” is worth | set shiftwidth=4 " How many columns of whitespace a “level of indentation” is worth | ||
| set expandtab " Use spaces when tabbing | set expandtab " Use spaces when tabbing | ||
| + | | ||
| if !has('nvim') | if !has('nvim') | ||
| set termwinsize=12x0 " Set terminal size | set termwinsize=12x0 " Set terminal size | ||
| endif | endif | ||
| + | | ||
| set background=dark " Set background | set background=dark " Set background | ||
| "colorscheme scheakur " Set color scheme | "colorscheme scheakur " Set color scheme | ||
| - | + | | |
| + | |||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| " Key mappings | " Key mappings | ||
| " ------------------------------------------------------------ | " ------------------------------------------------------------ | ||
| + | | ||
| " General | " General | ||
| nmap <C-B> :buffers<CR> | nmap <C-B> :buffers<CR> | ||
| nmap <C-J> :term<CR> | nmap <C-J> :term<CR> | ||
| + | | ||
| " NERDTree | " NERDTree | ||
| nmap <F2> :NERDTreeToggle<CR> | nmap <F2> :NERDTreeToggle<CR> | ||
| + | | ||
| " tagbar | " tagbar | ||
| nmap <F8> :TagbarToggle<CR> | nmap <F8> :TagbarToggle<CR> | ||
| + | | ||
| " ctrlds | " ctrlds | ||
| nmap <C-F>f <Plug>CtrlSFPrompt | nmap <C-F>f <Plug>CtrlSFPrompt | ||
| Ligne 167: | Ligne 167: | ||
| nnoremap <C-F>t :CtrlSFToggle<CR> | nnoremap <C-F>t :CtrlSFToggle<CR> | ||
| inoremap <C-F>t <Esc>:CtrlSFToggle<CR> | inoremap <C-F>t <Esc>:CtrlSFToggle<CR> | ||
| + | | ||
| " fswitch | " fswitch | ||
| nmap <C-Z> :vsplit <bar> :wincmd l <bar> :FSRight<CR> | nmap <C-Z> :vsplit <bar> :wincmd l <bar> :FSRight<CR> | ||
| + | |||
| + | set mouse=r | ||