Created
April 11, 2012 03:55
-
-
Save zfedoran/2356736 to your computer and use it in GitHub Desktop.
[vim] skip over closing parenthesis with tab button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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