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
** Plug start
#+BEGIN_SRC conf
#+BEGIN_SRC vimrc
call plug#begin('~/.vim/plugged')
#+END_SRC
#+end_src
** Manage Files
#+BEGIN_SRC conf
#+begin_src vimrc
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.vim' " Fzf for vim
#+END_SRC
#+end_src
** Text Objects
#+BEGIN_SRC conf
#+begin_src vimrc
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-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 'jiangmiao/auto-pairs' " Vim plugin, insert or delete brackets, parens, quotes in pair
#+END_SRC
#+end_src
** Git
#+BEGIN_SRC conf
#+begin_src vimrc
Plug 'jreybert/vimagit'
Plug 'tpope/vim-fugitive' " A Git wrapper so awesome, it should be illegal
Plug 'junegunn/gv.vim' " A git commit browser
Plug 'mhinz/vim-signify' " Show a diff using Vim its sign column
#+END_SRC
#+end_src
** 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 'justinmk/vim-sneak' " The missing motion for Vim
Plug 'haya14busa/is.vim' " Improved incremental searching for Vim
#+END_SRC
#+end_src
** Manipulate Things
#+BEGIN_SRC conf
#+begin_src vimrc
Plug 'tpope/vim-surround' " Quoting/parenthesizing made simple
Plug 'tpope/vim-commentary' " Comment stuff out
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 'mhinz/vim-grepper', { 'on': ['Grepper', '<plug>(GrepperOperator)'] } "
#+END_SRC
#+end_src
** Utils
#+BEGIN_SRC conf
#+begin_src vimrc
Plug 'tpope/vim-repeat' " Enable repeating supported plugin maps with '.'
Plug 'tpope/vim-obsession' " Continuously updated session files
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 '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
#+END_SRC
#+end_src
** Visual
#+BEGIN_SRC conf
#+begin_src vimrc
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 '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 'junegunn/goyo.vim' " Distraction-free writing in Vim
#+END_SRC
#+end_src
** Themes
#+BEGIN_SRC conf
#+begin_src vimrc
Plug 'morhetz/gruvbox' " Retro groove color scheme for Vim
#+END_SRC
#+end_src
** Language Server Protocol
#+begin_src conf
#+begin_src vimrc
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
@ -85,79 +85,86 @@
#+end_src
** Snippnets and autocompletion
#+BEGIN_SRC conf
#+begin_src vimrc
Plug 'SirVer/ultisnips' " The ultimate snippet solution for Vim
" TODO Alternative https://github.com/Shougo/neosnippet.vim
Plug 'honza/vim-snippets' " Vim-snipmate default snippets
#+END_SRC
#+end_src
** Syntax Checking and Build Utils
#+BEGIN_SRC conf
#+begin_src vimrc
Plug 'neomake/neomake' " Asynchronous linting and make framework for Neovim/Vim
#+END_SRC
#+end_src
** Auto Completion
#+BEGIN_SRC conf
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " Dark powered asynchronous completion framework for neovim
Plug 'Nelyah/deoplete-mu' " Completion of Contacts using Mu
#+END_SRC
#+begin_src vimrc
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
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
#+BEGIN_SRC conf
#+begin_src vimrc
Plug 'christoomey/vim-tmux-navigator' " Seamless navigation between tmux panes and vim splits
Plug 'jpalardy/vim-slime' " Used to type text into a REPL
#+END_SRC
#+end_src
** Syntax
#+BEGIN_SRC conf
#+begin_src vimrc
Plug 'sheerun/vim-polyglot' " A solid language pack for Vim
#+END_SRC
#+end_src
** Markdown
#+BEGIN_SRC conf
#+begin_src vimrc
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 '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
#+END_SRC
#+end_src
** LaTeX
#+BEGIN_SRC conf
#+begin_src vimrc
Plug 'lervag/vimtex', { 'for': 'tex' } " A modern vim plugin for editing LaTeX files.
#+END_SRC
#+end_src
** Matlab
#+BEGIN_SRC conf
#+begin_src vimrc
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
#+END_SRC
#+end_src
** Org Mode
#+BEGIN_SRC conf
#+begin_src vimrc
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 'chrisbra/NrrwRgn' " A Narrow Region Plugin for vim
Plug 'mattn/calendar-vim' " calendar vimscript
Plug 'vim-scripts/utl.vim' " Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideas
#+END_SRC
#+end_src
** Others / To test
#+BEGIN_SRC conf
#+begin_src vimrc
" Plug 'francoiscabrol/ranger.vim' " Ranger integration in vim and neovim
" Plug 'brooth/far.vim' " Find And Replace Vim plugin
" 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 'drzel/vim-line-no-indicator' " Simple and expressive line number indicator
#+END_SRC
#+end_src
** Plug End
#+BEGIN_SRC conf
#+begin_src vimrc
call plug#end()
#+END_SRC
#+end_src
* Basic
** General
#+BEGIN_SRC conf
#+begin_src vimrc
set runtimepath+=~/.vim
" Sets how many lines of history VIM has to remember
@ -180,10 +187,10 @@ set clipboard+=unnamedplus
let mapleader = "\<Space>"
let g:mapleader = "\<Space>"
let maplocalleader = ","
#+END_SRC
#+end_src
** VIM user interface
#+BEGIN_SRC conf
#+begin_src vimrc
" Set 7 lines to the cursor - when moving vertically using j/k
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.
set splitbelow splitright
#+END_SRC
#+end_src
** Foldings
#+BEGIN_SRC conf
#+begin_src vimrc
if has('folding')
if has('windows')
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 foldlevelstart=99 " start unfolded
endif
#+END_SRC
#+end_src
** Colors and Fonts
#+BEGIN_SRC conf
#+begin_src vimrc
syntax enable
set background=dark
@ -324,18 +331,18 @@ endif
hi SpellBad cterm=underline
" Set style for gVim
hi SpellBad gui=undercurl
#+END_SRC
#+end_src
** Files, backups and undo
#+BEGIN_SRC conf
#+begin_src vimrc
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile
#+END_SRC
#+end_src
** Text, tab and indent related
#+BEGIN_SRC conf
#+begin_src vimrc
" Use spaces instead of tabs
set expandtab
@ -353,10 +360,10 @@ set nolist " list disables linebreak
set autoindent " Auto Indentation
set nosmartindent " No Smart Indentation
#+END_SRC
#+end_src
** Moving around, tabs, windows and buffers
#+BEGIN_SRC conf
#+begin_src vimrc
" Specify the behavior when switching between buffers
try
set switchbuf=useopen,usetab
@ -374,10 +381,10 @@ set mouse=a
" Automatically equalize splits when Vim is resized
autocmd VimResized * wincmd =
#+END_SRC
#+end_src
** Misc
#+BEGIN_SRC conf
#+begin_src vimrc
" Enable Line 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 synmaxcol=250
#+END_SRC
#+end_src
** Helper functions
#+BEGIN_SRC conf
#+begin_src vimrc
function! CmdLine(str)
exe "menu Foo.Bar :" . a:str
emenu Foo.Bar
@ -433,10 +440,10 @@ function! <SID>BufcloseCloseIt()
execute("bdelete! ".l:currentBufNum)
endif
endfunction
#+END_SRC
#+end_src
** GUI related
#+BEGIN_SRC conf
#+begin_src vimrc
set guifont=Hack\ Nerd\ Font\ Mono:h13
set gfn=Hack\ Nerd\ Font\ Mono:h13
@ -445,29 +452,29 @@ endfunction
set guioptions-=R
set guioptions-=l
set guioptions-=L
#+END_SRC
#+end_src
** Turn persistent undo on
#+BEGIN_SRC conf
#+begin_src vimrc
try
set undodir=~/.vim_runtime/temp_dirs/undodir
set undofile
catch
endtry
#+END_SRC
#+end_src
* Mappings
** Normal mode related
#+BEGIN_SRC conf
#+begin_src vimrc
" Smart way to move between windows
noremap <C-j> <C-W>j
noremap <C-k> <C-W>k
noremap <C-h> <C-W>h
noremap <C-l> <C-W>l
#+END_SRC
#+end_src
** Insert mode related
#+BEGIN_SRC conf
#+begin_src vimrc
" Paste while in insert mode
inoremap <C-v> <C-r>*
@ -476,10 +483,10 @@ endtry
" Go to the beginning of line
inoremap <C-a> <Esc>I
#+END_SRC
#+end_src
** Visual mode related
#+BEGIN_SRC conf
#+begin_src vimrc
" 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>
@ -491,19 +498,19 @@ vnoremap > >gv
" Move visual block
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv
#+END_SRC
#+end_src
** Add some delimiters
#+BEGIN_SRC conf
#+begin_src vimrc
" use $ as a delimiter
xnoremap i$ :<C-u>normal! T$vt$<CR>
xnoremap a$ :<C-u>normal! T$hvt$l<CR>
onoremap i$ :normal vi$<CR>
onoremap a$ :normal va$<CR>
#+END_SRC
#+end_src
** Command mode related
#+BEGIN_SRC conf
#+begin_src vimrc
" Bash like keys for the command line
cnoremap <C-A> <Home>
cnoremap <C-E> <End>
@ -511,21 +518,21 @@ cnoremap <C-K> <C-U>
cnoremap <C-P> <Up>
cnoremap <C-N> <Down>
#+END_SRC
#+end_src
** Terminal mode related
#+BEGIN_SRC conf
#+begin_src vimrc
" tnoremap <Esc> <C-\><C-n>
tnoremap <C-w>h <C-\><C-n><C-w>h
tnoremap <C-w>j <C-\><C-n><C-w>j
tnoremap <C-w>k <C-\><C-n><C-w>k
tnoremap <C-w>l <C-\><C-n><C-w>l
#+END_SRC
#+end_src
** Correct misspelled works
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.
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>
inoremap <C-K> <Esc>[sve<C-G>
snoremap <C-K> <Esc>b[sviw<C-G>
#+END_SRC
#+end_src
* Filetypes
** Vim Which Key
#+BEGIN_SRC conf
#+begin_src vimrc
nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
let g:which_key_map_local = {}
#+END_SRC
#+end_src
** Mails
#+begin_src conf
#+begin_src vimrc
autocmd FileType mail set spell spelllang=en_us,fr
#+end_src
** MarkDown
#+BEGIN_SRC conf
#+begin_src vimrc
" Automatically turn on spell-checking for Markdown files
au BufRead,BufNewFile *.md setlocal spell spelllang=fr,en
#+END_SRC
#+end_src
** LaTeX
#+BEGIN_SRC conf
#+begin_src vimrc
" TODO : améliorer ça
au BufRead,BufNewFile *.tikz set filetype=tex
let tex_no_error=1 " TODO: used to not highlight underscores
@ -580,19 +587,19 @@ au BufRead,BufNewFile *.tex set iskeyword+=-
" " Make LaTeX
" nnoremap <leader>ml :Make pdf f=%:t:r<cr>
" nnoremap <leader>mlo :make open f=%:t:r<cr>
#+END_SRC
#+end_src
** Arduino
#+BEGIN_SRC conf
#+begin_src vimrc
au BufRead,BufNewFile *.pde set filetype=arduino
au BufRead,BufNewFile *.ino set filetype=arduino
" 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>am :!platformio serialports monitor --port=/dev/cu
#+END_SRC
#+end_src
** Python
#+BEGIN_SRC conf
#+begin_src vimrc
let g:slime_python_ipython = 1
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>C ?class
" au FileType python map <buffer> <leader>D ?def
#+END_SRC
#+end_src
** Matlab
#+BEGIN_SRC conf
#+begin_src vimrc
" TODO Run Section (delimited by %%)
au FileType matlab nmap <buffer> <localleader>mm <Plug>SlimeParagraphSend
let g:which_key_map_local.m = { 'name' : '+matlab' }
@ -668,25 +675,25 @@ let g:which_key_map_local.mr = 'cd-file'
" Open workspace
au FileType matlab nmap <buffer> <localleader>mw :SlimeSend0('workspace')<CR>
let g:which_key_map_local.mr = 'workspace'
#+END_SRC
#+end_src
** Sage
#+BEGIN_SRC conf
#+begin_src vimrc
" TODO Run Section
au FileType sage.python nmap <buffer> <localleader><localleader> <Plug>SlimeParagraphSend
" Run Selected text
au FileType sage.python vmap <buffer> <localleader><localleader> <Plug>SlimeRegionSend
#+END_SRC
#+end_src
** Save Which Key Configuration
#+BEGIN_SRC conf
#+begin_src vimrc
call which_key#register(',', "g:which_key_map_local")
#+END_SRC
#+end_src
* Plugins Config
** junegunn/fzf
#+BEGIN_SRC conf
#+begin_src vimrc
" This is the default extra key bindings
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
@ -718,10 +725,10 @@ function! s:fzf_statusline()
endfunction
autocmd! User FzfStatusLine call <SID>fzf_statusline()
#+END_SRC
#+end_src
** autozimu/LanguageClient-neovim
#+begin_src conf
#+begin_src vimrc
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'],
\ }
@ -734,50 +741,49 @@ autocmd! User FzfStatusLine call <SID>fzf_statusline()
#+end_src
** JamshedVesuna/vim-markdown-preview
#+BEGIN_SRC conf
#+begin_src vimrc
let vim_markdown_preview_github=1
let vim_markdown_preview_browser='Google Chrome'
let vim_markdown_preview_temp_file=1
" let vim_markdown_preview_pandoc=1
#+END_SRC
#+end_src
** mhinz/vim-signify
#+BEGIN_SRC conf
#+begin_src vimrc
let g:signify_vcs_list = ['git']
let g:signify_disable_by_default = 1
#+END_SRC
#+end_src
** Deoplete
#+BEGIN_SRC conf
#+begin_src vimrc
let g:deoplete#enable_at_startup = 1
" let g:deoplete#omni#functions = {}
" set completeopt=longest,menuone,preview
" let g:deoplete#sources = {}
" let g:deoplete#enable_smart_case = 1
" call deoplete#custom#set('ultisnips', 'matchers', ['matcher_fuzzy'])
#+END_SRC
#+end_src
** SirVer/ultisnips
#+BEGIN_SRC conf
#+begin_src vimrc
let g:UltiSnipsSnippetsDir = '~/.vim/UltiSnip'
" inoremap <silent><expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
let g:UltiSnipsExpandTrigger="<C-j>"
" let g:UltiSnipsJumpForwardTrigger="<tab>"
" let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
#+END_SRC
#+end_src
** honza/vim-snippets
#+BEGIN_SRC conf
#+begin_src vimrc
let g:snipMate = {}
let g:snipMate.scope_aliases = {}
#+END_SRC
#+end_src
** itchyny/lightline.vim
#+BEGIN_SRC conf
#+begin_src vimrc
function! LightlineObsession()
return '%{ObsessionStatus("")}'
endfunction
@ -801,35 +807,35 @@ let g:lightline = {
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': "|", 'right': "|" }
\ }
#+END_SRC
#+end_src
** Autopairs
#+BEGIN_SRC conf
#+begin_src vimrc
" Incompatibilité entre auto-pairs et clang-complete
let g:AutoPairsMapCR = 0
imap <silent><CR> <CR><Plug>AutoPairsReturn
#+END_SRC
#+end_src
** Yggdroot/indentLine
#+BEGIN_SRC conf
#+begin_src vimrc
" :IndentLinesToggle toggles lines on and off.
let g:indentLine_color_term = 239
#+END_SRC
#+end_src
** ryanoasis/vim-devicons
#+BEGIN_SRC conf
#+begin_src vimrc
let g:webdevicons_enable_ctrlp = 1
#+END_SRC
#+end_src
** junegunn/goyo.vim
#+BEGIN_SRC conf
#+begin_src vimrc
let g:goyo_width=100
let g:goyo_margin_top = 2
let g:goyo_margin_bottom = 2
#+END_SRC
#+end_src
This is for soft line breaks
#+BEGIN_SRC conf
#+begin_src vimrc
function! s:goyo_enter()
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
cabbrev <buffer> q! let b:quitting_bang = 1 <bar> q!
endfunction
#+END_SRC
#+end_src
Quit Vim if this is the only remaining buffer
#+BEGIN_SRC conf
#+begin_src vimrc
function! s:goyo_leave()
if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1
if b:quitting_bang
@ -851,33 +857,33 @@ Quit Vim if this is the only remaining buffer
endif
endif
endfunction
#+END_SRC
#+end_src
#+BEGIN_SRC conf
#+begin_src vimrc
autocmd! User GoyoEnter call <SID>goyo_enter()
autocmd! User GoyoLeave call <SID>goyo_leave()
#+END_SRC
#+end_src
** tpope/vim-surround
#+BEGIN_SRC conf
#+begin_src vimrc
vmap Si S(i_<esc>f)
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
let g:surround_{char2nr('b')} = "__\r__"
#+END_SRC
#+end_src
** Vim-Markdown
#+BEGIN_SRC conf
#+begin_src vimrc
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_conceal = 0
let g:vim_markdown_toc_autofit = 1
let g:vim_markdown_toml_frontmatter = 1
let g:tex_conceal = ""
#+END_SRC
#+end_src
** Neomake
#+BEGIN_SRC conf
#+begin_src vimrc
" Latex
autocmd! BufWritePost *.tex Neomake
let g:neomake_tex_chktex_maker = {
@ -903,59 +909,59 @@ let g:tex_conceal = ""
\ '%f:L %l (C %c-%*[0-9]): %m,',
\ }
let g:neomake_matlab_enabled_makers = ['mlint']
#+END_SRC
#+end_src
** lervag/vimtex
#+BEGIN_SRC conf
#+begin_src vimrc
" let g:tex_conceal=""
" autocmd FileType tex let b:vimtex_main = 'main.tex'
" let g:vimtex_mappings_enabled=0
#+END_SRC
#+end_src
** jpalardy/vim-slime
#+BEGIN_SRC conf
#+begin_src vimrc
if exists('$TMUX')
let g:slime_target = "tmux"
let g:slime_default_config = {"socket_name": split($TMUX, ",")[0], "target_pane": ":.2"}
let g:slime_dont_ask_default = 1
endif
#+END_SRC
#+end_src
** mhinz/vim-grepper
#+BEGIN_SRC conf
#+begin_src vimrc
" nnoremap <leader>G :Grepper -tool ag<cr>
" nmap gs <plug>(GrepperOperator)
" xmap gs <plug>(GrepperOperator)
#+END_SRC
#+end_src
** 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:
let g:EditorConfig_exclude_patterns = ['fugitive://.*']
#+END_SRC
#+end_src
** Polyglot
#+BEGIN_SRC conf
#+begin_src vimrc
let g:polyglot_disabled = ['latex']
#+END_SRC
#+end_src
* Bindings
** Vim Which Key
#+BEGIN_SRC conf
#+begin_src vimrc
nnoremap <silent> <leader> :WhichKey '<Space>'<cr>
let g:which_key_map = {}
#+END_SRC
#+end_src
** Direct ones
#+BEGIN_SRC conf
#+begin_src vimrc
" Switch with last buffer
nnoremap <leader><Tab> :e #<cr>
" let g:which_key_map.<Tab> = 'last-buffer'
#+END_SRC
#+end_src
** Quit
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.q = { 'name' : '+quit' }
" Quit
@ -973,10 +979,10 @@ let g:which_key_map.q.w = 'quit-save'
" Quit - Save all
nnoremap <leader>qW :wqa<cr>
let g:which_key_map.q.W = 'quit-save-all'
#+END_SRC
#+end_src
** Files
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.f = { 'name' : '+files' }
" Fast saving
@ -998,10 +1004,10 @@ nnoremap <leader>fw
" vnoremap <leader>fw
" \ :call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', <C-r>0]}))<cr>
let g:which_key_map.f.w = 'find-file-word'
#+END_SRC
#+end_src
** Buffers
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.b = { 'name' : '+buffers' }
" Buffer Create
@ -1035,10 +1041,10 @@ let g:which_key_map.b.h = 'buffer-home'
" CD to buffer path
noremap <leader>bw :cd %:p:h<CR>:pwd<CR>
let g:which_key_map.b.w = 'buffer-pwd'
#+END_SRC
#+end_src
** Tabs
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.t = { 'name' : '+tabs' }
" 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
nnoremap <Leader>tt :exe "tabn ".g:lasttab<CR>
let g:which_key_map.t.t = 'tab-toggle'
#+END_SRC
#+end_src
** Terminals
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.T = { 'name' : '+terminals' }
" 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
nnoremap <Leader>T- :split<CR>:term<CR>
" let g:which_key_map.T.- = 'term-hor'
#+END_SRC
#+end_src
** Splits / Windows
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.w = { 'name' : '+windows' }
" Split Horizontal
@ -1158,10 +1164,10 @@ function! MaximizeToggle()
only
endif
endfunction
#+END_SRC
#+end_src
** Check Spell
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.S = { 'name' : '+spell-check' }
" CheckSpell Toggle
@ -1199,10 +1205,10 @@ let g:which_key_map.S.P = 'spell-prev-correct'
" CheckSpell Add to dictionnary
noremap <leader>Sa zg
let g:which_key_map.S.a = 'spell-add-dict'
#+END_SRC
#+end_src
** Make
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.m = { 'name' : '+make' }
" Make Make
@ -1224,10 +1230,10 @@ let g:which_key_map.m.r = 'make-run'
" Make Open
nnoremap <leader>mo :make! open<cr>
let g:which_key_map.m.o = 'make-open'
#+END_SRC
#+end_src
** Search
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.s = { 'name' : '+search' }
" Search History
@ -1250,10 +1256,10 @@ let g:which_key_map.s.w = 'search-word'
" TODO - should not have to press enter
nnoremap <leader>st :Grepper -tool rg -query TODO<CR>
let g:which_key_map.s.t = 'search-todos'
#+END_SRC
#+end_src
** TODO - GIT
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.g = { 'name' : '+git' }
" Git Gutter
@ -1291,10 +1297,10 @@ let g:which_key_map.g.F = 'git-file'
" Git Find Commits
noremap <leader>gf :Commits<CR>
let g:which_key_map.g.f = 'git-find-commit'
#+END_SRC
#+end_src
** Errors
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.e = { 'name' : '+errors' }
function! s:GetBufferList()
@ -1359,10 +1365,10 @@ let g:which_key_map.e.n = 'error-next'
" Error Previous
nnoremap <silent><leader>ep :lprevious<CR>
let g:which_key_map.e.p = 'error-previous'
#+END_SRC
#+end_src
** Text
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.x = { 'name' : '+text' }
" Start interactive EasyAlign in visual mode (e.g. vipga) and for a motion
@ -1396,10 +1402,10 @@ fun! TrimWhitespace()
endfun
nnoremap <leader>xt :call TrimWhitespace()<CR>
let g:which_key_map.x.t = 'delete-trailing-whitespaces'
#+END_SRC
#+end_src
** Config
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.c = { 'name' : '+config' }
let s:activatedsh = 0
@ -1447,18 +1453,18 @@ let g:which_key_map.c.enter = 'disable-highlight'
" Theme
noremap <silent> <leader>ct :noh<CR>
let g:which_key_map.c.t = 'choose-theme'
#+END_SRC
#+end_src
** Insert
#+BEGIN_SRC conf
#+begin_src vimrc
let g:which_key_map.i = { 'name' : '+insert' }
" Insert Snippet
noremap <Leader>is :Snippets<CR>
let g:which_key_map.i.s = 'insert-snippet'
#+END_SRC
#+end_src
** Save Which Key Configuration
#+BEGIN_SRC conf
#+begin_src vimrc
call which_key#register('<Space>', "g:which_key_map")
#+END_SRC
#+end_src