I'm running Vim 8.0.124 and I've installed the 
[vim-snipmate](https://github.com/garbas/vim-snipmate) plugin to use in my 
Python and Django development.  I followed the instructions by creating a 
.vimrc file that contains the following:

    # ~/.vimrc
    set nocompatible            " Required by Vundle
    filetype off                        " Required by Vundle

    " Begin Vundle settings 
==========================================================
    "
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()

    Plugin 'VundleVim/Vundle.vim'
    Plugin 'MarcWeber/vim-addon-mw-utils'
    Plugin 'tomtom/tlib_vim'
    Plugin 'garbas/vim-snipmate'
    # Optional
    Plugin 'SirVer/ultisnips'
    Plugin 'honza/vim-snippets'

    call vundle#end()
    filetype plugin indent on
    "
    " End Vundle settings 
==========================================================

    " SnipMate
    autocmd FileType python set ft=python.django
    autocmd FileType html set ft=htmldjango.html

    " UltiSnips
    let g:UltiSnipsExpandTrigger="<tab>"
    let g:UltiSnipsJumpForwardTrigger="<c-b>"
    let g:UltiSnipsJumpBackwardTrigger="<c-z>"
    let g:UltiSnipsEditSplit="vertical"

Installing vim-snipmate includes the creation of these four files:

    ~/.vim/bundle/vim-snippets/snippets/django.snippets
    ~/.vim/bundle/vim-snippets/snippets/htmldjango.snippets
    ~/.vim/bundle/vim-snippets/UltiSnips/django.snippets
    ~/.vim/bundle/vim-snippets/UltiSnips/htmldjango.snippets

I have two questions.  First, why are the UltiSnip Django snippets not working? 
 The snippets in snippets/django.snippets work but those in the UltiSnips 
django.snippets file don't.  If I open a file test.py and type "fdate<tab>" 
where fdate should expand into a Django DateField, nothing happens (other than 
a tab is entered).  Initially, when the UltiSnips weren't working, I went to 
its Github page and read the instructions which seemed to indicate I should add 
the SirVer plugin so I did.  Even then, then don't seem to work.  I should  add 
that what you see above is my entire .vimrc file. Also, I created a completely 
new ~/.vim directory which only contains the Vundle and vim-snipmate bundles so 
there shouldn't be any other conflicts.

My second less important question is, when I view any of these snippet files, 
most of the lines are folded.  Is there any way I can configure Vim so that 
when I open any of these .snippet files, all the folds will be open?  They 
would be easier to search that way.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
  • [no subject] Robert F.
    • Re: Ben Fritz

Reply via email to