honza/vim-snippets

How to Redefine a Snippet

amarakon opened this issue · 1 comments

Here is a snippet in c.snippets:

snippet mainn
	int main(void)
	{
		${0}
		return 0;
	}

The file cpp.snippets has the line extends c which means it also uses snippets from c.snippets. But in C++, you do not actually need to put void in int main(). So it should look like this instead:

snippet mainn
	int main()
	{
		${0}
		return 0;
	}

I tried writing that snippet in cpp.snippets, but it was still using the snippet from c.snippets.

Nevermind, I just had to change the priority with priority 2.