Is it possible to jump to the next closed fold in Vim?

Let me propose the following implementation of the described behavior. nnoremap <silent> <leader>zj :call NextClosedFold(‘j’)<cr> nnoremap <silent> <leader>zk :call NextClosedFold(‘k’)<cr> function! NextClosedFold(dir) let cmd = ‘norm!z’..a:dir let view = winsaveview() let [l0, l, open] = [0, view.lnum, 1] while l != l0 && open exe cmd let [l0, l] = [l, line(‘.’)] let open = … Read more

How to avoid constant switching to and from English keyboard layout to type Vim commands when writing in non-Latin language (e.g., Greek)?

This problem can be solved with the help of the keymap option. It allows to define an alternate keyboard mapping to use in modes requiring text input. To switch between the default and alternate keymaps while in Insert, Replace, or Command-line mode (but not Normal mode), use Ctrl+^ (Ctrl+6). Changing the keymap affects text input … Read more

Let gVim always run a single instance

If you are using the bash shell (on Linux/OS X/using Cygwin) is to add you ~/.bashrc file: gvim () { command gvim –remote-silent “$@” || command gvim “$@”; } On Windows I think you could have a gvim.bat batch-script to achieve the same.. gvim.exe -p –remote-tab-silent %1 %* If gvim.exe isn’t in your path Run … Read more