From: Samir Benmendil Date: Mon, 24 Oct 2016 08:01:11 +0000 (+0100) Subject: vim: skip preview window when moving between windows X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/0637757f6cc057218ecf0000c44821946df476da?ds=sidebyside vim: skip preview window when moving between windows I'm not entirely sure about this. It does help a lot for not giving focus to the ycm doc window. But it also prevents focusing the fugitive status window. It can still be reached with gs though. Maybe this needs a function that checks what the content of the preview window is and skip conditionally. --- diff --git a/vim/vimrc b/vim/vimrc index c6aee80..ef35da8 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -435,9 +435,9 @@ nnoremap zx zMzxzt map :ls:b -" move between windows -nnoremap w -nnoremap W +" move between windows (skip previewwindow) +nnoremap w:if &previewwindow \| wincmd w \| endif +nnoremap W:if &previewwindow \| wincmd W \| endif "xterm mouse with middleclick paste nnoremap i