From 90f381edc5c3300e7c79a4d7005d1d172ddcc155 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 7 Sep 2017 16:03:41 +0200 Subject: Easyyyyyyyy ’Mooooootionnnnnss... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vimrc | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 6a81a82..9f3b67e 100644 --- a/vimrc +++ b/vimrc @@ -292,6 +292,46 @@ xnoremap /* `>a */` noremap \* m"e?/\* *:s:/\* *::/ *\*\/:s: *\*/::\|:nohljg`"3h noremap \\ m"0:s:// *::\|:nohlg`"3h + + noremap / :NERDTreeToggle + +" 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})) + +let g:EasyMotion_do_mapping = 0 " Disable default mappings + +let mapleader=" " +" Jump to anywhere you want with minimal keystrokes, with just one key binding. +" `s{char}{label}` +nmap (easymotion-overwin-f) +" or +" `s{char}{char}{label}` +" Need one more keystroke, but on average, it may be more comfortable. +nmap (easymotion-overwin-f2) + +" Turn off case insensitive feature +let g:EasyMotion_smartcase = 0 + +" JK motions: Line motions +map j (easymotion-j) +map k (easymotion-k) + + + " Reformatting is done using 'gq' noremap Q :s/^/> / noremap q :s/^[ ]*>[ ]*// -- cgit v1.2.3