Make deoplete works on vim8 and nvim

This commit is contained in:
Thomas Dehaeze 2019-12-16 11:38:48 +01:00
parent a190968fe5
commit e5e94e1ab5

View File

@ -7,52 +7,52 @@
* Plugins Install * Plugins Install
** Plug start ** Plug start
#+BEGIN_SRC conf #+BEGIN_SRC vimrc
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
#+END_SRC #+end_src
** Manage Files ** Manage Files
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'tpope/vim-vinegar' " Combine with netrw to create a delicious salad dressing Plug 'tpope/vim-vinegar' " Combine with netrw to create a delicious salad dressing
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' } " A command-line fuzzy finder written in Go Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' } " A command-line fuzzy finder written in Go
Plug 'junegunn/fzf.vim' " Fzf for vim Plug 'junegunn/fzf.vim' " Fzf for vim
#+END_SRC #+end_src
** Text Objects ** Text Objects
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'kana/vim-textobj-user' " Create your own text objects Plug 'kana/vim-textobj-user' " Create your own text objects
Plug 'kana/vim-textobj-line' " Text objects for the current line Plug 'kana/vim-textobj-line' " Text objects for the current line
Plug 'kana/vim-textobj-entire' " Text objects for entire buffer Plug 'kana/vim-textobj-entire' " Text objects for entire buffer
Plug 'michaeljsmith/vim-indent-object' " Defines a new text object representing lines of code at the same indent level Plug 'michaeljsmith/vim-indent-object' " Defines a new text object representing lines of code at the same indent level
Plug 'jiangmiao/auto-pairs' " Vim plugin, insert or delete brackets, parens, quotes in pair Plug 'jiangmiao/auto-pairs' " Vim plugin, insert or delete brackets, parens, quotes in pair
#+END_SRC #+end_src
** Git ** Git
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'jreybert/vimagit' Plug 'jreybert/vimagit'
Plug 'tpope/vim-fugitive' " A Git wrapper so awesome, it should be illegal Plug 'tpope/vim-fugitive' " A Git wrapper so awesome, it should be illegal
Plug 'junegunn/gv.vim' " A git commit browser Plug 'junegunn/gv.vim' " A git commit browser
Plug 'mhinz/vim-signify' " Show a diff using Vim its sign column Plug 'mhinz/vim-signify' " Show a diff using Vim its sign column
#+END_SRC #+end_src
** Motions, Search ** Motions, Search
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'terryma/vim-expand-region' " Vim plugin that allows you to visually select increasingly larger regions of text using the same key combination Plug 'terryma/vim-expand-region' " Vim plugin that allows you to visually select increasingly larger regions of text using the same key combination
Plug 'justinmk/vim-sneak' " The missing motion for Vim Plug 'justinmk/vim-sneak' " The missing motion for Vim
Plug 'haya14busa/is.vim' " Improved incremental searching for Vim Plug 'haya14busa/is.vim' " Improved incremental searching for Vim
#+END_SRC #+end_src
** Manipulate Things ** Manipulate Things
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'tpope/vim-surround' " Quoting/parenthesizing made simple Plug 'tpope/vim-surround' " Quoting/parenthesizing made simple
Plug 'tpope/vim-commentary' " Comment stuff out Plug 'tpope/vim-commentary' " Comment stuff out
Plug 'junegunn/vim-easy-align' " A Vim alignment plugin Plug 'junegunn/vim-easy-align' " A Vim alignment plugin
Plug 'Olical/vim-enmasse' " Edit every line in a quickfix list at the same time Plug 'Olical/vim-enmasse' " Edit every line in a quickfix list at the same time
Plug 'mhinz/vim-grepper', { 'on': ['Grepper', '<plug>(GrepperOperator)'] } " Plug 'mhinz/vim-grepper', { 'on': ['Grepper', '<plug>(GrepperOperator)'] } "
#+END_SRC #+end_src
** Utils ** Utils
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'tpope/vim-repeat' " Enable repeating supported plugin maps with '.' Plug 'tpope/vim-repeat' " Enable repeating supported plugin maps with '.'
Plug 'tpope/vim-obsession' " Continuously updated session files Plug 'tpope/vim-obsession' " Continuously updated session files
Plug 'tpope/vim-eunuch' " eunuch.vim: helpers for UNIX Plug 'tpope/vim-eunuch' " eunuch.vim: helpers for UNIX
@ -60,24 +60,24 @@
Plug 'majutsushi/tagbar' " Vim plugin that displays tags in a window, ordered by scope Plug 'majutsushi/tagbar' " Vim plugin that displays tags in a window, ordered by scope
Plug 'tpope/vim-speeddating' " use CTRL-A/CTRL-X to increment dates, times, and more Plug 'tpope/vim-speeddating' " use CTRL-A/CTRL-X to increment dates, times, and more
Plug 'liuchengxu/vim-which-key' " Vim plugin that shows keybindings in popup Plug 'liuchengxu/vim-which-key' " Vim plugin that shows keybindings in popup
#+END_SRC #+end_src
** Visual ** Visual
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'itchyny/lightline.vim' " A light and configurable statusline/tabline for Vim Plug 'itchyny/lightline.vim' " A light and configurable statusline/tabline for Vim
Plug 'Yggdroot/indentLine' " A vim plugin to display the indention levels with thin vertical lines Plug 'Yggdroot/indentLine' " A vim plugin to display the indention levels with thin vertical lines
Plug 'ryanoasis/vim-devicons' " Adds file type glyphs/icons to many popular Vim plugins such as: NERDTree, vim-airline, unite, vim-startify and many more Plug 'ryanoasis/vim-devicons' " Adds file type glyphs/icons to many popular Vim plugins such as: NERDTree, vim-airline, unite, vim-startify and many more
Plug 'mhinz/vim-startify' " The fancy start screen for Vim Plug 'mhinz/vim-startify' " The fancy start screen for Vim
Plug 'junegunn/goyo.vim' " Distraction-free writing in Vim Plug 'junegunn/goyo.vim' " Distraction-free writing in Vim
#+END_SRC #+end_src
** Themes ** Themes
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'morhetz/gruvbox' " Retro groove color scheme for Vim Plug 'morhetz/gruvbox' " Retro groove color scheme for Vim
#+END_SRC #+end_src
** Language Server Protocol ** Language Server Protocol
#+begin_src conf #+begin_src vimrc
Plug 'autozimu/LanguageClient-neovim', { Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next', \ 'branch': 'next',
\ 'do': 'bash install.sh', \ 'do': 'bash install.sh',
@ -85,79 +85,86 @@
#+end_src #+end_src
** Snippnets and autocompletion ** Snippnets and autocompletion
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'SirVer/ultisnips' " The ultimate snippet solution for Vim Plug 'SirVer/ultisnips' " The ultimate snippet solution for Vim
" TODO Alternative https://github.com/Shougo/neosnippet.vim " TODO Alternative https://github.com/Shougo/neosnippet.vim
Plug 'honza/vim-snippets' " Vim-snipmate default snippets Plug 'honza/vim-snippets' " Vim-snipmate default snippets
#+END_SRC #+end_src
** Syntax Checking and Build Utils ** Syntax Checking and Build Utils
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'neomake/neomake' " Asynchronous linting and make framework for Neovim/Vim Plug 'neomake/neomake' " Asynchronous linting and make framework for Neovim/Vim
#+END_SRC #+end_src
** Auto Completion ** Auto Completion
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " Dark powered asynchronous completion framework for neovim if has('nvim')
Plug 'Nelyah/deoplete-mu' " Completion of Contacts using Mu Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
#+END_SRC Plug 'Nelyah/deoplete-mu'
else
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'Nelyah/deoplete-mu'
endif
#+end_src
** Tmux ** Tmux
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'christoomey/vim-tmux-navigator' " Seamless navigation between tmux panes and vim splits Plug 'christoomey/vim-tmux-navigator' " Seamless navigation between tmux panes and vim splits
Plug 'jpalardy/vim-slime' " Used to type text into a REPL Plug 'jpalardy/vim-slime' " Used to type text into a REPL
#+END_SRC #+end_src
** Syntax ** Syntax
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'sheerun/vim-polyglot' " A solid language pack for Vim Plug 'sheerun/vim-polyglot' " A solid language pack for Vim
#+END_SRC #+end_src
** Markdown ** Markdown
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } " Markdown Vim Mode Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } " Markdown Vim Mode
Plug 'mzlogin/vim-markdown-toc', { 'for': 'markdown' } " A vim plugin to generate table of contents for Markdown files Plug 'mzlogin/vim-markdown-toc', { 'for': 'markdown' } " A vim plugin to generate table of contents for Markdown files
Plug 'JamshedVesuna/vim-markdown-preview', { 'for': 'markdown' } " A light Vim plugin for previewing markdown files in a browser Plug 'JamshedVesuna/vim-markdown-preview', { 'for': 'markdown' } " A light Vim plugin for previewing markdown files in a browser
Plug 'nelstrom/vim-markdown-folding' " Fold markdown documents by section Plug 'nelstrom/vim-markdown-folding' " Fold markdown documents by section
#+END_SRC #+end_src
** LaTeX ** LaTeX
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'lervag/vimtex', { 'for': 'tex' } " A modern vim plugin for editing LaTeX files. Plug 'lervag/vimtex', { 'for': 'tex' } " A modern vim plugin for editing LaTeX files.
#+END_SRC #+end_src
** Matlab ** Matlab
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'tdehaeze/matlab-vim', { 'for': 'matlab' } " Edit Matlab M-files in Vim editor Plug 'tdehaeze/matlab-vim', { 'for': 'matlab' } " Edit Matlab M-files in Vim editor
Plug 'djoshea/vim-matlab-fold', { 'for': 'matlab' } " Vim code folding for Matlab files Plug 'djoshea/vim-matlab-fold', { 'for': 'matlab' } " Vim code folding for Matlab files
#+END_SRC #+end_src
** Org Mode ** Org Mode
#+BEGIN_SRC conf #+begin_src vimrc
Plug 'jceb/vim-orgmode' " Text outlining and task management for Vim Plug 'jceb/vim-orgmode' " Text outlining and task management for Vim
Plug 'vim-scripts/SyntaxRange' " Define a different filetype syntax on regions of a buffer Plug 'vim-scripts/SyntaxRange' " Define a different filetype syntax on regions of a buffer
Plug 'chrisbra/NrrwRgn' " A Narrow Region Plugin for vim Plug 'chrisbra/NrrwRgn' " A Narrow Region Plugin for vim
Plug 'mattn/calendar-vim' " calendar vimscript Plug 'mattn/calendar-vim' " calendar vimscript
Plug 'vim-scripts/utl.vim' " Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideas Plug 'vim-scripts/utl.vim' " Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideas
#+END_SRC #+end_src
** Others / To test ** Others / To test
#+BEGIN_SRC conf #+begin_src vimrc
" Plug 'francoiscabrol/ranger.vim' " Ranger integration in vim and neovim " Plug 'francoiscabrol/ranger.vim' " Ranger integration in vim and neovim
" Plug 'brooth/far.vim' " Find And Replace Vim plugin " Plug 'brooth/far.vim' " Find And Replace Vim plugin
" Plug 'justinmk/vim-gtfo' " Go to Terminal or File manager " Plug 'justinmk/vim-gtfo' " Go to Terminal or File manager
" Plug 'sjl/gundo.vim', { 'on': 'GundoToggle' } " Vim plugin to visualize your Vim undo tree " Plug 'sjl/gundo.vim', { 'on': 'GundoToggle' } " Vim plugin to visualize your Vim undo tree
" Plug 'drzel/vim-line-no-indicator' " Simple and expressive line number indicator " Plug 'drzel/vim-line-no-indicator' " Simple and expressive line number indicator
#+END_SRC #+end_src
** Plug End ** Plug End
#+BEGIN_SRC conf #+begin_src vimrc
call plug#end() call plug#end()
#+END_SRC #+end_src
* Basic * Basic
** General ** General
#+BEGIN_SRC conf #+begin_src vimrc
set runtimepath+=~/.vim set runtimepath+=~/.vim
" Sets how many lines of history VIM has to remember " Sets how many lines of history VIM has to remember
@ -180,10 +187,10 @@ set clipboard+=unnamedplus
let mapleader = "\<Space>" let mapleader = "\<Space>"
let g:mapleader = "\<Space>" let g:mapleader = "\<Space>"
let maplocalleader = "," let maplocalleader = ","
#+END_SRC #+end_src
** VIM user interface ** VIM user interface
#+BEGIN_SRC conf #+begin_src vimrc
" Set 7 lines to the cursor - when moving vertically using j/k " Set 7 lines to the cursor - when moving vertically using j/k
set so=7 set so=7
@ -274,10 +281,10 @@ nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk'
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults. " Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
set splitbelow splitright set splitbelow splitright
#+END_SRC #+end_src
** Foldings ** Foldings
#+BEGIN_SRC conf #+begin_src vimrc
if has('folding') if has('folding')
if has('windows') if has('windows')
let &fillchars='vert: ' " less cluttered vertical window separators let &fillchars='vert: ' " less cluttered vertical window separators
@ -285,10 +292,10 @@ if has('folding')
set foldmethod=indent " not as cool as syntax, but faster set foldmethod=indent " not as cool as syntax, but faster
set foldlevelstart=99 " start unfolded set foldlevelstart=99 " start unfolded
endif endif
#+END_SRC #+end_src
** Colors and Fonts ** Colors and Fonts
#+BEGIN_SRC conf #+begin_src vimrc
syntax enable syntax enable
set background=dark set background=dark
@ -324,18 +331,18 @@ endif
hi SpellBad cterm=underline hi SpellBad cterm=underline
" Set style for gVim " Set style for gVim
hi SpellBad gui=undercurl hi SpellBad gui=undercurl
#+END_SRC #+end_src
** Files, backups and undo ** Files, backups and undo
#+BEGIN_SRC conf #+begin_src vimrc
" Turn backup off, since most stuff is in SVN, git et.c anyway... " Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup set nobackup
set nowb set nowb
set noswapfile set noswapfile
#+END_SRC #+end_src
** Text, tab and indent related ** Text, tab and indent related
#+BEGIN_SRC conf #+begin_src vimrc
" Use spaces instead of tabs " Use spaces instead of tabs
set expandtab set expandtab
@ -353,10 +360,10 @@ set nolist " list disables linebreak
set autoindent " Auto Indentation set autoindent " Auto Indentation
set nosmartindent " No Smart Indentation set nosmartindent " No Smart Indentation
#+END_SRC #+end_src
** Moving around, tabs, windows and buffers ** Moving around, tabs, windows and buffers
#+BEGIN_SRC conf #+begin_src vimrc
" Specify the behavior when switching between buffers " Specify the behavior when switching between buffers
try try
set switchbuf=useopen,usetab set switchbuf=useopen,usetab
@ -374,10 +381,10 @@ set mouse=a
" Automatically equalize splits when Vim is resized " Automatically equalize splits when Vim is resized
autocmd VimResized * wincmd = autocmd VimResized * wincmd =
#+END_SRC #+end_src
** Misc ** Misc
#+BEGIN_SRC conf #+begin_src vimrc
" Enable Line Number " Enable Line Number
set number set number
@ -386,10 +393,10 @@ set regexpengine=1 " https://github.com/xolox/vim-easytags/issues/88
" Set the maximum column for syntax highlighting " Set the maximum column for syntax highlighting
set synmaxcol=250 set synmaxcol=250
#+END_SRC #+end_src
** Helper functions ** Helper functions
#+BEGIN_SRC conf #+begin_src vimrc
function! CmdLine(str) function! CmdLine(str)
exe "menu Foo.Bar :" . a:str exe "menu Foo.Bar :" . a:str
emenu Foo.Bar emenu Foo.Bar
@ -433,10 +440,10 @@ function! <SID>BufcloseCloseIt()
execute("bdelete! ".l:currentBufNum) execute("bdelete! ".l:currentBufNum)
endif endif
endfunction endfunction
#+END_SRC #+end_src
** GUI related ** GUI related
#+BEGIN_SRC conf #+begin_src vimrc
set guifont=Hack\ Nerd\ Font\ Mono:h13 set guifont=Hack\ Nerd\ Font\ Mono:h13
set gfn=Hack\ Nerd\ Font\ Mono:h13 set gfn=Hack\ Nerd\ Font\ Mono:h13
@ -445,29 +452,29 @@ endfunction
set guioptions-=R set guioptions-=R
set guioptions-=l set guioptions-=l
set guioptions-=L set guioptions-=L
#+END_SRC #+end_src
** Turn persistent undo on ** Turn persistent undo on
#+BEGIN_SRC conf #+begin_src vimrc
try try
set undodir=~/.vim_runtime/temp_dirs/undodir set undodir=~/.vim_runtime/temp_dirs/undodir
set undofile set undofile
catch catch
endtry endtry
#+END_SRC #+end_src
* Mappings * Mappings
** Normal mode related ** Normal mode related
#+BEGIN_SRC conf #+begin_src vimrc
" Smart way to move between windows " Smart way to move between windows
noremap <C-j> <C-W>j noremap <C-j> <C-W>j
noremap <C-k> <C-W>k noremap <C-k> <C-W>k
noremap <C-h> <C-W>h noremap <C-h> <C-W>h
noremap <C-l> <C-W>l noremap <C-l> <C-W>l
#+END_SRC #+end_src
** Insert mode related ** Insert mode related
#+BEGIN_SRC conf #+begin_src vimrc
" Paste while in insert mode " Paste while in insert mode
inoremap <C-v> <C-r>* inoremap <C-v> <C-r>*
@ -476,10 +483,10 @@ endtry
" Go to the beginning of line " Go to the beginning of line
inoremap <C-a> <Esc>I inoremap <C-a> <Esc>I
#+END_SRC #+end_src
** Visual mode related ** Visual mode related
#+BEGIN_SRC conf #+begin_src vimrc
" Visual mode pressing / or ? searches for the current selection " Visual mode pressing / or ? searches for the current selection
vnoremap <silent> / :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR> vnoremap <silent> / :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
vnoremap <silent> ? :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR> vnoremap <silent> ? :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
@ -491,19 +498,19 @@ vnoremap > >gv
" Move visual block " Move visual block
vnoremap J :m '>+1<CR>gv=gv vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv vnoremap K :m '<-2<CR>gv=gv
#+END_SRC #+end_src
** Add some delimiters ** Add some delimiters
#+BEGIN_SRC conf #+begin_src vimrc
" use $ as a delimiter " use $ as a delimiter
xnoremap i$ :<C-u>normal! T$vt$<CR> xnoremap i$ :<C-u>normal! T$vt$<CR>
xnoremap a$ :<C-u>normal! T$hvt$l<CR> xnoremap a$ :<C-u>normal! T$hvt$l<CR>
onoremap i$ :normal vi$<CR> onoremap i$ :normal vi$<CR>
onoremap a$ :normal va$<CR> onoremap a$ :normal va$<CR>
#+END_SRC #+end_src
** Command mode related ** Command mode related
#+BEGIN_SRC conf #+begin_src vimrc
" Bash like keys for the command line " Bash like keys for the command line
cnoremap <C-A> <Home> cnoremap <C-A> <Home>
cnoremap <C-E> <End> cnoremap <C-E> <End>
@ -511,21 +518,21 @@ cnoremap <C-K> <C-U>
cnoremap <C-P> <Up> cnoremap <C-P> <Up>
cnoremap <C-N> <Down> cnoremap <C-N> <Down>
#+END_SRC #+end_src
** Terminal mode related ** Terminal mode related
#+BEGIN_SRC conf #+begin_src vimrc
" tnoremap <Esc> <C-\><C-n> " tnoremap <Esc> <C-\><C-n>
tnoremap <C-w>h <C-\><C-n><C-w>h tnoremap <C-w>h <C-\><C-n><C-w>h
tnoremap <C-w>j <C-\><C-n><C-w>j tnoremap <C-w>j <C-\><C-n><C-w>j
tnoremap <C-w>k <C-\><C-n><C-w>k tnoremap <C-w>k <C-\><C-n><C-w>k
tnoremap <C-w>l <C-\><C-n><C-w>l tnoremap <C-w>l <C-\><C-n><C-w>l
#+END_SRC #+end_src
** Correct misspelled works ** Correct misspelled works
Taken from: https://vi.stackexchange.com/questions/68/autocorrect-spelling-mistakes Taken from: https://vi.stackexchange.com/questions/68/autocorrect-spelling-mistakes
#+BEGIN_SRC conf #+begin_src vimrc
" Go back to last misspelled word and pick first suggestion. " Go back to last misspelled word and pick first suggestion.
inoremap <C-L> <C-G>u<Esc>[s1z=`]a<C-G>u inoremap <C-L> <C-G>u<Esc>[s1z=`]a<C-G>u
@ -533,28 +540,28 @@ Taken from: https://vi.stackexchange.com/questions/68/autocorrect-spelling-mista
nnoremap <C-K> <Esc>[sve<C-G> nnoremap <C-K> <Esc>[sve<C-G>
inoremap <C-K> <Esc>[sve<C-G> inoremap <C-K> <Esc>[sve<C-G>
snoremap <C-K> <Esc>b[sviw<C-G> snoremap <C-K> <Esc>b[sviw<C-G>
#+END_SRC #+end_src
* Filetypes * Filetypes
** Vim Which Key ** Vim Which Key
#+BEGIN_SRC conf #+begin_src vimrc
nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR> nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
let g:which_key_map_local = {} let g:which_key_map_local = {}
#+END_SRC #+end_src
** Mails ** Mails
#+begin_src conf #+begin_src vimrc
autocmd FileType mail set spell spelllang=en_us,fr autocmd FileType mail set spell spelllang=en_us,fr
#+end_src #+end_src
** MarkDown ** MarkDown
#+BEGIN_SRC conf #+begin_src vimrc
" Automatically turn on spell-checking for Markdown files " Automatically turn on spell-checking for Markdown files
au BufRead,BufNewFile *.md setlocal spell spelllang=fr,en au BufRead,BufNewFile *.md setlocal spell spelllang=fr,en
#+END_SRC #+end_src
** LaTeX ** LaTeX
#+BEGIN_SRC conf #+begin_src vimrc
" TODO : améliorer ça " TODO : améliorer ça
au BufRead,BufNewFile *.tikz set filetype=tex au BufRead,BufNewFile *.tikz set filetype=tex
let tex_no_error=1 " TODO: used to not highlight underscores let tex_no_error=1 " TODO: used to not highlight underscores
@ -580,19 +587,19 @@ au BufRead,BufNewFile *.tex set iskeyword+=-
" " Make LaTeX " " Make LaTeX
" nnoremap <leader>ml :Make pdf f=%:t:r<cr> " nnoremap <leader>ml :Make pdf f=%:t:r<cr>
" nnoremap <leader>mlo :make open f=%:t:r<cr> " nnoremap <leader>mlo :make open f=%:t:r<cr>
#+END_SRC #+end_src
** Arduino ** Arduino
#+BEGIN_SRC conf #+begin_src vimrc
au BufRead,BufNewFile *.pde set filetype=arduino au BufRead,BufNewFile *.pde set filetype=arduino
au BufRead,BufNewFile *.ino set filetype=arduino au BufRead,BufNewFile *.ino set filetype=arduino
" au FileType arduino map <leader>ac :!platformio run<CR> " au FileType arduino map <leader>ac :!platformio run<CR>
" au FileType arduino map <leader>au :!platformio run -s --target=upload<CR> " au FileType arduino map <leader>au :!platformio run -s --target=upload<CR>
" au FileType arduino map <leader>am :!platformio serialports monitor --port=/dev/cu " au FileType arduino map <leader>am :!platformio serialports monitor --port=/dev/cu
#+END_SRC #+end_src
** Python ** Python
#+BEGIN_SRC conf #+begin_src vimrc
let g:slime_python_ipython = 1 let g:slime_python_ipython = 1
au FileType python setlocal expandtab au FileType python setlocal expandtab
@ -626,10 +633,10 @@ au FileType python nmap <buffer> <localleader>c :SlimeSend0('cd '.expand('%:p:h'
" au FileType python map <buffer> <leader>2 /def " au FileType python map <buffer> <leader>2 /def
" au FileType python map <buffer> <leader>C ?class " au FileType python map <buffer> <leader>C ?class
" au FileType python map <buffer> <leader>D ?def " au FileType python map <buffer> <leader>D ?def
#+END_SRC #+end_src
** Matlab ** Matlab
#+BEGIN_SRC conf #+begin_src vimrc
" TODO Run Section (delimited by %%) " TODO Run Section (delimited by %%)
au FileType matlab nmap <buffer> <localleader>mm <Plug>SlimeParagraphSend au FileType matlab nmap <buffer> <localleader>mm <Plug>SlimeParagraphSend
let g:which_key_map_local.m = { 'name' : '+matlab' } let g:which_key_map_local.m = { 'name' : '+matlab' }
@ -668,25 +675,25 @@ let g:which_key_map_local.mr = 'cd-file'
" Open workspace " Open workspace
au FileType matlab nmap <buffer> <localleader>mw :SlimeSend0('workspace')<CR> au FileType matlab nmap <buffer> <localleader>mw :SlimeSend0('workspace')<CR>
let g:which_key_map_local.mr = 'workspace' let g:which_key_map_local.mr = 'workspace'
#+END_SRC #+end_src
** Sage ** Sage
#+BEGIN_SRC conf #+begin_src vimrc
" TODO Run Section " TODO Run Section
au FileType sage.python nmap <buffer> <localleader><localleader> <Plug>SlimeParagraphSend au FileType sage.python nmap <buffer> <localleader><localleader> <Plug>SlimeParagraphSend
" Run Selected text " Run Selected text
au FileType sage.python vmap <buffer> <localleader><localleader> <Plug>SlimeRegionSend au FileType sage.python vmap <buffer> <localleader><localleader> <Plug>SlimeRegionSend
#+END_SRC #+end_src
** Save Which Key Configuration ** Save Which Key Configuration
#+BEGIN_SRC conf #+begin_src vimrc
call which_key#register(',', "g:which_key_map_local") call which_key#register(',', "g:which_key_map_local")
#+END_SRC #+end_src
* Plugins Config * Plugins Config
** junegunn/fzf ** junegunn/fzf
#+BEGIN_SRC conf #+begin_src vimrc
" This is the default extra key bindings " This is the default extra key bindings
let g:fzf_action = { let g:fzf_action = {
\ 'ctrl-t': 'tab split', \ 'ctrl-t': 'tab split',
@ -718,10 +725,10 @@ function! s:fzf_statusline()
endfunction endfunction
autocmd! User FzfStatusLine call <SID>fzf_statusline() autocmd! User FzfStatusLine call <SID>fzf_statusline()
#+END_SRC #+end_src
** autozimu/LanguageClient-neovim ** autozimu/LanguageClient-neovim
#+begin_src conf #+begin_src vimrc
let g:LanguageClient_serverCommands = { let g:LanguageClient_serverCommands = {
\ 'matlab': ['java', ' -Djava.library.path=$MATLABROOT/bin/glnxa64 -cp $MATLABROOT/extern/engines/java/jar/engine.jar:$MATLABROOT/java/jar/jmi.jar:/home/thomas/github/matlab-langserver/build/libs/lsp-matlab-0.1.jar org.tokor.lspmatlab.Application'], \ 'matlab': ['java', ' -Djava.library.path=$MATLABROOT/bin/glnxa64 -cp $MATLABROOT/extern/engines/java/jar/engine.jar:$MATLABROOT/java/jar/jmi.jar:/home/thomas/github/matlab-langserver/build/libs/lsp-matlab-0.1.jar org.tokor.lspmatlab.Application'],
\ } \ }
@ -734,50 +741,49 @@ autocmd! User FzfStatusLine call <SID>fzf_statusline()
#+end_src #+end_src
** JamshedVesuna/vim-markdown-preview ** JamshedVesuna/vim-markdown-preview
#+BEGIN_SRC conf #+begin_src vimrc
let vim_markdown_preview_github=1 let vim_markdown_preview_github=1
let vim_markdown_preview_browser='Google Chrome' let vim_markdown_preview_browser='Google Chrome'
let vim_markdown_preview_temp_file=1 let vim_markdown_preview_temp_file=1
" let vim_markdown_preview_pandoc=1 " let vim_markdown_preview_pandoc=1
#+END_SRC #+end_src
** mhinz/vim-signify ** mhinz/vim-signify
#+BEGIN_SRC conf #+begin_src vimrc
let g:signify_vcs_list = ['git'] let g:signify_vcs_list = ['git']
let g:signify_disable_by_default = 1 let g:signify_disable_by_default = 1
#+END_SRC #+end_src
** Deoplete ** Deoplete
#+BEGIN_SRC conf #+begin_src vimrc
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 1
" let g:deoplete#omni#functions = {} " let g:deoplete#omni#functions = {}
" set completeopt=longest,menuone,preview " set completeopt=longest,menuone,preview
" let g:deoplete#sources = {} " let g:deoplete#sources = {}
" let g:deoplete#enable_smart_case = 1 " let g:deoplete#enable_smart_case = 1
" call deoplete#custom#set('ultisnips', 'matchers', ['matcher_fuzzy'])
" call deoplete#custom#set('ultisnips', 'matchers', ['matcher_fuzzy']) #+end_src
#+END_SRC
** SirVer/ultisnips ** SirVer/ultisnips
#+BEGIN_SRC conf #+begin_src vimrc
let g:UltiSnipsSnippetsDir = '~/.vim/UltiSnip' let g:UltiSnipsSnippetsDir = '~/.vim/UltiSnip'
" inoremap <silent><expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" " inoremap <silent><expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
let g:UltiSnipsExpandTrigger="<C-j>" let g:UltiSnipsExpandTrigger="<C-j>"
" let g:UltiSnipsJumpForwardTrigger="<tab>" " let g:UltiSnipsJumpForwardTrigger="<tab>"
" let g:UltiSnipsJumpBackwardTrigger="<s-tab>" " let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
#+END_SRC #+end_src
** honza/vim-snippets ** honza/vim-snippets
#+BEGIN_SRC conf #+begin_src vimrc
let g:snipMate = {} let g:snipMate = {}
let g:snipMate.scope_aliases = {} let g:snipMate.scope_aliases = {}
#+END_SRC #+end_src
** itchyny/lightline.vim ** itchyny/lightline.vim
#+BEGIN_SRC conf #+begin_src vimrc
function! LightlineObsession() function! LightlineObsession()
return '%{ObsessionStatus("")}' return '%{ObsessionStatus("")}'
endfunction endfunction
@ -801,35 +807,35 @@ let g:lightline = {
\ 'separator': { 'left': '', 'right': '' }, \ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': "|", 'right': "|" } \ 'subseparator': { 'left': "|", 'right': "|" }
\ } \ }
#+END_SRC #+end_src
** Autopairs ** Autopairs
#+BEGIN_SRC conf #+begin_src vimrc
" Incompatibilité entre auto-pairs et clang-complete " Incompatibilité entre auto-pairs et clang-complete
let g:AutoPairsMapCR = 0 let g:AutoPairsMapCR = 0
imap <silent><CR> <CR><Plug>AutoPairsReturn imap <silent><CR> <CR><Plug>AutoPairsReturn
#+END_SRC #+end_src
** Yggdroot/indentLine ** Yggdroot/indentLine
#+BEGIN_SRC conf #+begin_src vimrc
" :IndentLinesToggle toggles lines on and off. " :IndentLinesToggle toggles lines on and off.
let g:indentLine_color_term = 239 let g:indentLine_color_term = 239
#+END_SRC #+end_src
** ryanoasis/vim-devicons ** ryanoasis/vim-devicons
#+BEGIN_SRC conf #+begin_src vimrc
let g:webdevicons_enable_ctrlp = 1 let g:webdevicons_enable_ctrlp = 1
#+END_SRC #+end_src
** junegunn/goyo.vim ** junegunn/goyo.vim
#+BEGIN_SRC conf #+begin_src vimrc
let g:goyo_width=100 let g:goyo_width=100
let g:goyo_margin_top = 2 let g:goyo_margin_top = 2
let g:goyo_margin_bottom = 2 let g:goyo_margin_bottom = 2
#+END_SRC #+end_src
This is for soft line breaks This is for soft line breaks
#+BEGIN_SRC conf #+begin_src vimrc
function! s:goyo_enter() function! s:goyo_enter()
set wrap linebreak nolist textwidth=0 wrapmargin=0 set wrap linebreak nolist textwidth=0 wrapmargin=0
@ -838,10 +844,10 @@ This is for soft line breaks
autocmd QuitPre <buffer> let b:quitting = 1 autocmd QuitPre <buffer> let b:quitting = 1
cabbrev <buffer> q! let b:quitting_bang = 1 <bar> q! cabbrev <buffer> q! let b:quitting_bang = 1 <bar> q!
endfunction endfunction
#+END_SRC #+end_src
Quit Vim if this is the only remaining buffer Quit Vim if this is the only remaining buffer
#+BEGIN_SRC conf #+begin_src vimrc
function! s:goyo_leave() function! s:goyo_leave()
if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1 if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1
if b:quitting_bang if b:quitting_bang
@ -851,33 +857,33 @@ Quit Vim if this is the only remaining buffer
endif endif
endif endif
endfunction endfunction
#+END_SRC #+end_src
#+BEGIN_SRC conf #+begin_src vimrc
autocmd! User GoyoEnter call <SID>goyo_enter() autocmd! User GoyoEnter call <SID>goyo_enter()
autocmd! User GoyoLeave call <SID>goyo_leave() autocmd! User GoyoLeave call <SID>goyo_leave()
#+END_SRC #+end_src
** tpope/vim-surround ** tpope/vim-surround
#+BEGIN_SRC conf #+begin_src vimrc
vmap Si S(i_<esc>f) vmap Si S(i_<esc>f)
au FileType mako vmap Si S"i${ _(<esc>2f"a) }<esc> au FileType mako vmap Si S"i${ _(<esc>2f"a) }<esc>
" surroung un visual mode : use S, then b to make the text bold in markdown " surroung un visual mode : use S, then b to make the text bold in markdown
let g:surround_{char2nr('b')} = "__\r__" let g:surround_{char2nr('b')} = "__\r__"
#+END_SRC #+end_src
** Vim-Markdown ** Vim-Markdown
#+BEGIN_SRC conf #+begin_src vimrc
let g:vim_markdown_folding_disabled = 1 let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_conceal = 0 let g:vim_markdown_conceal = 0
let g:vim_markdown_toc_autofit = 1 let g:vim_markdown_toc_autofit = 1
let g:vim_markdown_toml_frontmatter = 1 let g:vim_markdown_toml_frontmatter = 1
let g:tex_conceal = "" let g:tex_conceal = ""
#+END_SRC #+end_src
** Neomake ** Neomake
#+BEGIN_SRC conf #+begin_src vimrc
" Latex " Latex
autocmd! BufWritePost *.tex Neomake autocmd! BufWritePost *.tex Neomake
let g:neomake_tex_chktex_maker = { let g:neomake_tex_chktex_maker = {
@ -903,59 +909,59 @@ let g:tex_conceal = ""
\ '%f:L %l (C %c-%*[0-9]): %m,', \ '%f:L %l (C %c-%*[0-9]): %m,',
\ } \ }
let g:neomake_matlab_enabled_makers = ['mlint'] let g:neomake_matlab_enabled_makers = ['mlint']
#+END_SRC #+end_src
** lervag/vimtex ** lervag/vimtex
#+BEGIN_SRC conf #+begin_src vimrc
" let g:tex_conceal="" " let g:tex_conceal=""
" autocmd FileType tex let b:vimtex_main = 'main.tex' " autocmd FileType tex let b:vimtex_main = 'main.tex'
" let g:vimtex_mappings_enabled=0 " let g:vimtex_mappings_enabled=0
#+END_SRC #+end_src
** jpalardy/vim-slime ** jpalardy/vim-slime
#+BEGIN_SRC conf #+begin_src vimrc
if exists('$TMUX') if exists('$TMUX')
let g:slime_target = "tmux" let g:slime_target = "tmux"
let g:slime_default_config = {"socket_name": split($TMUX, ",")[0], "target_pane": ":.2"} let g:slime_default_config = {"socket_name": split($TMUX, ",")[0], "target_pane": ":.2"}
let g:slime_dont_ask_default = 1 let g:slime_dont_ask_default = 1
endif endif
#+END_SRC #+end_src
** mhinz/vim-grepper ** mhinz/vim-grepper
#+BEGIN_SRC conf #+begin_src vimrc
" nnoremap <leader>G :Grepper -tool ag<cr> " nnoremap <leader>G :Grepper -tool ag<cr>
" nmap gs <plug>(GrepperOperator) " nmap gs <plug>(GrepperOperator)
" xmap gs <plug>(GrepperOperator) " xmap gs <plug>(GrepperOperator)
#+END_SRC #+end_src
** Editor config ** Editor config
#+BEGIN_SRC conf #+begin_src vimrc
" To ensure that this plugin works well with Tim Pope's fugitive, use the following patterns array: " To ensure that this plugin works well with Tim Pope's fugitive, use the following patterns array:
let g:EditorConfig_exclude_patterns = ['fugitive://.*'] let g:EditorConfig_exclude_patterns = ['fugitive://.*']
#+END_SRC #+end_src
** Polyglot ** Polyglot
#+BEGIN_SRC conf #+begin_src vimrc
let g:polyglot_disabled = ['latex'] let g:polyglot_disabled = ['latex']
#+END_SRC #+end_src
* Bindings * Bindings
** Vim Which Key ** Vim Which Key
#+BEGIN_SRC conf #+begin_src vimrc
nnoremap <silent> <leader> :WhichKey '<Space>'<cr> nnoremap <silent> <leader> :WhichKey '<Space>'<cr>
let g:which_key_map = {} let g:which_key_map = {}
#+END_SRC #+end_src
** Direct ones ** Direct ones
#+BEGIN_SRC conf #+begin_src vimrc
" Switch with last buffer " Switch with last buffer
nnoremap <leader><Tab> :e #<cr> nnoremap <leader><Tab> :e #<cr>
" let g:which_key_map.<Tab> = 'last-buffer' " let g:which_key_map.<Tab> = 'last-buffer'
#+END_SRC #+end_src
** Quit ** Quit
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.q = { 'name' : '+quit' } let g:which_key_map.q = { 'name' : '+quit' }
" Quit " Quit
@ -973,10 +979,10 @@ let g:which_key_map.q.w = 'quit-save'
" Quit - Save all " Quit - Save all
nnoremap <leader>qW :wqa<cr> nnoremap <leader>qW :wqa<cr>
let g:which_key_map.q.W = 'quit-save-all' let g:which_key_map.q.W = 'quit-save-all'
#+END_SRC #+end_src
** Files ** Files
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.f = { 'name' : '+files' } let g:which_key_map.f = { 'name' : '+files' }
" Fast saving " Fast saving
@ -998,10 +1004,10 @@ nnoremap <leader>fw
" vnoremap <leader>fw " vnoremap <leader>fw
" \ :call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', <C-r>0]}))<cr> " \ :call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', <C-r>0]}))<cr>
let g:which_key_map.f.w = 'find-file-word' let g:which_key_map.f.w = 'find-file-word'
#+END_SRC #+end_src
** Buffers ** Buffers
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.b = { 'name' : '+buffers' } let g:which_key_map.b = { 'name' : '+buffers' }
" Buffer Create " Buffer Create
@ -1035,10 +1041,10 @@ let g:which_key_map.b.h = 'buffer-home'
" CD to buffer path " CD to buffer path
noremap <leader>bw :cd %:p:h<CR>:pwd<CR> noremap <leader>bw :cd %:p:h<CR>:pwd<CR>
let g:which_key_map.b.w = 'buffer-pwd' let g:which_key_map.b.w = 'buffer-pwd'
#+END_SRC #+end_src
** Tabs ** Tabs
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.t = { 'name' : '+tabs' } let g:which_key_map.t = { 'name' : '+tabs' }
" Let 'tt' toggle between this and the last accessed tab " Let 'tt' toggle between this and the last accessed tab
@ -1076,10 +1082,10 @@ let g:which_key_map.t.L = 'tab-move-right'
" Tab Toggle " Tab Toggle
nnoremap <Leader>tt :exe "tabn ".g:lasttab<CR> nnoremap <Leader>tt :exe "tabn ".g:lasttab<CR>
let g:which_key_map.t.t = 'tab-toggle' let g:which_key_map.t.t = 'tab-toggle'
#+END_SRC #+end_src
** Terminals ** Terminals
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.T = { 'name' : '+terminals' } let g:which_key_map.T = { 'name' : '+terminals' }
" Quickly create a new terminal in a new tab " Quickly create a new terminal in a new tab
@ -1093,10 +1099,10 @@ nnoremap <Leader>T/ :vsplit<CR>:term<CR>
" Quickly create a new terminal in a horizontal split " Quickly create a new terminal in a horizontal split
nnoremap <Leader>T- :split<CR>:term<CR> nnoremap <Leader>T- :split<CR>:term<CR>
" let g:which_key_map.T.- = 'term-hor' " let g:which_key_map.T.- = 'term-hor'
#+END_SRC #+end_src
** Splits / Windows ** Splits / Windows
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.w = { 'name' : '+windows' } let g:which_key_map.w = { 'name' : '+windows' }
" Split Horizontal " Split Horizontal
@ -1158,10 +1164,10 @@ function! MaximizeToggle()
only only
endif endif
endfunction endfunction
#+END_SRC #+end_src
** Check Spell ** Check Spell
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.S = { 'name' : '+spell-check' } let g:which_key_map.S = { 'name' : '+spell-check' }
" CheckSpell Toggle " CheckSpell Toggle
@ -1199,10 +1205,10 @@ let g:which_key_map.S.P = 'spell-prev-correct'
" CheckSpell Add to dictionnary " CheckSpell Add to dictionnary
noremap <leader>Sa zg noremap <leader>Sa zg
let g:which_key_map.S.a = 'spell-add-dict' let g:which_key_map.S.a = 'spell-add-dict'
#+END_SRC #+end_src
** Make ** Make
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.m = { 'name' : '+make' } let g:which_key_map.m = { 'name' : '+make' }
" Make Make " Make Make
@ -1224,10 +1230,10 @@ let g:which_key_map.m.r = 'make-run'
" Make Open " Make Open
nnoremap <leader>mo :make! open<cr> nnoremap <leader>mo :make! open<cr>
let g:which_key_map.m.o = 'make-open' let g:which_key_map.m.o = 'make-open'
#+END_SRC #+end_src
** Search ** Search
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.s = { 'name' : '+search' } let g:which_key_map.s = { 'name' : '+search' }
" Search History " Search History
@ -1250,10 +1256,10 @@ let g:which_key_map.s.w = 'search-word'
" TODO - should not have to press enter " TODO - should not have to press enter
nnoremap <leader>st :Grepper -tool rg -query TODO<CR> nnoremap <leader>st :Grepper -tool rg -query TODO<CR>
let g:which_key_map.s.t = 'search-todos' let g:which_key_map.s.t = 'search-todos'
#+END_SRC #+end_src
** TODO - GIT ** TODO - GIT
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.g = { 'name' : '+git' } let g:which_key_map.g = { 'name' : '+git' }
" Git Gutter " Git Gutter
@ -1291,10 +1297,10 @@ let g:which_key_map.g.F = 'git-file'
" Git Find Commits " Git Find Commits
noremap <leader>gf :Commits<CR> noremap <leader>gf :Commits<CR>
let g:which_key_map.g.f = 'git-find-commit' let g:which_key_map.g.f = 'git-find-commit'
#+END_SRC #+end_src
** Errors ** Errors
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.e = { 'name' : '+errors' } let g:which_key_map.e = { 'name' : '+errors' }
function! s:GetBufferList() function! s:GetBufferList()
@ -1359,10 +1365,10 @@ let g:which_key_map.e.n = 'error-next'
" Error Previous " Error Previous
nnoremap <silent><leader>ep :lprevious<CR> nnoremap <silent><leader>ep :lprevious<CR>
let g:which_key_map.e.p = 'error-previous' let g:which_key_map.e.p = 'error-previous'
#+END_SRC #+end_src
** Text ** Text
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.x = { 'name' : '+text' } let g:which_key_map.x = { 'name' : '+text' }
" Start interactive EasyAlign in visual mode (e.g. vipga) and for a motion " Start interactive EasyAlign in visual mode (e.g. vipga) and for a motion
@ -1396,10 +1402,10 @@ fun! TrimWhitespace()
endfun endfun
nnoremap <leader>xt :call TrimWhitespace()<CR> nnoremap <leader>xt :call TrimWhitespace()<CR>
let g:which_key_map.x.t = 'delete-trailing-whitespaces' let g:which_key_map.x.t = 'delete-trailing-whitespaces'
#+END_SRC #+end_src
** Config ** Config
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.c = { 'name' : '+config' } let g:which_key_map.c = { 'name' : '+config' }
let s:activatedsh = 0 let s:activatedsh = 0
@ -1447,18 +1453,18 @@ let g:which_key_map.c.enter = 'disable-highlight'
" Theme " Theme
noremap <silent> <leader>ct :noh<CR> noremap <silent> <leader>ct :noh<CR>
let g:which_key_map.c.t = 'choose-theme' let g:which_key_map.c.t = 'choose-theme'
#+END_SRC #+end_src
** Insert ** Insert
#+BEGIN_SRC conf #+begin_src vimrc
let g:which_key_map.i = { 'name' : '+insert' } let g:which_key_map.i = { 'name' : '+insert' }
" Insert Snippet " Insert Snippet
noremap <Leader>is :Snippets<CR> noremap <Leader>is :Snippets<CR>
let g:which_key_map.i.s = 'insert-snippet' let g:which_key_map.i.s = 'insert-snippet'
#+END_SRC #+end_src
** Save Which Key Configuration ** Save Which Key Configuration
#+BEGIN_SRC conf #+begin_src vimrc
call which_key#register('<Space>', "g:which_key_map") call which_key#register('<Space>', "g:which_key_map")
#+END_SRC #+end_src