views:

43

answers:

3

I'm trying to use the Vim snipMate plugin, and I've installed it as it directs, but when I press tab nothing happens.

  • How can I debug this? Are there log files Vim makes when it tries to load stuff?
  • How can I see what plugins its loaded correctly?

I've tried :sni<tab> to see if there's anything called snipsomething installed but nothing completes.

In the installation tutorial it doesn't mention adding anything into my vimrc but I guess it finds the /plugin/ dir automatically?

I'm running on Windows and Unix and I have the same profile with the same problem.

Other plugins like NerdTree are loading OK.

Update: Following another question, I've tried :inoremap and :snoremap and the <Tab> entry mentioning TriggerSnippet() is there:

e.g.

s <Tab>   * <Esc>i <Right><C-R>=TriggerSnippet()<CR>
  • Does this mean it's enabled?
+1  A: 

You can insert echo "Loaded so far" and the like inside the plugin code - the text will be displayed in the bottom line if the echo is executed. Debugging by printf :) Crude, but simple and works.

Also: plugin is loaded automagically. plugins is not.

Amadan
Sorry, I meant `plugin`, I'll change the original post.I'll try that method now.
Ben Humphreys
A: 

It looks like I had something dodgy in C:\Program Files\Vim\vimfiles\ directory which was superceding my user preferences. I just blew away that directory and it works now.

Ben Humphreys
As a follow-up, it seems that using `set runtimepath` to try to link to a shared .vim thing doens't play well with snippets. Maybe there's another thing that needs to be set to get it to work.For the moment I've just made a soft link on my unix env, from `~/.vim` to the shared one
Ben Humphreys
+1  A: 
:verbose imap <tab>

will tell you what is bound to <tab>

:scriptnames will tell you what scripts were loaded.

Luc Hermitte