Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
informatique:linux:vimrc_ide [2024/06/24 09:52] benoit créée |
informatique:linux:vimrc_ide [2024/06/24 10:02] (Version actuelle) admin |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | " ------------------------------------------------------------ | + | " ------------------------------------------------------------ |
- | " 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' |
- | Plugin 'cocopon/iceberg.vim' | + | Plugin 'cocopon/iceberg.vim' |
- | Plugin 'arcticicestudio/nord-vim' | + | Plugin 'arcticicestudio/nord-vim' |
- | Plugin 'sjl/badwolf' | + | Plugin 'sjl/badwolf' |
- | Plugin 'lifepillar/vim-solarized8' | + | Plugin 'lifepillar/vim-solarized8' |
- | 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 |
- | let NERDTreeShowLineNumbers = 0 | + | let NERDTreeShowLineNumbers = 0 |
- | let NERDTreeMinimalMenu = 1 | + | let NERDTreeMinimalMenu = 1 |
- | 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 } |
- | let g:ctrlsf_auto_focus = { "at": "start" } | + | let g:ctrlsf_auto_focus = { "at": "start" } |
- | let g:ctrlsf_auto_preview = 0 | + | let g:ctrlsf_auto_preview = 0 |
- | let g:ctrlsf_case_sensitive = 'smart' | + | let g:ctrlsf_case_sensitive = 'smart' |
- | let g:ctrlsf_default_view = 'normal' | + | let g:ctrlsf_default_view = 'normal' |
- | let g:ctrlsf_regex_pattern = 0 | + | let g:ctrlsf_regex_pattern = 0 |
- | let g:ctrlsf_position = 'right' | + | let g:ctrlsf_position = 'right' |
- | 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 |
- | " ------------------------------------------------------------ | + | " ------------------------------------------------------------ |
- | " | + | " |
- | " 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. |
- | " | + | " |
- | " fswitchlocs - Contains a set of directories that indicate directory names | + | " fswitchlocs - Contains a set of directories that indicate directory names |
- | " 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 |
- | set incsearch " Enable incremental search | + | set incsearch " Enable incremental search |
- | set hlsearch " Enable highlight search | + | set hlsearch " Enable highlight search |
- | set splitbelow " Always split below" | + | set splitbelow " Always split below" |
- | set mouse=a " Enable mouse drag on window splits | + | set mouse=a " Enable mouse drag on window splits |
- | set tabstop=4 " How many columns of whitespace a \t is worth | + | set tabstop=4 " How many columns of whitespace a \t is worth |
- | 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 |
- | xmap <C-F>f <Plug>CtrlSFVwordPath | + | xmap <C-F>f <Plug>CtrlSFVwordPath |
- | xmap <C-F>F <Plug>CtrlSFVwordExec | + | xmap <C-F>F <Plug>CtrlSFVwordExec |
- | nmap <C-F>n <Plug>CtrlSFCwordPath | + | nmap <C-F>n <Plug>CtrlSFCwordPath |
- | nmap <C-F>p <Plug>CtrlSFPwordPath | + | nmap <C-F>p <Plug>CtrlSFPwordPath |
- | nnoremap <C-F>o :CtrlSFOpen<CR> | + | nnoremap <C-F>o :CtrlSFOpen<CR> |
- | 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 |