Skip to content

Instantly share code, notes, and snippets.

@zfedoran
Created April 11, 2012 03:55
Show Gist options
  • Save zfedoran/2356736 to your computer and use it in GitHub Desktop.
Save zfedoran/2356736 to your computer and use it in GitHub Desktop.
[vim] skip over closing parenthesis with tab button
inoremap <expr> <Tab> SkipClosingParentheses()
function! SkipClosingParentheses()
let line = getline('.')
let current_char = line[col('.')-1]
"Ignore EOL
if col('.') == col('$')
return "\t"
end
return stridx(']})', current_char)==-1 ? "\t" : "\<Right>"
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment