From bc20e480d407bc731351ab04613e00ba338895db Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 13 Nov 2020 01:11:02 +0800 Subject: [PATCH] [feature] shortcut for scrollbind --- nvim/config/init.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nvim/config/init.vim b/nvim/config/init.vim index 3255cec..d912a67 100644 --- a/nvim/config/init.vim +++ b/nvim/config/init.vim @@ -65,6 +65,9 @@ nmap ' ysiw' nmap `` ysiW` nmap ` ysiw` +nmap sb :set scrollbind +nmap nsb :set noscrollbind + inoremap nmap ss :syntax sync fromstart @@ -193,7 +196,8 @@ nnoremap k :cp " ==== Ranger configuration ==== let g:ranger_map_key = 0 nnoremap :Ranger -nnoremap cg :call OpenRangerIn(system("git rev-parse --show-toplevel || pwd"), 'edit ') + +autocmd BufEnter,BufRead nnoremap cg :call OpenRangerIn(system("git rev-parse --show-toplevel >/dev/null || pwd"), 'edit ') " ==== fugitive configuration ====