From ad286a72da50000f9837cd4cf64f6fc4b4ee3b43 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Fri, 6 Oct 2017 10:38:42 -0600 Subject: Adding back in easymotion --- plugin/vim-options.vim | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'plugin/vim-options.vim') diff --git a/plugin/vim-options.vim b/plugin/vim-options.vim index 088397f..1342359 100644 --- a/plugin/vim-options.vim +++ b/plugin/vim-options.vim @@ -153,6 +153,9 @@ map hi :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> nnoremap :noh " Shortcut for creating a new tab nnoremap t :tabnew +" Shortcuts for creating windows +nnoremap s :vsplit +nnoremap j :split " Formating a json file com! Formatjson %!python -m json.tool " Visually select pasted text @@ -167,6 +170,8 @@ nnoremap _ [c nnoremap = ]c " Open folder of current file nnoremap n :e %:p:h +" Open NERDTree +nnoremap d :e. " Function for saving session function! SaveSession() :mksession! $SessionDir/session.vim @@ -360,7 +365,7 @@ EOF let g:syntastic_check_on_open = 1 endif endfunction - nnoremap s :call ToggleSyntasticMode() + nnoremap a :call ToggleSyntasticMode() endif "----------------------------------------------------------------------------------------------------------------------- @@ -413,6 +418,42 @@ endif +"----------------------------------------------------------------------------------------------------------------------- +" Vim EasyMotion Incsearch +"----------------------------------------------------------------------------------------------------------------------- +if !empty(glob($EditorDir.'plugged/incsearch-easymotion.vim/plugin/incsearch/easymotion.vim')) + " You can use other keymappings like instead of if you want to + " use these mappings as default search and somtimes want to move cursor with + " EasyMotion. + function! s:incsearch_config(...) abort + return incsearch#util#deepextend(deepcopy({ + \ 'modules': [incsearch#config#easymotion#module({'overwin': 1})], + \ 'keymap': { + \ "\": '(easymotion)' + \ }, + \ 'is_expr': 0 + \ }), get(a:, 1, {})) + endfunction + noremap / incsearch#go(incsearch_config()) + noremap ? incsearch#go(incsearch_config({'command': '?'})) + noremap g/ incsearch#go(incsearch_config({'is_stay': 1})) +endif +"----------------------------------------------------------------------------------------------------------------------- + + + +"----------------------------------------------------------------------------------------------------------------------- +" Vim EasyMotion +"----------------------------------------------------------------------------------------------------------------------- +if !empty(glob($EditorDir.'plugged/vim-easymotion/autoload/EasyMotion.vim')) + " f{char} to move to {char}{char} + map f (easymotion-bd-f2) + nmap f (easymotion-overwin-f2) +endif +"----------------------------------------------------------------------------------------------------------------------- + + + "----------------------------------------------------------------------------------------------------------------------- " Basic movements (h, j, k, l) require a number prefix. Break bad habits "----------------------------------------------------------------------------------------------------------------------- -- cgit v1.2.3