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
2
votes
1 answer

Installing the snipMate plugin for MacVim

When I download the snipMate plugin from github and extract to my .vim directory do I have to move the snipMate.vim file to plugins directory that's located in my .vim directory?? The snipmate directory downloaded from github also contains a plugin…
CPerez721
  • 65
  • 8
2
votes
3 answers

Inserting $1 in a snippet with snipMate

How can I insert a literal $1 in a snippet, using snipMate? I could not find that information in the manual… Results in nothing (tries to find a placeholder): snippet s $1 Result in $ only: snippet s $$1
sidyll
  • 57,726
  • 14
  • 108
  • 151
2
votes
1 answer

Moving vimfiles location breaks snipmate.vim?

I'm working on moving my whole vim config to my Dropbox folder in order share it between machines more effectively. To do this, I've changed my .vimrc to the following: set runtimepath+=$HOME/My\ Documents/Dropbox/vim source $HOME\My…
Paul Wicks
  • 62,960
  • 55
  • 119
  • 146
2
votes
3 answers

Vim and snipMate (plugin) - adding new snippet won't work

I am trying to create a new snippet to my snipMate plugin. I work with some files called (i.e.) myfile.endfile All .endfile files should have the same "snippet" like .html files. So I did cp html.snippet endfile.snippet in my ~/.vim/snippets…
Newbie
  • 1,644
  • 5
  • 29
  • 40
2
votes
1 answer

vim-snipmate change end cursor location

I have just started using vim-snipmate so i might be doing it the wrong way. I defined a custom snippet like snippet model const mongoose = require('mongoose'); module.exports = mongoose.model('${1}',mongoose.Schema({ ${2} })); The…
georoot
  • 3,557
  • 1
  • 30
  • 59
2
votes
1 answer

keypress into buffer from function

I'm working on creating a function that will: Inspect the current file I'm working on Create a new buffer in my test directory based on my file name Edit that file and start my snipmate "test" template So far I have everything working except…
Josh Bodah
  • 1,223
  • 6
  • 17
2
votes
1 answer

Snipmate doesn't expand anymore

Snipmate used to expand snippets, but it stopped working. I changed a few unrelated things in my vimrc, but I don't know what caused it (and I have no backup of the old file). My investigation so far: Pressing tab doesn't expand and instead inserts…
Christian Aichinger
  • 6,989
  • 4
  • 40
  • 60
2
votes
1 answer

vim-snipmate not expanding non-source code file

I am using snipmate for coding and it works fine. However I would also like to use it on txt file extension, but this does not work at all. Is it designed to work like that? How can I get snippet expansion on ad-hoc file types?
Lynx-Lab
  • 795
  • 8
  • 17
2
votes
1 answer

How does VIM's Ultisnips plugin handle delete inside of HTML snips? How do I change id to class in a div?

I'm new to Ultisnips. In insert mode I type div [tab] then I get:
With the cursor on name. If i wan't to use class instead of id I hit backspace and get this
With the cursor on the first v. Now if I want to…
jeff_kile
  • 1,805
  • 16
  • 21
2
votes
1 answer

snipMate filetype isn't set correctly

I downloaded vim and used it in a python file and the snippets worked perfectly. But when I tried to use snipMate in a .go file (golang) it didn't work. I read the documentation and couldn't find an answer but when I manually used the command ":set…
bab
  • 2,119
  • 3
  • 28
  • 49
1
vote
2 answers

vim snipmate shortcut for inserting snip inside tab

I have been using Vim with the snipMate plugin for creating HTML code. This is the code I want to type quickly: So I start in insert mode typing ulTabliTab but then when I try typing atab to…
tdh87
  • 585
  • 1
  • 4
  • 8
1
vote
1 answer

When editting a Rails project with Vim, the SnipMate plugin only loads the ruby snippets. How can I get the ruby-rails snippets?

When editing my Rails app, snipMate only seems to load the ruby snippets file and not the ruby-rails snippets file as the ruby snippets work and the rails snippets do not. I am using them within a Rails application. Any idea what the problem may…
jklina
  • 3,407
  • 27
  • 42
1
vote
3 answers

Entering text in snippet fields uses wrong character when using langmap

I am using a custom keymap using langmap option in vimrc. I am trying to use snipmate but I am running into trouble. When I type a word and hit tab it allows me to edit the parameter. The problem is that the first character is the remapped one,…
Pubby
  • 51,882
  • 13
  • 139
  • 180
1
vote
1 answer

How to add another file extension (e.g. 'style.less') to Vim's snipMate plugin?

I would like to write snippets for Less (.less) and Stylus (.styl) and use then in Vim's snipMate plugin. How can I accomplish that? EDIT: I know that the first step is to create a file inside the snippets folder with a name like this: less.snippets…
alexchenco
  • 53,565
  • 76
  • 241
  • 413
1
vote
0 answers

Requiring luasnip to neovim causes errors

I am trying to use luasnip. The configuration I am using is AstroNvim. The modifications I made to this configuration are : require("luasnip.loaders.from_snipmate").lazy_load() at the end of init.lua Made a directory snippets in the same directory…
Marvin Kim
  • 11
  • 2