Skip to content

Instantly share code, notes, and snippets.

@seandenigris
Created March 1, 2010 03:14
Show Gist options
  • Save seandenigris/318052 to your computer and use it in GitHub Desktop.
Save seandenigris/318052 to your computer and use it in GitHub Desktop.
insert first snippet by default instead of cancelling
" 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