Questions tagged [snipmate]

Snipmate is a vim script that implements some of TextMate's snippets features in Vim.

Snipmate is a vim script that implements some of TextMate's snippets features in Vim. A snippet is a piece of often-typed text that you can insert into your document using a trigger word followed by a "Tab"

96 questions
31
votes
3 answers

Vim: SnipMate Plugin: how i can change a .snippet and update it on the fly?

does anyone know how to edit a dot snippet file and reload into (g)vim without closing and re-open the program? it would be great to do that with this excellent plugin. greetings
forellana
  • 937
  • 1
  • 8
  • 19
14
votes
6 answers

How to add new snippets to snipMate in VIM

Ive just started using the sniptMate plugin for VIM and love it, however, since my collection of snippets isn't huge, I'd like to be able to add new snippets dynamically rather than opening the snippets file and creating a new snippet as I am in the…
Omnipresent
  • 29,434
  • 47
  • 142
  • 186
13
votes
7 answers

Vim html.erb snippets?? snipMate Need a vim tip

When I'm in an html.erb file, I get no snipMate snippets. I would like both HTML and Ruby, or just HTML would be fine, How would I do this? Would I need to write a set of snippets? If so, is there a way of pulling in existing snippets without…
Daniel Upton
  • 5,561
  • 8
  • 41
  • 64
10
votes
4 answers

Snippets for Bash Command Line?

I use vim and snipmate a lot for my python programming. It would be ideal if I could have a snippet system for the bash command line. Right now I use the gnome terminal in ubuntu... For instance, if I type: for I get: for i in {1..50}; do…
sequenceGeek
  • 767
  • 1
  • 8
  • 20
10
votes
5 answers

Can we use multiple snippet files for given filetype in vim?

When using snipmate + vim, is it possible to have many snippet files load for a given language/filetype? Ex: snipmate comes with javascript.snippets I've also loaded the mootools snippets and added this to my vimrc: autocmd FileType javascript set…
Jonathan Beebe
  • 5,241
  • 3
  • 36
  • 42
8
votes
1 answer

vim snipmate - use a variable multiple times in a snippet

sometimes I need to use a variable multiple times in a snippet. For instance, when I need to set a key-value list: ${1}_key: ${1}_value I hope the cursor can stop at the first ${1} when I trigger snipmate in this case. When I input something like…
Brian
  • 30,156
  • 15
  • 86
  • 87
8
votes
1 answer

Automatic headers when opening a new python file with vim

Possible Duplicate: How can I automatically add some skeleton code when creating a new file with vim I googled and searched on SO for a way to create automatic headers when creating a new python file. I was hoping to find something with snipMate…
statquant
  • 13,672
  • 21
  • 91
  • 162
7
votes
3 answers

Changing the case within Snipmate.vim snippets?

Is it possible to change the case of variable values within Snipmate snippets? For example: snippet dc def create @${1} = $1.new end Should output: def create @product = Product.new end I tried to use backticks to call a custom…
Jari Jokinen
  • 770
  • 3
  • 13
7
votes
3 answers

Vim: snipMate plug-in does not trigger snippet completion

Vim is installed at /usr/share/vim. All snipMate's folders were added to this category in existing folders (after, autoload, plugin, snippets, etc.) accordingly. From the documentation file: For instance, to change the trigger key to CTRL-J, just…
BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
7
votes
3 answers

change the default tab in snipMate

I have been reading the documentation for a while but I can't seem to find any information on how to change the default key for completion in snipMate. Here is the documentation.…
Lim H.
  • 9,870
  • 9
  • 48
  • 74
6
votes
4 answers

SnipMate with Pathogen

I've just installed pathogen on my ~/.vim and add the new command to run the bundles :call pathogen#infect() I've already add to my ~/.vim/bundle folder vim-surround and NERDtree and everything works great. Nevertheless, when I tried to add…
Jonatas Eduardo
  • 655
  • 2
  • 9
  • 17
6
votes
2 answers

Trying to change directory for UltiSnips snippets

What is the correct way to change where UltiSnips searches for snippets. I tried this in my ~/.vimrc with no success: let g:UltiSnipsSnippetsDir = "/newfolder/snippets/" let g:UltiSnipsSnippetDirectories=["UltiSnipsNewDir"]
horatio1701d
  • 8,809
  • 14
  • 48
  • 77
6
votes
2 answers

Vim - Activiting HTML snippets on PHP files

I am using vim and snipMate, many times I need to name the HTML files to PHP, just because of 1 or 2 lines of code. I every time I create a PHP file vim takes it as PHP file and so the HTML snippets are not available, thus have to activate the HTML…
6
votes
2 answers

Adding vim snippets

I have found this resource for Ruby/Rails snippets, seems like it has lots of cool snippets that I could use with vim. But since I'm new to vim, I don't know how to enable those snippets to my vim editor. There is no instruction manual as such. How…
sameera207
  • 16,547
  • 19
  • 87
  • 152
5
votes
1 answer

Global snippets in vim

I use snipMate in Vim, and try to use certain snippets in any type of file. But I could only find ways of relating snippets to specific filetypes. Is there a way to set 'global' snippets?
user852091
  • 3,070
  • 5
  • 23
  • 21
1
2 3 4 5 6 7