aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorCody Hiar <codyfh@gmail.com>2017-10-06 10:38:42 -0600
committerCody Hiar <codyfh@gmail.com>2017-10-06 10:38:42 -0600
commitad286a72da50000f9837cd4cf64f6fc4b4ee3b43 (patch)
tree651ac10b913fb34ac43bcda14378ef2148761ee9 /plugin
parent1f28f0293583904c8fc7ae4a35d66ca069e55ec8 (diff)
Adding back in easymotion
Diffstat (limited to 'plugin')
-rw-r--r--plugin/vim-options.vim43
1 files changed, 42 insertions, 1 deletions
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 <leader>hi :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '>
nnoremap <leader><leader> :noh<CR>
" Shortcut for creating a new tab
nnoremap <C-w>t :tabnew<CR>
+" Shortcuts for creating windows
+nnoremap <leader>s :vsplit<CR>
+nnoremap <leader>j :split<CR>
" 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 <leader>n :e %:p:h<CR>
+" Open NERDTree
+nnoremap <leader>d :e.<CR>
" 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 <leader>s :call ToggleSyntasticMode()<CR>
+ nnoremap <leader>a :call ToggleSyntasticMode()<CR>
endif
"-----------------------------------------------------------------------------------------------------------------------
@@ -414,6 +419,42 @@ endif
"-----------------------------------------------------------------------------------------------------------------------
+" Vim EasyMotion Incsearch
+"-----------------------------------------------------------------------------------------------------------------------
+if !empty(glob($EditorDir.'plugged/incsearch-easymotion.vim/plugin/incsearch/easymotion.vim'))
+ " You can use other keymappings like <C-l> instead of <CR> 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': {
+ \ "\<C-l>": '<Over>(easymotion)'
+ \ },
+ \ 'is_expr': 0
+ \ }), get(a:, 1, {}))
+ endfunction
+ noremap <silent><expr> / incsearch#go(<SID>incsearch_config())
+ noremap <silent><expr> ? incsearch#go(<SID>incsearch_config({'command': '?'}))
+ noremap <silent><expr> g/ incsearch#go(<SID>incsearch_config({'is_stay': 1}))
+endif
+"-----------------------------------------------------------------------------------------------------------------------
+
+
+
+"-----------------------------------------------------------------------------------------------------------------------
+" Vim EasyMotion
+"-----------------------------------------------------------------------------------------------------------------------
+if !empty(glob($EditorDir.'plugged/vim-easymotion/autoload/EasyMotion.vim'))
+ " <Leader>f{char} to move to {char}{char}
+ map <Leader>f <Plug>(easymotion-bd-f2)
+ nmap <Leader>f <Plug>(easymotion-overwin-f2)
+endif
+"-----------------------------------------------------------------------------------------------------------------------
+
+
+
+"-----------------------------------------------------------------------------------------------------------------------
" Basic movements (h, j, k, l) require a number prefix. Break bad habits
"-----------------------------------------------------------------------------------------------------------------------
function! DisableIfNonCounted(move) range