···11+" Set leader to space
22+let mapleader=" "
33+nnoremap <Space> <nop>
44+55+" unmap F1 help
66+nmap <F1> <nop>
77+imap <F1> <nop>
88+99+" Map <C-w> , to vsp and . to sp
1010+nnoremap <C-w>, :vsp<CR>
1111+nnoremap <C-w>. :sp<CR>
1212+1313+" Map semicolon to colon
1414+noremap ; :
1515+1616+" Quick/Location list Toggle
1717+let g:lt_location_list_toggle_map = '<leader>p'
1818+let g:lt_quickfix_list_toggle_map = '<leader>q'
1919+2020+" fzf
2121+nnoremap <silent> <Leader>o :GFiles<CR>
2222+2323+" Agerium
2424+function! Agerium()
2525+ let params = input('Search files for: ')
2626+ execute 'Ag ' . params
2727+endfunction
2828+nnoremap <Leader>f :call Agerium()<CR>
2929+3030+" Easymotion Shortcuts
3131+map n <Plug>(easymotion-next)
3232+map N <Plug>(easymotion-prev)
3333+3434+" Gif config
3535+map / <Plug>(easymotion-sn)
3636+omap / <Plug>(easymotion-tn)
3737+3838+" unmap arrow keys
3939+noremap <Up> <Nop>
4040+noremap <Down> <Nop>
4141+noremap <Left> <Nop>
4242+noremap <Right> <Nop>
4343+4444+" Remap Arrow keys
4545+map <Up> <Plug>(easymotion-k)
4646+map <Down> <Plug>(easymotion-j)
4747+map <Left> <Plug>(easymotion-linebackward)
4848+map <Right> <Plug>(easymotion-lineforward)
4949+5050+" Move to previous/next buffer
5151+nnoremap <silent> <leader>h :bprevious<CR>
5252+nnoremap <silent> <leader>l :bnext<CR>
5353+5454+" Go to last used buffer
5555+nnoremap <leader>j <C-^>
5656+5757+" Close a buffer
5858+nnoremap <silent> <leader>k :bp <BAR> bd #<CR>
5959+6060+" List buffers
6161+nnoremap <silent> <leader>b :Buffers<CR>
6262+6363+" List buffer commits
6464+nnoremap <silent> <leader>c :BCommits<CR>
6565+6666+" List git status files
6767+nnoremap <silent> <leader>c :GFiles?<CR>
6868+6969+" Toggle zen mode
7070+nnoremap <silent> <leader>z :Goyo<CR>
7171+7272+" Blackhole all x commands and make X behave like d
7373+nnoremap X "_d
7474+nnoremap XX "_dd
7575+vnoremap X "_d
7676+vnoremap x "_d
7777+nnoremap x "_x
7878+7979+" Make the dot command work as expected in visual mode (via
8080+" https://www.reddit.com/r/vim/comments/3y2mgt/do_you_have_any_minor_customizationsmappings_that/cya0x04)
8181+vnoremap . :norm.<CR>
8282+8383+" Allows you to visually select a section and then hit @ to run a macro on all lines
8484+" https://medium.com/@schtoeffel/you-don-t-need-more-than-one-cursor-in-vim-2c44117d51db#.3dcn9prw6
8585+function! ExecuteMacroOverVisualRange()
8686+ echo "@".getcmdline()
8787+ execute ":'<,'>normal @".nr2char(getchar())
8888+endfunction
8989+" Executes a macro for each line in visual selection
9090+xnoremap @ :<C-u>call ExecuteMacroOverVisualRange()<CR>
9191+9292+" Have the indent commands re-highlight the last visual selection to make
9393+" multiple indentations easier
9494+vnoremap > >gv
9595+vnoremap < <gv
9696+9797+" Make Ctrl-c behave exactly like Escape (because it matters to completions)
9898+inoremap <c-c> <ESC>
9999+xnoremap <c-c> <ESC>
100100+101101+" Use tab for trigger completion with characters ahead and navigate.
102102+" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
103103+inoremap <silent><expr> <TAB>
104104+ \ pumvisible() ? "\<C-n>" :
105105+ \ <SID>check_back_space() ? "\<TAB>" :
106106+ \ coc#refresh()
107107+inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
108108+109109+function! s:check_back_space() abort
110110+ let col = col('.') - 1
111111+ return !col || getline('.')[col - 1] =~# '\s'
112112+endfunction
113113+114114+" Use <c-space> to trigger completion.
115115+inoremap <silent><expr> <c-space> coc#refresh()
116116+117117+" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
118118+inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
119119+120120+" Use `[g` and `]g` to navigate diagnostics
121121+nmap <silent> [g <Plug>(coc-diagnostic-prev)
122122+nmap <silent> ]g <Plug>(coc-diagnostic-next)
123123+124124+" Remap keys for gotos
125125+nmap <silent> gd <Plug>(coc-definition)
126126+nmap <silent> gy <Plug>(coc-type-definition)
127127+nmap <silent> gi <Plug>(coc-implementation)
128128+nmap <silent> gr <Plug>(coc-references)
129129+nmap <silent> gn <Plug>(coc-rename)
130130+131131+function! s:show_documentation()
132132+ if (index(['vim','help'], &filetype) >= 0)
133133+ execute 'h '.expand('<cword>')
134134+ else
135135+ call CocAction('doHover')
136136+ endif
137137+endfunction
138138+139139+" Use K to show documentation in preview window
140140+nnoremap <silent> K :call <SID>show_documentation()<CR>
141141+142142+" Highlight symbol under cursor on CursorHold
143143+autocmd CursorHold * silent call CocActionAsync('highlight')
144144+145145+" Show all diagnostics
146146+nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
147147+148148+" Find symbol of current document
149149+nnoremap <silent> <space>s :<C-u>CocList outline<cr>