VIM 7.4 snipptes does not work under Windows 7
jerik opened this issue · 6 comments
Hi,
I installed vim-snipmate via vim-plug, but it does not work.
When I'm in an html, e.g. test.html
file, the snippets e.g. div
is not expanded.
_vimrc
call plug#begin('~/vimfiles/plugged')
" https://github.com/garbas/vim-snipmate
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'garbas/vim-snipmate'
" Optional:
Plug 'honza/vim-snippets'
call plug#end()
a :PlugStatus
shows that everything is installed.
I use the following VIM on Windows7: VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2013 14:38:33)MS-Windows 32 Bit GUI Version with OLE-Support
1. Check that SnipMate is loaded.
:imap
i <Tab> * <C-R>=TriggerSnippet()<CR>
i <C-R><Tab> * <C-R>=ShowAvailableSnips()<CR>
but <Plug>snipMateTrigger
is not in the :imap
listing.
2. Check that the snippets file you mean to use exists, and that it contains the snippet you're trying to expand.
C:\Users\foo\vimfiles\snippets\html.snippets
is available with
snippet div
<div id="${1:name}">
${2}
</div>
3. Check that your snippets file is located inside a foo/snippets directory, where foo is a path listed in your runtimepath.
:echo $HOME
C:\Users\foo\
:help rtp
PC, OS/2: "$HOME/vimfiles,
My vimfiles are available in C:\Users\foo\vimfiles
, the vim config files is under C:\Users\foo\_vimrc
. This works fine. vim-snipmate is available under C:\Users\foo\vimfiles\plugged\vim-snipmate
.
4. Check that your snippets file is in scope by either the filetype matching the path of the snippet file or the scope explicitly loaded.
:e test.html
:set ft
filetype=html
5. Check if any snippets from your snippets file are available. This can be done with the "show available snips" map, by default bound to in insert mode.
As described in 1. <C-R> <Tab>
is mapped, but when i execute it in insert mode, nothing shows up.
Looking at the 5 steps, the only difference is that <Plug>snipMateTrigger
is not in the :imap
list and <C-R><Tab>
does not work in an html file.
How do I get vim-snipmate working?
Cheers -- jerik
@jerik Sorry for the very delayed response. Can you check that you have the latest vim-snipmate on your computer? Go to the repository on your computer and see which commit is checked out. Can you also share the output of :set rtp?
please?
Hejho @ajzafar
here you go.
git show --oneline -s
: a9802f2 Improve parser version documentation
:set rtp
runtimepath=~/vimfiles,~\vimfiles\plugged\vim-javascript-syntax,~\vimfiles\plugged\delimitMate,~\vimfiles\plugged\vim-javascript,~\vimfiles\plugged\vim-indent-guides,~\vimfiles\plugged\vim-pipe,~\vimfiles\plug ged\vim-addon-mw-utils,~\vimfiles\plugged\tlib_vim,~\vimfiles\plugged\vim-snipmate,~\vimfiles\plugged\vim-snippets,C:\Program Files (x86)\Vim/vimfiles,C:\Program Files (x86)\Vim\vim74,C:\Program Files (x86)\Vim/ vimfiles/after,~\vimfiles\plugged\vim-javascript\after,~\vimfiles\plugged\vim-snipmate\after,~/vimfiles/after
Hello @jerik,
Try to put your snippets folder into your runtime directory e.g :
C:\Program Files (x86)\Vim\vim74\snippets
( Or by symlink
mklink /J "C:\Program Files (x86)\Vim\vim74\snippets" C:\Users\foo\vimfiles\snippets
)
I stumbed upon this issue and solved it by doing this.
I think for Windows, the plugins expect to find some of your custom files inside the Vim installation folder instead of your $HOME
- Windows 7 x64
- gvim 8.0