vim: use LSP with YouCompleteMe
This commit is contained in:
parent
3ebb83ad3c
commit
e8054149ce
736
.vimrc_vundle
736
.vimrc_vundle
|
@ -1,13 +1,32 @@
|
||||||
" configuration vim + IDE
|
" _\|/_
|
||||||
" pcht 2016-2018
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | configuration vim + IDE |
|
||||||
|
" | pcht 2016-2024 |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
|
||||||
|
" utf8
|
||||||
|
set encoding=utf-8
|
||||||
|
|
||||||
" Vundle https://github.com/VundleVim/Vundle.vim
|
|
||||||
" install with :
|
|
||||||
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
|
||||||
" set nocompatible be iMproved, required - Isnt it automatic with .vimrc??
|
|
||||||
filetype off " required
|
filetype off " required
|
||||||
|
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | Vundle |
|
||||||
|
" | |
|
||||||
|
" |https://github.com/VundleVim/Vundle.vim |
|
||||||
|
" |install with : |
|
||||||
|
" | git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim|
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
"
|
||||||
|
|
||||||
" 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
|
||||||
call vundle#begin()
|
call vundle#begin()
|
||||||
|
@ -15,48 +34,319 @@ call vundle#begin()
|
||||||
" let Vundle manage Vundle, required
|
" let Vundle manage Vundle, required
|
||||||
Plugin 'VundleVim/Vundle.vim'
|
Plugin 'VundleVim/Vundle.vim'
|
||||||
|
|
||||||
|
" git
|
||||||
Plugin 'tpope/vim-fugitive'
|
Plugin 'tpope/vim-fugitive'
|
||||||
Plugin 'commentary.vim'
|
|
||||||
|
" commentary
|
||||||
|
Plugin 'tpope/vim-commentary'
|
||||||
|
xmap \\ <Plug>Commentary
|
||||||
|
nmap \\ <Plug>Commentary
|
||||||
|
nmap \\\ <Plug>CommentaryLine
|
||||||
|
nmap \\u <Plug>CommentaryUndo
|
||||||
|
|
||||||
" Plugin 'Syntastic'
|
" Plugin 'Syntastic'
|
||||||
Plugin 'ctrlpvim/ctrlp.vim'
|
" set statusline+=%#warningmsg#
|
||||||
|
" set statusline+=%{SyntasticStatuslineFlag()}
|
||||||
|
" set statusline+=%*
|
||||||
|
|
||||||
|
" let g:syntastic_always_populate_loc_list = 1
|
||||||
|
" let g:syntastic_auto_loc_list = 1
|
||||||
|
" let g:syntastic_check_on_open = 1
|
||||||
|
" let g:syntastic_check_on_wq = 0
|
||||||
|
" let g:syntastic_auto_jump = 2
|
||||||
|
|
||||||
|
|
||||||
|
" Plugin 'ctrlpvim/ctrlp.vim'
|
||||||
Plugin 'tpope/vim-surround'
|
Plugin 'tpope/vim-surround'
|
||||||
Plugin 'tpope/vim-repeat'
|
Plugin 'tpope/vim-repeat'
|
||||||
|
|
||||||
Plugin 'ciscoacl.vim'
|
" unicode characters
|
||||||
|
" :h unicode-plugin
|
||||||
|
" map:
|
||||||
|
" c-x c-z: complete unicode char
|
||||||
|
" c-x c-g: complete unicode digraph
|
||||||
|
Plugin 'chrisbra/unicode.vim'
|
||||||
|
|
||||||
" https://github.com/dhruvasagar/vim-table-mode
|
|
||||||
Plugin 'dhruvasagar/vim-table-mode'
|
|
||||||
|
|
||||||
" language
|
" _\|/_
|
||||||
" Plugin 'octol/vim-cpp-enhanced-highlight'
|
" (o o)
|
||||||
" C++ http://www.vim.org/scripts/script.php?script_id=3302
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
" install with vim clang_complete.vmb -c 'so %' -c 'q'
|
" | |
|
||||||
" GLSL
|
" | LSP vim client |
|
||||||
Plugin 'tikhomirov/vim-glsl'
|
" | ALE (Asynchronous Lint Engine) |
|
||||||
" Plugin 'rust-lang/rust.vim'
|
" | https://github.com/dense-analysis/ale |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
" Plugin 'dense-analysis/ale'
|
||||||
|
|
||||||
Plugin 'ElmCast/elm-vim'
|
" let g:ale_linters = {
|
||||||
|
" \ 'sh': ['shellcheck'],
|
||||||
|
" \ 'py': ['flake8'],
|
||||||
|
" \}
|
||||||
|
|
||||||
" https://valloric.github.io/YouCompleteMe/
|
" " flake8 ignore
|
||||||
|
" let g:ale_python_flake8_options = '--ignore=E501'
|
||||||
|
|
||||||
|
" let g:ale_fixers = {
|
||||||
|
" \ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||||
|
" \}
|
||||||
|
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | LSP vim client |
|
||||||
|
" | YouCompleteMe |
|
||||||
|
" | https://valloric.github.io/YouCompleteMe/ |
|
||||||
|
" | |
|
||||||
|
" | Install: |
|
||||||
|
" | https://github.com/ycm-core/YouCompleteMe?tab=readme-ov-file#linux-64-bit|
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
Plugin 'Valloric/YouCompleteMe'
|
Plugin 'Valloric/YouCompleteMe'
|
||||||
|
|
||||||
" KSP script syntax
|
let g:ycm_language_server = []
|
||||||
Plugin 'KSP-KOS/EditorTools', {'rtp': 'VIM/vim-kerboscript'}
|
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | Language Server Protocol LSP |
|
||||||
|
" | https://langserver.org/ |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
|
||||||
|
" Archlinux
|
||||||
|
" https://github.com/hashicorp/terraform-ls
|
||||||
|
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | bash-language-server |
|
||||||
|
" | https://github.com/bash-lsp/bash-language-server |
|
||||||
|
" | |
|
||||||
|
" | install: |
|
||||||
|
" | npm i -g bash-language-server |
|
||||||
|
" | test: |
|
||||||
|
" | bash-language-server --help |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
let g:ycm_language_server +=
|
||||||
|
\ [
|
||||||
|
\ {
|
||||||
|
\ 'name': 'bash',
|
||||||
|
\ 'cmdline': [ 'bash-language-server', 'start' ],
|
||||||
|
\ 'filetypes': [ 'sh' ],
|
||||||
|
\ }
|
||||||
|
\ ]
|
||||||
|
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | dockerfile-language-server |
|
||||||
|
" | https://github.com/rcjsuen/dockerfile-language-server |
|
||||||
|
" | |
|
||||||
|
" | install: |
|
||||||
|
" | npm install -g dockerfile-language-server-nodejs |
|
||||||
|
" | test: |
|
||||||
|
" | ?? |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
let g:ycm_language_server +=
|
||||||
|
\ [ { 'name': 'docker',
|
||||||
|
\ 'filetypes': [ 'dockerfile' ],
|
||||||
|
\ 'cmdline': [ '/home/patrick/.npm-packages/bin/docker-langserver --stdio' ],
|
||||||
|
\ },
|
||||||
|
\ ]
|
||||||
|
|
||||||
|
" vim-language-server
|
||||||
|
" https://github.com/iamcco/vim-language-server
|
||||||
|
|
||||||
|
" install:
|
||||||
|
" npm install -g vim-language-server
|
||||||
|
"
|
||||||
|
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | reStructuredText |
|
||||||
|
" | https://github.com/swyddfa/esbonio/tree/develop/lib/esbonio |
|
||||||
|
" | |
|
||||||
|
" | install: |
|
||||||
|
" | pipx install esbonio |
|
||||||
|
" | sudo pacman -Ss esbonio |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
let g:ycm_language_server +=
|
||||||
|
\ [ { 'name': 'esbonio',
|
||||||
|
\ 'filetypes': [ 'rst' ],
|
||||||
|
\ 'cmdline': [ 'esbonio' ],
|
||||||
|
\ },
|
||||||
|
\ ]
|
||||||
|
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | Terraform |
|
||||||
|
" | https://github.com/hashicorp/terraform-ls |
|
||||||
|
" | |
|
||||||
|
" | install: |
|
||||||
|
" | https://github.com/hashicorp/terraform-ls |
|
||||||
|
" | AUR: https://aur.archlinux.org/terraform-ls.git |
|
||||||
|
" | |
|
||||||
|
" | test: |
|
||||||
|
" | terraform-ls version |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
let g:ycm_language_server +=
|
||||||
|
\ [ { 'name': 'terraform-ls',
|
||||||
|
\ 'filetypes': [ "ts", "terraform", "terraform-vars" ],
|
||||||
|
\ 'cmdline': [ 'terraform-ls', 'serve' ],
|
||||||
|
\ },
|
||||||
|
\ ]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""
|
||||||
|
" languages autocompletion
|
||||||
|
|
||||||
|
" toml
|
||||||
|
" Plugin 'cespare/vim-toml'
|
||||||
|
|
||||||
|
" COC https://github.com/neoclide/coc.nvim
|
||||||
|
" Use release branch (recommend)
|
||||||
|
" Plugin 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
|
" Or build from source code by using yarn: https://yarnpkg.com
|
||||||
|
" Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
|
||||||
|
|
||||||
|
" tabNine https://www.tabnine.com/
|
||||||
|
" online deeplearning all language sementic completion system
|
||||||
|
" Plugin 'zxqfl/tabnine-vim'
|
||||||
|
|
||||||
|
" ansible
|
||||||
|
" Plugin 'pearofducks/ansible-vim'
|
||||||
|
" enable YAML for hosts.yml
|
||||||
|
" autocmd BufNewFile,BufRead hosts.y[a]ml setfiletype yaml.ansible
|
||||||
|
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | language server |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
" languages
|
||||||
|
" Plugin 'octol/vim-cpp-enhanced-highlight'
|
||||||
|
"
|
||||||
|
" C++ http://www.vim.org/scripts/script.php?script_id=3302
|
||||||
|
" install with vim clang_complete.vmb -c 'so %' -c 'q'
|
||||||
|
"
|
||||||
|
" GLSL
|
||||||
|
" Plugin 'tikhomirov/vim-glsl'
|
||||||
|
|
||||||
|
" rust
|
||||||
|
" Plugin 'rust-lang/rust.vim'
|
||||||
|
|
||||||
|
" golang
|
||||||
|
" require Vim 8.0.1453
|
||||||
|
Plugin 'fatih/vim-go'
|
||||||
|
au FileType go nmap <leader>m <Plug>(go-test)
|
||||||
|
au FileType go nmap <leader>a :GoAlternate<cr>
|
||||||
|
au FileType go nmap gd <Plug>(go-def)
|
||||||
|
au FileType go set foldmethod=syntax
|
||||||
|
|
||||||
|
" :Refactor extract newfunc
|
||||||
|
" Plugin 'godoctor/godoctor.vim'
|
||||||
|
|
||||||
|
" elm ElmCast https://guide.elm-lang.org/
|
||||||
|
" Plugin 'ElmCast/elm-vim'
|
||||||
|
|
||||||
|
" ksp/kos script syntax
|
||||||
|
" Plugin 'KSP-KOS/EditorTools', {'rtp': 'VIM/vim-kerboscript'}
|
||||||
|
" kerboscript comment
|
||||||
|
" or
|
||||||
|
" Plugin 'Freedzone/kerbovim'
|
||||||
|
" autocmd FileType kerboscript setlocal commentstring=//\ %s
|
||||||
|
|
||||||
|
|
||||||
|
" terraform
|
||||||
|
Plugin 'hashivim/vim-terraform'
|
||||||
|
let g:terraform_align=1
|
||||||
|
" let g:terraform_fold_sections=1
|
||||||
|
let g:terraform_fmt_on_save=1
|
||||||
|
" let g:terraform_binary_path="/usr/local/Cellar/terraform/0.13.5/bin/terraform"
|
||||||
|
|
||||||
|
" screeps.com game
|
||||||
|
" Plugin 'dbaileychess/vim-screeps'
|
||||||
|
|
||||||
|
" python - hand-made
|
||||||
|
" from https://vim.fandom.com/wiki/Python_-_check_syntax_and_run_script
|
||||||
|
" autocmd BufRead *.py set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"""""""
|
||||||
|
" tools
|
||||||
|
" https://github.com/dhruvasagar/vim-table-mode
|
||||||
|
" activation: \tm
|
||||||
|
" add sep : ||
|
||||||
|
" add line : | blabla | blibli |
|
||||||
|
" realign : \tr
|
||||||
|
Plugin 'dhruvasagar/vim-table-mode'
|
||||||
|
let g:table_mode_corner_corner='+'
|
||||||
|
let g:table_mode_header_fillchar='='
|
||||||
|
nmap <leader>tm <esc>:TableModeToggle<cr>
|
||||||
|
imap <leader>tm <esc>:TableModeToggle<cr>i
|
||||||
|
|
||||||
|
" vim-shellcheck
|
||||||
|
" map:
|
||||||
|
" \m to launch Shellcheck
|
||||||
|
" gb to see SCxxx in browser
|
||||||
|
Plugin 'itspriddle/vim-shellcheck'
|
||||||
|
au FileType sh compiler shellcheck
|
||||||
|
au FileType sh nmap <leader>m :ShellCheck!<cr>
|
||||||
|
au FileType sh imap <leader>m <esc>:ShellCheck!<cr>i
|
||||||
|
|
||||||
|
|
||||||
" All of your Plugins must be added before the following line
|
" All of your Plugins must be added before the following line
|
||||||
call vundle#end() " required
|
call vundle#end() " required
|
||||||
filetype plugin indent on " required
|
filetype plugin indent on " required
|
||||||
|
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | end Vundle |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
|
||||||
" syntax
|
" syntax
|
||||||
syntax on
|
syntax on
|
||||||
|
|
||||||
" colorscheme default
|
" colorscheme default
|
||||||
colorscheme elflord
|
colorscheme pcht
|
||||||
|
|
||||||
" print code with :hardcopy using impression.lam.jussieu.fr
|
" print code with :hardcopy using impression.lam.jussieu.fr
|
||||||
set printdevice=hp5550-509
|
" set printdevice=hp5550-509
|
||||||
set printoptions=left:5pt,right:5pt,top:5pt,bottom:5pt,number:y,duplex:off,wrap:y,paper:A4,portrait:y
|
" set printoptions=left:5pt,right:5pt,top:5pt,bottom:5pt,number:y,duplex:off,wrap:y,paper:A4,portrait:y
|
||||||
set printheader=%<%F\ -\ page\ %N%=Print\ at\ %{strftime(\'%Y-%m-%d\ %H:%M\')}
|
" set printheader=%<%F\ -\ page\ %N%=Print\ at\ %{strftime(\'%Y-%m-%d\ %H:%M\')}
|
||||||
" FIXME set printfont=:h18
|
" FIXME set printfont=:h18
|
||||||
|
|
||||||
" modeline : enable « vim:<space> [ vim_set ] + »
|
" modeline : enable « vim:<space> [ vim_set ] + »
|
||||||
|
@ -65,30 +355,45 @@ set modeline
|
||||||
" set backspace normal
|
" set backspace normal
|
||||||
set backspace=2
|
set backspace=2
|
||||||
|
|
||||||
" no wrap -- yes i like wrapping
|
" _\|/_
|
||||||
" set nowrap
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
"""""""""""""""""""
|
" | |
|
||||||
" ligne de statut
|
" | ligne de statut |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
set statusline=%F%m%r%h%w\ %{fugitive#statusline()}%=[BUF=%n][FORMAT=%{&ff}][TYPE=%Y][ASCII=%03.3b][LINE=%03l][COL=%03v][%p%%]
|
set statusline=%F%m%r%h%w\ %{fugitive#statusline()}%=[BUF=%n][FORMAT=%{&ff}][TYPE=%Y][ASCII=%03.3b][LINE=%03l][COL=%03v][%p%%]
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
|
||||||
|
|
||||||
"""""""""""""""""""
|
"""""""""""""""""""
|
||||||
" affiche les touches en mode commande
|
" affiche les touches en mode commande
|
||||||
set showcmd
|
set showcmd
|
||||||
|
|
||||||
"""""""""""""""""""
|
" _\|/_
|
||||||
" numéro de ligne
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | numéro de ligne |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
set number
|
set number
|
||||||
highlight LineNr ctermbg=black ctermfg=gray
|
highlight LineNr ctermbg=black ctermfg=gray
|
||||||
|
|
||||||
"""""""""""""""""""
|
"""""""""""""""""""
|
||||||
" ligne et colonne courante: activation en mode insert et pas en mode normal
|
" ligne et colonne courante: activation en mode insert et pas en mode normal
|
||||||
:autocmd InsertEnter,InsertLeave * set cursorline! cursorcolumn!
|
" :autocmd InsertEnter,InsertLeave * set cursorline! cursorcolumn!
|
||||||
|
" highlight CursorLine term=underline cterm=underline
|
||||||
|
" set cursorcolumn cursorline
|
||||||
|
" " highlight CursorColumn term=none cterm=none ctermbg=grey ctermfg=black
|
||||||
|
" highlight CursorColumn term=underline cterm=underline
|
||||||
|
"""""""""""""""""""
|
||||||
|
" ligne courante: activation en mode insert et pas en mode normal
|
||||||
|
:autocmd InsertEnter,InsertLeave * set cursorline!
|
||||||
|
set cursorline
|
||||||
highlight CursorLine term=underline cterm=underline
|
highlight CursorLine term=underline cterm=underline
|
||||||
set cursorcolumn cursorline
|
|
||||||
" highlight CursorColumn term=none cterm=none ctermbg=grey ctermfg=black
|
|
||||||
highlight CursorColumn term=underline cterm=underline
|
|
||||||
|
|
||||||
"""""""""""""""""""
|
"""""""""""""""""""
|
||||||
" Search/IncSearch
|
" Search/IncSearch
|
||||||
|
@ -97,84 +402,121 @@ highlight Search term=reverse,bold cterm=reverse,bold ctermfg=None ctermbg=None
|
||||||
set incsearch
|
set incsearch
|
||||||
highlight IncSearch term=reverse cterm=reverse ctermfg=None ctermbg=None
|
highlight IncSearch term=reverse cterm=reverse ctermfg=None ctermbg=None
|
||||||
|
|
||||||
"""""""""""""""""""
|
" /lemot : insensible a la case
|
||||||
" tab/eof as characters
|
" /LeMot : sensible
|
||||||
" https://vi.stackexchange.com/questions/422/displaying-tabs-as-characters
|
" /\clemot : insensible
|
||||||
" dans vim, uriliser Ctrl-v + u + code utf8
|
" /\CleMot : sensible
|
||||||
" code : https://codepoints.net/control_pictures
|
set smartcase
|
||||||
" tab : ␉ (U+2409 - SYMBOL FOR HORIZONTAL TABULATION)
|
|
||||||
" : ˍ (U+02cd - MODIFIER LETTER LOW MACRON)
|
|
||||||
" : ․ (U+2024 - ONE DOT LEADER)
|
" _\|/_
|
||||||
" : • (U+2022 - BULLET)
|
" (o o)
|
||||||
" eol : ¶ (U+00b6 - PILCROW SIGN)
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
" trail : ␠ (U+2420 - SYMBOL FOR SPACE)
|
" | |
|
||||||
" : ␣ (U+2423 - OPEN BOX)
|
" | tab/eof as characters |
|
||||||
"
|
" | |
|
||||||
|
" | https://vi.stackexchange.com/questions/422/displaying-tabs-as-characters |
|
||||||
|
" | dans vim, utiliser Ctrl-v + u + code utf8 |
|
||||||
|
" | code : https://codepoints.net/control_pictures |
|
||||||
|
" | tab : ␉ (U+2409 - SYMBOL FOR HORIZONTAL TABULATION) |
|
||||||
|
" | : ˍ (U+02cd - MODIFIER LETTER LOW MACRON) |
|
||||||
|
" | : ․ (U+2024 - ONE DOT LEADER) |
|
||||||
|
" | : • (U+2022 - BULLET) |
|
||||||
|
" | eol : ¶ (U+00b6 - PILCROW SIGN) |
|
||||||
|
" | trail : ␠ (U+2420 - SYMBOL FOR SPACE) |
|
||||||
|
" | : ␣ (U+2423 - OPEN BOX) |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
set list
|
set list
|
||||||
set listchars=tab:␉․,trail:␠,nbsp:⎵,precedes:<,extends:>
|
set listchars=tab:␉․,trail:␠,nbsp:⎵,precedes:<,extends:>,eol:¶
|
||||||
" listchars as grey
|
" listchars as grey
|
||||||
highlight SpecialKey ctermfg=DarkGrey
|
highlight SpecialKey ctermfg=DarkGrey
|
||||||
highlight NonText ctermfg=DarkGrey
|
highlight NonText ctermfg=DarkGrey
|
||||||
nmap <Leader>l <Esc>:set invlist<cr>
|
nmap <leader>l <esc>:set invlist<cr>
|
||||||
imap <Leader>l <Esc>:set invlist<cr>li
|
imap <leader>l <esc>:set invlist<cr>li
|
||||||
|
" disable by default
|
||||||
|
set invlist
|
||||||
|
|
||||||
|
|
||||||
"""""""""""""""""""
|
" _\|/_
|
||||||
" autoindent
|
" (o o)
|
||||||
" set autoindent
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
" tabulation
|
" | |
|
||||||
" set expandtab
|
" | autoindent |
|
||||||
" set shiftwidth=4
|
" | |
|
||||||
" set softtabstop=4
|
" | set autoindent |
|
||||||
" set tabstop=4
|
" | tabulation |
|
||||||
|
" | set expandtab |
|
||||||
|
" | set shiftwidth=4 |
|
||||||
|
" | set softtabstop=4 |
|
||||||
|
" | set tabstop=4 |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
|
||||||
"" replis de code <fold>
|
" replis de code <fold>
|
||||||
"" <n>zf pour créer un repli
|
" <n>zf pour créer un repli
|
||||||
"" za pour ouvrir/fermer un repli déjà crée
|
" za pour ouvrir/fermer un repli déjà crée
|
||||||
"" zm pour fermer tous les replis
|
" zm pour fermer tous les replis
|
||||||
"" zr pour ouvrir tous les replis
|
" zr pour ouvrir tous les replis
|
||||||
" function! MyFoldFunction ()
|
" function! MyFoldFunction ()
|
||||||
" let line = getline(v:foldstart)
|
" let line = getline(v:foldstart)
|
||||||
" let sub = substitute(line,'/\*\|\*/\|^\s+','','g')
|
" let sub = substitute(line,'/\*\|\*/\|^\s+','','g')
|
||||||
" let lines = v:foldend - v:foldstart + 1
|
" let lines = v:foldend - v:foldstart + 1
|
||||||
" return '[+] ' . v:folddashes.sub . '...' . lines . ' lignes...' . getline(v:foldend)
|
" return '[+] ' . v:folddashes.sub . '...' . lines . ' lignes...' . getline(v:foldend)
|
||||||
" endfunction
|
" endfunction
|
||||||
set foldenable
|
|
||||||
set foldlevel=1000
|
set nofoldenable
|
||||||
|
set foldlevel=3
|
||||||
"" afficher un = sur les replis
|
"" afficher un = sur les replis
|
||||||
" set fillchars=fold:=
|
" set fillchars=fold:=
|
||||||
" set foldtext=MyFoldFunction()
|
" set foldtext=MyFoldFunction()
|
||||||
|
|
||||||
"""""""""""""""""""
|
" _\|/_
|
||||||
" les onglets
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | les onglets |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
|
||||||
" tabe <file> créer un onglet
|
" tabe <file> créer un onglet
|
||||||
"function! MoveTab(direction)
|
" function! MoveTab(direction)
|
||||||
" if (a:direction == 'left')
|
" if (a:direction == 'left')
|
||||||
" let tabnum = tabpagenr()-2
|
" let tabnum = tabpagenr()-2
|
||||||
" if (tabnum < 0)
|
" if (tabnum < 0)
|
||||||
" let tabnum = 0
|
" let tabnum = 0
|
||||||
" endif
|
" endif
|
||||||
" execute 'tabm '.tabnum
|
" execute 'tabm '.tabnum
|
||||||
" else
|
" else
|
||||||
" let tabnum = tabpagenr()
|
" let tabnum = tabpagenr()
|
||||||
" execute 'tabm '.tabnum
|
" execute 'tabm '.tabnum
|
||||||
" endif
|
" endif
|
||||||
"endfunction
|
" endfunction
|
||||||
"highlight TabLine term=none cterm=none
|
highlight TabLine term=none cterm=none
|
||||||
"highlight TabLineSel ctermbg=darkblue
|
highlight TabLineSel ctermbg=darkblue
|
||||||
" raccourcis
|
" raccourcis
|
||||||
" gF ouvre un onglet sur le mot sous le cursor
|
" gF ouvre un onglet sur le mot sous le cursor
|
||||||
"map <C-LEFT> <ESC>:tabprevious<CR>
|
map <C-h> <esc>:tabprevious<cr>
|
||||||
"map <C-RIGHT> <ESC>:tabnext<CR>
|
map <C-left> <esc>:tabprevious<cr>
|
||||||
|
map <C-l> <esc>:tabnext<cr>
|
||||||
|
map <C-right> <esc>:tabnext<cr>
|
||||||
|
|
||||||
|
|
||||||
"""""""""""""""""""
|
" _\|/_
|
||||||
" correcteur orthographique
|
" (o o)
|
||||||
" utilisation
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
" <]+s>, <[+s>: aller a l'erreur precedente, suivante
|
" | |
|
||||||
|
" | correcteur orthographique |
|
||||||
|
" | utilisation |
|
||||||
|
" | <]+s>, <[+s>: aller a l'erreur precedente, suivante |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
|
||||||
"setlocal spell spelllang=fr,en
|
setlocal spell spelllang=fr,en
|
||||||
setlocal spell spelllang=en_us,fr
|
" setlocal spell spelllang=en_us,fr
|
||||||
|
set spell
|
||||||
highlight SpellBad term=underline ctermfg=white ctermbg=red cterm=underline
|
highlight SpellBad term=underline ctermfg=white ctermbg=red cterm=underline
|
||||||
highlight SpellCap term=italic,underline ctermfg=yellow ctermbg=red cterm=underline
|
highlight SpellCap term=italic,underline ctermfg=yellow ctermbg=red cterm=underline
|
||||||
highlight SpellRare term=bold,italic,underline ctermfg=cyan ctermbg=red cterm=underline
|
highlight SpellRare term=bold,italic,underline ctermfg=cyan ctermbg=red cterm=underline
|
||||||
|
@ -182,8 +524,14 @@ highlight SpellLocal term=underline ctermfg=grey ctermbg=red cterm=underline
|
||||||
highlight SpellErrors term=italic,underline ctermbg=red ctermfg=white
|
highlight SpellErrors term=italic,underline ctermbg=red ctermfg=white
|
||||||
|
|
||||||
|
|
||||||
""""""""""""""""""
|
" _\|/_
|
||||||
" ouverture du fichier à l'ancienne position
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | ouverture du fichier à l'ancienne position |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
function! s:CursorOldPosition()
|
function! s:CursorOldPosition()
|
||||||
if line("'\"") > 0 && line("'\"") <= line("$")
|
if line("'\"") > 0 && line("'\"") <= line("$")
|
||||||
exe "normal g`\""
|
exe "normal g`\""
|
||||||
|
@ -191,25 +539,14 @@ function! s:CursorOldPosition()
|
||||||
endfunction
|
endfunction
|
||||||
autocmd BufReadPost * silent! call s:CursorOldPosition()
|
autocmd BufReadPost * silent! call s:CursorOldPosition()
|
||||||
|
|
||||||
" """""""""""""""""""
|
" _\|/_
|
||||||
" " autocompletion
|
" (o o)
|
||||||
" " <Ctrl+x><Ctrl+n> autocompletion direct (nom dans le fichier courant)
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
" " <Ctrl+x><Ctrl+k> autocompletion dictionnaire (dictionnaire perso ou fichier syntax/<ext>.vim)
|
" | |
|
||||||
" " autocmd FileType * exec('setlocal dict+='.$VIMRUNTIME.'/syntax/'.expand('<amatch>').'.vim')
|
" | templates |
|
||||||
" function! MultiCompletion()
|
" | |
|
||||||
" if &omnifunc != ''
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
" return "\<C-x>\<C-o>"
|
" (_) (_)
|
||||||
" elseif &dictionary != ''
|
|
||||||
" return "\<C-x>\<C-k>"
|
|
||||||
" else
|
|
||||||
" return "\<C-x>\<C-n>"
|
|
||||||
" endif
|
|
||||||
" endfunction
|
|
||||||
" " map <S-TAB> <C-r>=MultiCompletion()<CR>
|
|
||||||
" map <c-o> <C-r>=MultiCompletion()<CR>
|
|
||||||
|
|
||||||
"""""""""""""""""""
|
|
||||||
" templates
|
|
||||||
function! LoadTemplate(extension,type)
|
function! LoadTemplate(extension,type)
|
||||||
if (a:type == 'all')
|
if (a:type == 'all')
|
||||||
silent! execute '0r' . $HOME . '/.vim/__tpl/' . a:extension . '.tpl'
|
silent! execute '0r' . $HOME . '/.vim/__tpl/' . a:extension . '.tpl'
|
||||||
|
@ -245,42 +582,29 @@ augroup filetype
|
||||||
au! BufRead,BufNewFile *.md set filetype=markdown
|
au! BufRead,BufNewFile *.md set filetype=markdown
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" kerboscript comment
|
|
||||||
autocmd FileType kerboscript setlocal commentstring=//\ %s
|
|
||||||
|
|
||||||
"" UltiSnips https://github.com/sirver/ultisnips
|
|
||||||
"" Activate snipMate snippers (disable by default)
|
|
||||||
" let g:UltiSnips = {}
|
|
||||||
" let g:UltiSnips.snipmate_ft_filter = { 'default' : {'filetypes': ['_', 'FILETYPE'] } }
|
|
||||||
" use python 2
|
|
||||||
" let g:UltiSnipsUsePythonVersion = 2
|
|
||||||
"" change key binding
|
|
||||||
" let g:UltiSnipsExpandTrigger="<tab>"
|
|
||||||
" let g:UltiSnipsJumpForwardTrigger="<tab>"
|
|
||||||
" let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
|
|
||||||
" let g:UltiSnipsListSnippets="<c-l>"
|
|
||||||
" If you want :UltiSnipsEdit to split your window.
|
|
||||||
" let g:UltiSnipsEditSplit="vertical"
|
|
||||||
|
|
||||||
" let g:snips_author = 'Patrick CAO HUU THIEN'
|
" _\|/_
|
||||||
" let g:UltiSnips.ExpandTrigger="<tab>"
|
" (o o)
|
||||||
" let g:UltiSnips.JumpForwardTrigger="<tab>"
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
" let g:UltiSnips.JumpBackwardTrigger="<s-tab>"
|
" | |
|
||||||
" let g:UltiSnips.ListSnippets="<c-tab>"
|
" | boxes tool to pretty print code |
|
||||||
|
" | from https://boxes.thomasjensen.com/docs/install.html |
|
||||||
"" numbers-vim
|
" | |
|
||||||
" nnoremap <F3> :NumbersToggle<CR>
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
" syntastic
|
autocmd BufEnter * nmap <leader>bb !!boxes -d shell -s 80<CR>
|
||||||
" set statusline+=%#warningmsg#
|
autocmd BufEnter * vmap <leader>bb !boxes -d shell -s 80<CR>
|
||||||
" set statusline+=%{SyntasticStatuslineFlag()}
|
autocmd BufEnter * nmap <leader>BB !!boxes -d shell -s 80 -r<CR>
|
||||||
" set statusline+=%*
|
autocmd BufEnter * vmap <leader>BB !boxes -d shell -s 80 -r<CR>
|
||||||
|
autocmd BufEnter *.go,*.java nmap <leader>bb !!boxes -d cpp -s 80<CR>
|
||||||
" let g:syntastic_always_populate_loc_list = 1
|
autocmd BufEnter *.go,*.java vmap <leader>bb !boxes -d cpp -s 80<CR>
|
||||||
" let g:syntastic_auto_loc_list = 1
|
autocmd BufEnter *.go,*.java nmap <leader>BB !!boxes -d cpp -s 80 -r<CR>
|
||||||
" let g:syntastic_check_on_open = 1
|
autocmd BufEnter *.go,*.java vmap <leader>BB !boxes -d cpp -s 80 -r<CR>
|
||||||
" let g:syntastic_check_on_wq = 0
|
autocmd BufEnter .vimrc* nmap <leader>bb !!boxes -d vim -s 80<CR>
|
||||||
" let g:syntastic_auto_jump = 2
|
autocmd BufEnter .vimrc* vmap <leader>bb !boxes -d vim -s 80<CR>
|
||||||
|
autocmd BufEnter .vimrc* nmap <leader>BB !!boxes -dvim -s 80 -r<CR>
|
||||||
|
autocmd BufEnter .vimrc* vmap <leader>BB !boxes -d vim -s 80 -r<CR>
|
||||||
|
|
||||||
" Search down into subfolders
|
" Search down into subfolders
|
||||||
" Provides tab-completion for all file-related tasks
|
" Provides tab-completion for all file-related tasks
|
||||||
|
@ -289,53 +613,83 @@ set path+=**
|
||||||
" Display all matching files when we tab complete
|
" Display all matching files when we tab complete
|
||||||
set wildmenu
|
set wildmenu
|
||||||
|
|
||||||
""" keymaps
|
" formatoptions
|
||||||
|
set formatoptions=tcpr
|
||||||
|
|
||||||
|
" tab and spaces
|
||||||
|
" see http://vimcasts.org/episodes/tabs-and-spaces/
|
||||||
|
" set ts=4 sts=4 sw=4 noet
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set noexpandtab
|
||||||
|
|
||||||
|
" keep center
|
||||||
|
set scrolloff=999
|
||||||
|
" _\|/_
|
||||||
|
" (o o)
|
||||||
|
" <~~~~~~oOO-{_}-OOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" | |
|
||||||
|
" | keymaps |
|
||||||
|
" | |
|
||||||
|
" <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
|
||||||
|
" (_) (_)
|
||||||
|
|
||||||
" no arrows keys no more
|
" no arrows keys no more
|
||||||
nmap <Left> <Nop>
|
nmap <left> <nop>
|
||||||
nmap <Right> <Nop>
|
nmap <right> <nop>
|
||||||
nmap <Up> <Nop>
|
nmap <up> <nop>
|
||||||
nmap <Down> <Nop>
|
nmap <down> <nop>
|
||||||
" imap <Left> <Np>
|
|
||||||
" imap <Right> <Nop>
|
|
||||||
" imap <Up> <Nop>
|
|
||||||
" imap <Down> <Nop>
|
|
||||||
|
|
||||||
" Esc remap
|
" Esc remap
|
||||||
imap jj <Esc>
|
imap jj <esc>
|
||||||
imap kk <Esc>
|
imap kk <esc>
|
||||||
" map caps-lock with Xvindow
|
|
||||||
" au VimEnter * silent! !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
|
|
||||||
" au VimLeave * !xmodmap -e 'clear Lock' -e 'keycode 0x42 = Caps_Lock'
|
|
||||||
|
|
||||||
" moves
|
" moves
|
||||||
nmap K <C-u>
|
" nmap K <C-u>
|
||||||
nmap J <C-d>
|
" nmap J <C-d>
|
||||||
|
|
||||||
|
" search next/previous with center view
|
||||||
|
" no need with scrolloff=99
|
||||||
|
" nmap n nzz
|
||||||
|
" nmap N Nzz
|
||||||
|
|
||||||
|
" always open file even new one
|
||||||
|
nmap gf :e <cfile><cr>
|
||||||
|
|
||||||
|
" increase / decrease
|
||||||
|
:nnoremap <A-a> <C-a>
|
||||||
|
:nnoremap <A-x> <C-x>
|
||||||
|
|
||||||
" speed up
|
" speed up
|
||||||
" edit .vimrc
|
" edit .vimrc
|
||||||
nmap <Leader>v :vs ~/.vimrc<Cr>
|
nmap <leader>v :vs ~/.vimrc<cr>
|
||||||
imap <Leader>v <Esc>:vs ~/.vimrc<Cr>i
|
imap <leader>v <esc>:vs ~/.vimrc<cr>i
|
||||||
" source .vimrc
|
nmap <leader>V :source ~/.vimrc<cr>
|
||||||
nmap <Leader>V :source ~/.vimrc<Cr>
|
" see file
|
||||||
" quick save
|
imap <leader>s <esc>:!see %<cr>i
|
||||||
imap <Leader>s <Esc>:w<Cr>i
|
nmap <leader>s :!see %<cr>
|
||||||
nmap <Leader>s :w<Cr>
|
|
||||||
" html + php
|
" html + php
|
||||||
nmap <Leader>h :set ft=html<Cr>
|
" nmap <leader>h :set ft=html<cr>
|
||||||
imap <Leader>h <esc>:set ft=html<Cr>i
|
" imap <leader>h <esc>:set ft=html<cr>i
|
||||||
nmap <Leader>p :set ft=php<Cr>
|
" nmap <leader>p :set ft=php<cr>
|
||||||
imap <Leader>p <esc>:set ft=php<Cr>i
|
" imap <leader>p <esc>:set ft=php<cr>i
|
||||||
" make
|
" make
|
||||||
nmap <Leader>m :w<cr>:!clear<cr>:make<cr>
|
nmap <leader>m :w<cr>:!clear<cr>:make<cr>
|
||||||
imap <Leader>m <esc>:w<cr>:!clear<cr>:make<cr>
|
imap <leader>m <esc>:w<cr>:!clear<cr>:make<cr>
|
||||||
|
nmap <leader>t :w<cr>:!clear<cr>:make test<cr>
|
||||||
|
imap <leader>t <esc>:w<cr>:!clear<cr>:make test<cr>
|
||||||
|
nmap <leader>, :cprevious<cr>
|
||||||
|
imap <leader>, <esc>:cprevious<cr>i
|
||||||
|
nmap <leader>. :cnext<cr>
|
||||||
|
imap <leader>. <esc>:cnext<cr>i
|
||||||
|
" edit alternative
|
||||||
|
nmap <leader>/ :e#<cr>
|
||||||
|
" auto indent
|
||||||
|
nmap <leader>i m`gg=G``
|
||||||
|
" try ; as :
|
||||||
|
nmap ; :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" vim-table-mode
|
|
||||||
" :TableModeToggle pour activer/deactiver
|
|
||||||
" table cpmatible rst
|
|
||||||
" racourcis:
|
|
||||||
" visual + :Tableize pour transformer csv (avec ,) en table
|
|
||||||
let g:table_mode_corner_corner='+'
|
|
||||||
let g:table_mode_header_fillchar='='
|
|
||||||
nmap <Leader>tm <Esc>:TableModeToggle<cr>
|
|
||||||
imap <Leader>tm <Esc>:TableModeToggle<cr>i
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue