" Mapping for Vim help of the word under cursor. nnoremap K :help setlocal foldmethod=expr setlocal foldexpr=GetVimFold(v:lnum) " Regex for vim script blocks & markers {{{ let s:vim_funciton_start = '^\s*fun\(c\(tion\)\=\)\=!\=\s\+.*#\=\w*(.*).*$' let s:vim_function_end = '^\s*endfun\(c\(tion\)\=\)\=\s*$' let s:vim_if_start = '^\s*if\s*.*$' let s:vim_if_end = '\s*en\(dif\)\=\s*$' let s:vim_while_start = '^\s*wh\(ile)\=\s*.*$' let s:vim_while_end = '\s*endw\(hile\)\=\s*$' let s:vim_for_start = '^\s*for\s*.*$' let s:vim_for_end = '\s*endfo\(r\)\=\s*$' let s:vim_try_start = '^\s*try\s*.*$' let s:vim_try_end = '\s*endt\(ry\)\=\s*$' let s:vim_augroup_start = '^\s*aug\(roup\)\=\s*.*\(END\)\@