Created
March 1, 2010 03:14
-
-
Save seandenigris/318052 to your computer and use it in GitHub Desktop.
insert first snippet by default instead of cancelling
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
" Apply this edit to plugin/snipMate.vim | |
fun s:ChooseSnippet(scope, trigger) | |
" Original last line (which cancels on enter) commented out | |
"return num == -1 ? '' : s:multi_snips[a:scope][a:trigger][num][1] | |
" Two lines added to choose first snippet if none are selected | |
let snip_to_return = num == -1 ? 0 : num | |
return s:multi_snips[a:scope][a:trigger][snip_to_return][1] | |
endf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment