'!'option is not overriding behavior, can't list snippets.

Asked by William Ting

Great plugin btw. I'm trying to customize but I'm running into a few issues.

These are the options I have set in ~/.vimrc:

"UltiSnips
ca use UltiSnipsEdit
let g:UltiSnipsSnippetDirectories = ["UltiSnips", "snippets"]
let g:UltiSnipsEditSplit = "horizontal"
let g:UltiSnipsListSnippets = "<c-s>"
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"

1. I can't get UltiSnipsListSnippets to work. <c-tab> wasn't working, so I rebound it to <c-s>. However that doesn't work either. Am I supposed to be in insert or normal mode for this to work?

2. I am trying to override the default C main snippet with the following but it still prompts me with a list:

snippet main "main function" !b
int main(int argc, char const* argv[]) {
 ${1:// code}
 return 0;
}
endsnippet

If I set UltiSnipsSnippetDirectories = ["snippets"] then it works fine, but now I don't have access to all the default snippets.

Question information

Language:
English Edit question
Status:
Solved
For:
UltiSnips Edit question
Assignee:
No assignee Edit question
Solved by:
SirVer
Solved:
Last query:
Last reply:
Revision history for this message
Best SirVer (sirver) said :
#1

1) in insert mode. c-tab was likely not working because your terminal emulator does not forward this to vim. Try gvim intead. Try rebinding to space or a character - if this doesn't work it is something in ultisnips or your setup. Otherwise it is something with your terminal or vim config.

2) depending on the plugin manager you are using you might need to set UltiSnipsDontReverseSearchPath, see the docs.

Revision history for this message
SirVer (sirver) said :
#2

1) in insert mode. c-tab was likely not working because your terminal emulator does not forward this to vim. Try gvim intead. Try rebinding to space or a character - if this doesn't work it is something in ultisnips or your setup. Otherwise it is something with your terminal or vim config.

2) depending on the plugin manager you are using you might need to set UltiSnipsDontReverseSearchPath, see the docs.

Revision history for this message
William Ting (wting) said :
#3

Thanks SirVer, that solved my question.

Revision history for this message
William Ting (wting) said :
#4

I guess Vundle switches the runtime path.