Although there is no specific syntax for aliases you can achieve the same effect by using post_jump:
# c.snippets
global !p
def expand(snip):
if snip.tabstop != 1:
return
vim.eval('feedkeys("\<C-R>=UltiSnips#ExpandSnippet()\<CR>")')
endglobal
snippet incstdlib "#include <stdlib.h>" !b
#include <stdlib.h> /* exit(), malloc(), free() */
$0
endsnippet
post_jump "expand(snip)"
snippet incexit "#include <stdlib.h>" !b
incstdlib$1
endsnippet
In this snippets file the trigger incexit is an "alias" of trigger incstdlib. In reality incexit expands to incstdlib and the expand(snip) is called when UltiSnips moves to the tabstop $1. The expand(snip) just executes the VimScript function UltiSnips#ExpandSnippet which will expand incstdlib into it's final expanded form #include <stdlib.h>.
Another options is to use UltiSnips regular expression support instead:
snippet "inc(true|false|bool)" "#include <stdbool.h>" r
#include <stdbool.h> /* true, false */
endsnippet
Here you will have three triggers inctrue, incfalse and incbool that are effectively the same. The only drawback is that autocompletion plugins like YouCompleteMe will not autocomplete those.
Perhaps you could define the core of your snippet in a python or viml function and have your snippets call the same function?
– Luc Hermitte Feb 28 '16 at 04:08plugin-ultisnips, so I would assume the OP is using ultisnips. – EvergreenTree Feb 28 '16 at 11:14neosnippetplugin, its syntax has analiaskeyword for this very purpose. – VanLaser Feb 29 '16 at 19:10