Skip to content

Instantly share code, notes, and snippets.

@wadako111
Created September 18, 2013 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wadako111/6605042 to your computer and use it in GitHub Desktop.
Save wadako111/6605042 to your computer and use it in GitHub Desktop.
nnoremap <silent> g{ :call <SID>search_top()<CR>^
nnoremap <silent> g} :call search ('^\s\{,' . (col('.') - 1). '}\S')<CR>^
function! s:search_top()
let spaces = col('.')
execute line(".") - 1
call search ('^\s\{,' . (spaces - 1). '}\S', 'b')
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment