Can't trigger ultisnips, at all

Asked by Chris Pantazis

Hi,

I have installed UltiSnips through Pathogen. I have added these lines on my .vimrc:

let g:UltiSnipsSnippetDirectories=["bundle/ultisnips/UltiSnips"]
let g:UltiSnipsExpandTrigger="<c-l>"
let g:UltiSnipsJumpForwardTrigger="<c-l>"
let g:UltiSnipsJumpBackwardTrigger="<c-s-l>"

:help UltiSnips, :UltiSnipsEdit, etc all work (UltiSnipsEdit opens vim.snippets when I am editing .vimrc, html.snippets when I am editing .html files, python.snippets when I am editing python files, etc)

however nothing is triggered when I press ctrl-l. I tried if<ctr-l>, or class<ctr+l>, for<ctrl-l> but nothing happens. I had to remap <tab> because I use it for omni completition.

I am not using any other snippets plugin.

This is my vimrc http://dpaste.com/1417525/

Question information

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

Hi,

I am not using Vundle. I installed UltiSnips through Pathogen.

in .vim/ftdetect/ there are two symlink files: snippets.vim and UltiSnips.vim.

I must be doing something completely wrong, but what is it?

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

Likely you do not call pathogen#infect() in your vimrc. For this reason, ftdetect/ scripts are not run as they should be.

See https://answers.launchpad.net/ultisnips/+question/204520.

Also, see pathogens readme: https://github.com/tpope/vim-pathogen. It is important that you do not use syntax or filtetype before calling pathogen#infect().

execute pathogen#infect()
syntax on
filetype plugin indent on

Revision history for this message
Chris Pantazis (xpanta) said :
#4

Hi,

Actually, I call pathogen#infect() (I have pasted my .vimrc).

There is some conflict with one of my plugins. Maybe I should install one by one and see how it goes.

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

I know, but you still do it wrong (which might be the problem, vim is very sensitive to such things).

e.g. these lines:

filetype plugin indent on
filetype on
syntax on

you call filetype twice which might confuse vim, also you do not call it directly after infect - in between you even call colorscheme which also messes with syntax and file detection settings.

Try the minimal vim config tim posted and go from there. I never heard that plugins had an impact on this - which does not mean anyhing really, as it could easily happen as Vim is so fragile.

Please, keep me posted.