-1

What is wrong with my install of snipMate? I cannot get it to work. I even tried installing Pathogen as noted in the other answer. I am running vim7.4 on a windows XP. The _vimrc is noted below -

set nocompatible
set textwidth=80
set formatoptions=cqrol
set ts=2
set expandtab
set guifont:Courier_New:h8:cANSI
set backupdir=$temp
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

filetype plugin on

autocmd BufEnter * setlocal cursorline cursorcolumn
hi cursorcolumn ctermbg=247 guibg=grey70
hi cursorline ctermbg=247 guibg=grey70            

call pathogen#infect()

The VIM install directory structure looks like below. It is after I unzipped the snipMate.zip to vim74 folder.

c:\program files\vim\vim74
after/
autoload/
colors/
compiler/
doc/
ftplugin/
indent/
keymap/
lang/
macros/
plugin/
snippets/
spell/
syntax/
tools/
tutor/
README.txt
bugreport.vim
delmenu.vim
diff.exe*
evim.vim
filetype.vim
ftoff.vim
ftplugin.vim
ftplugof.vim
gvim.exe*
gvimext.dll
gvimrc_example.vim
indent.vim
indoff.vim
install.exe*
libintl.dll
macmap.vim
makemenu.vim
menu.vim
mswin.vim
optwin.vim
rgb.txt
scripts.vim
synmenu.vim
uninstal.exe*
uninstal.txt
uninstall-gui.exe*
vim.exe*
vimrc_example.vim
vimrun.exe*
vimtutor.bat*
xxd.exe*
.swp
shparekh
  • 820
  • 10
  • 20
  • Vim 7.4 implements a new regex engine. It might be that snipMate is not ready to be used with such engine. Have you tried snipMate with Vim 7.3? – danielepolencic Aug 13 '13 at 20:19
  • It shouldn't be in the vim74 folder. It should be in `~/vimfiles` – FDinoff Aug 13 '13 at 20:27
  • @danialepolencic I tried it with Vim 7.2. – shparekh Aug 13 '13 at 21:32
  • @FDinoff You mean to put the snipMate extracted folders in ./vim74/vimfiles? – shparekh Aug 13 '13 at 21:34
  • @shparekh It should be in `$HOME/vimfiles` extract in in there. Or if you are going to use pathogen put it in a folder in `$HOME/vimfiles/bundle/` – FDinoff Aug 13 '13 at 21:35
  • Read this http://stackoverflow.com/questions/16366142/after-much-reading-i-still-cant-get-pathogen-to-load-a-plugin-under-windows/16366544#16366544 – FDinoff Aug 13 '13 at 22:16
  • @FDinoff Well! No luck. I tried the MRU install using pathogen as described in the link. That worked. But the snipMate doesn't. – shparekh Aug 14 '13 at 01:57
  • 1
    @shparekh maybe its time to ask. What actually doesn't work? – FDinoff Aug 14 '13 at 02:00
  • snipmate. Why the down votes guys? It's a legitimate problem. SnipMate doesn't work in the environment that I have. And I am asking for help. – shparekh Aug 14 '13 at 14:58
  • @shparekh The downvote is because you haven't told us how snipmate isn't working. You only say it doesn't work. Also you really should stay out of program files. It should be in `%userprofile%/vimfiles` (ie go to `%userprofile%` in an explorer window. (should be your home directory). Create the folder vimfiles. and place your plugin in there (or a bundle directory in there)) – FDinoff Aug 14 '13 at 17:22
  • @FDinoff I appreciate you trying to help but I have 2 problems with your downvote - (1. I explain that it doesn't work for me in my environment. In my opinion it is self explanatory that snipMate's install didn't go very well. (2. If by "Also" in you comment of explaining downvote, you mean that just because the environment uses "program files" the question should be downvoted... I do not agree. This is a problem with the setup not the *question*. Anyway, the problem is fixed. Thanks once again for trying to help. I have answered my own question. – shparekh Aug 14 '13 at 18:11
  • @shparekh the downvote was only for 1. There could be many ways that snipmate doesn't work. (doesn't run when you try to use a command, doesn't do what you expect, etc) The also part was because I didn't feel like writing another comment. (Would you mind explaining how you fixed it?) – FDinoff Aug 14 '13 at 18:14
  • Yes! I am going to answer my own question. Feel free to upvote the question if you feel like it after you see the answer. – shparekh Aug 14 '13 at 18:16

2 Answers2

3

I'm a Unix guy and don't know much about Windows, but try the following steps:

1) Per default pathogen searches in your personal folder ($HOME\vimfiles\bundle) and not in Vim's installation directory

2) Put call pathogen#infect() at the top of your vimrc

3) Maybe try commenting out the two mswin lines, maybe they interfere somehow

4) Which snipmate did you use? There is the old, unmaintained version from msanders (I still use this one) that has no depedencies and there is a fork by garbas that actually has dependencies

mhinz
  • 3,291
  • 20
  • 20
  • I manually created the c:\program files\vim\vimfiles\bundle\snipmate.vim and extracted msanders snipMate rev 0.83 into this folder. Ofcourse, that didn't help. I moved the call to the top of vimrc and removed teh mswin lines as well. – shparekh Aug 13 '13 at 21:42
  • 2
    No, \program files\ is where installed softare goes, as far as I know. `:echo $HOME .'\vimfiles'` should give you the proper directory. – mhinz Aug 13 '13 at 21:47
  • Actually, the $HOME variable was not pointing to c:\"program files"\vim. But I changed it to point to the vim install folder. But that didn't help. – shparekh Aug 14 '13 at 15:02
  • 2
    You're not supposed to point $HOME to another directory, but to put your plugins into the directory it points to. `:echo $HOME .'\vimfiles` is probably the same as `%USERPROFILE%\vimfiles`. – mhinz Aug 14 '13 at 15:08
0

Okay finally problem solved. After some reading and trial&error, I stumbled upon this question which did it. The path separator slashes in the _vimrc are "\" by default. But they need to be "/". Thank you those who helped with their answers and comments.

The working _vimrc file is shown below -

"for pathogen
runtime ../vimfiles/bundle/vim-pathogen-master/autoload/pathogen.vim
execute pathogen#infect()
execute pathogen#helptags()

"for snipmate
let g:snippets_dir="$VIMRUNTIME/../vimfiles/bundle/sv-snippets/snippets"

set nocompatible
set textwidth=80
set formatoptions=cqrol
set ts=2
set expandtab
set guifont:Courier_New:h8:cANSI
set backupdir=$temp
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

filetype plugin indent on
syntax on

autocmd BufEnter * setlocal cursorline cursorcolumn
hi cursorcolumn ctermbg=247 guibg=grey70
hi cursorline ctermbg=247 guibg=grey70    

Some notes about this _vimrc -

  1. I call pathogen#helptags() in _vimrc because I am sure I shall forget it. I do not have too many plugins so this is not a problem.
  2. During the exercise I stumbled upon a way to locate pathogen in the bundle folder as well. Thank you Ted Reed for this. I haven't seen anybody talk about installing pathogen this way. But it's great because now the install is not corrupted even with the pathogen files.
  3. I did not see any differences in the behavior if I comment out the mswin related statements. But I left it in there because I do not completely know what they do and I have been using it this way for a longtime now without any issues.

The directory structure I use -

c:\program files\vim\vim74 - vim install, given by $VIMRUNTIME
c:\program files\vim\vimfiles\bundle - plugins such as pathogen, snipmate
c:\program files\vim\_vimrc 
Community
  • 1
  • 1
shparekh
  • 820
  • 10
  • 20