I had so much grief with this. Here is an answer for future reference for those of you who do not want to suffer headaches.
I have a shared .vimrc
served on a samba share. Both Windows gViM and ViM use this file.
Relevant Part of .vimrc for Windows
I have a samba share mounted under L:
. Note that I actually had to use POSIX for the path, not Windows backslashes \
despite being a path for Windows.
if has('win32') || has('win64') "If gVim under Windows"
let g:UltiSnipsSnippetDirectories=["L:/.vim/custom_snippets"]
endif
Relevant Part of .vimrc for Unix
My terminal opens xterm-256color
for more colors, but you could exchange that with xterm
. Here the path can expand ~
correctly, since this is the real home directory where my ``.vim` lives.
if $TERM == "xterm-256color"
let g:UltiSnipsSnippetDirectories=["~/.vim/custom_snippets"]
endif
Finishing Touches to Load custom_snippets
You don't need any! The following changes are NOT necessary:
"let g:UltiSnipsSnippetDirectories=["custom_snippets"]
"let g:UltiSnipsSnippetsDir="~/.vim/snippets_custom/"
However, Putty does not pass the tab key or control key properly it seems, despite all paths working fine. I tested the paths with :UltiSnipsEdit
while in a file type environment set ft=tex
and it took me to ~/.vim/snippets_custom/tex.snippets
as it should (both in gvim on Windows and from my unix console).
Perhaps Useful for enabling in Putty