0

I am not having any luck with Snipmate. I've used pathogen to install snipmate along with tlib, addon-utils, and snippets. Here is the output of verbose imap.

<S-Tab>       <Plug>snipMateBack
Last set from ~/.vim/bundle/vim-snipmate/after/plugin/snipMate.vim
<Plug>snipMateShow * <C-R>=snipMate#ShowAvailableSnips()<CR>
Last set from ~/.vim/bundle/vim-snipmate/plugin/snipMate.vim
<Plug>snipMateBack * <C-R>=snipMate#BackwardsSnippet()<CR>
Last set from ~/.vim/bundle/vim-snipmate/plugin/snipMate.vim 
<Plug>snipMateTrigger * <C-R>=snipMate#TriggerSnippet(1)<CR>
Last set from ~/.vim/bundle/vim-snipmate/plugin/snipMate.vim
<Plug>snipMateNextOrTrigger * <C-R>=snipMate#TriggerSnippet()<CR>
Last set from ~/.vim/bundle/vim-snipmate/plugin/snipMate.vim
<S-Insert>    <MiddleMouse>
Last set from /usr/share/vim/vim74/debian.vim
<Tab>         <Plug>snipMateNextOrTrigger
Last set from ~/.vim/bundle/vim-snipmate/after/plugin/snipMate.vim
<C-R><Tab>    <Plug>snipMateShow
Last set from ~/.vim/bundle/vim-snipmate/after/plugin/snipMate.vim

Basically, i've created a file called "test.html" and type "html" followed by Tab and the auto completion didn't work.

TIA,

Thomas

ThomasDKim
  • 305
  • 3
  • 14
  • Do you have an `html` snippet? – romainl Feb 25 '17 at 10:51
  • Yes. I've installed vim-snippets using pathogen as well. – ThomasDKim Feb 25 '17 at 15:36
  • 1
    Update. read SnipMate.txt and entered :SnipMateLoadScope! html. This lets me use the snippets for html. Did i install the snipmate incorrectly? Can I load all snippets when i start gvim? I am running gvim in linux mint 17.3 by the way. – ThomasDKim Feb 25 '17 at 16:43
  • 1
    What is the output of `:echo &filetype` in that `test.html`? – romainl Feb 25 '17 at 19:40
  • nothing. :echo &filetype produces nothing... – ThomasDKim Feb 25 '17 at 20:33
  • The problem seems to be that Vim does not recognize the file type even if i save the file with .html extension. if i :set filetype=html, the snippet seems to work. Why doesn't Vim recognize the extension? – ThomasDKim Feb 25 '17 at 20:40
  • 1
    Because you didn't enable filetype detection. Add `filetype plugin indent on` and `syntax on` to your `vimrc`. – romainl Feb 25 '17 at 20:43
  • romainl, you are correct. actually for some reason i had 'filetype off' at the end of my .vimrc. Thanks again for all your help! – ThomasDKim Feb 25 '17 at 21:04

0 Answers0