fecf9942618beb225ce7748af6dd2eef85bdfe38

Author
Pavle Portic <pavle.portic@tilda.center>
Committer
Pavle Portic <pavle.portic@tilda.center>
Date

Message

Add vim completion window mappings

Diff

 1diff --git a/dot_spacevim b/dot_spacevim
 2index 953350cd2023061ad815cc3d1ba09514c450cba2..d351243830d03989f0e34f42e19e519ab5299ba0 100644
 3--- a/dot_spacevim
 4+++ b/dot_spacevim
 5@@ -148,9 +148,12 @@ function! UserConfig()
 6 	" Unhighlight search results with \
 7 	noremap <silent> \ :let @/ = ""<CR>
 8 
 9+	" Use n / e / tab for autocomplete
10+	inoremap <expr> n ((pumvisible())?("\<C-n>"):("n"))
11+	inoremap <expr> e ((pumvisible())?("\<C-p>"):("e"))
12+	inoremap <expr> <tab> ((pumvisible())?("\<Cr>"):("<Cr>"))
13 
14-	if !exists('g:vim_better_default_window_key_mapping') ||
15-				\ g:vim_better_default_window_key_mapping
16+	if !exists('g:vim_better_default_window_key_mapping') || g:vim_better_default_window_key_mapping
17 		nnoremap <Leader>wn <C-W>j
18 		nnoremap <Leader>we <C-W>k
19 		nnoremap <Leader>wh <C-W>h
20@@ -161,21 +164,6 @@ function! UserConfig()
21 		nnoremap <Leader>wE :resize -5<CR>
22 	endif
23 
24-	" Easymotion colemak bindings
25-	map  <Leader>nn <Plug>(easymotion-bd-f)
26-	nmap <Leader>nn <Plug>(easymotion-overwin-f)
27-
28-	" s{char}{char} to move to {char}{char}
29-	nmap <Leader>nN <Plug>(easymotion-overwin-f2)
30-
31-	" Jump to line
32-	map <Leader>ne <Plug>(easymotion-bd-jk)
33-	nmap <Leader>ne <Plug>(easymotion-overwin-line)
34-
35-	" Jump to word
36-	map  <Leader>nw <Plug>(easymotion-bd-w)
37-	nmap <Leader>nw <Plug>(easymotion-overwin-w)
38-
39 	" FZF mappings
40 	noremap <C-P> :GFiles<CR>
41 	noremap <leader>ff :Files<CR>