Questions tagged [ultisnips]

UltiSnips is a TextMate-inspired SnipMate-compatible snippet system for Vim.

UltiSnips is a TextMate-inspired SnipMate-compatible snippet system for Vim. It includes shell, VimScript and Python interpolation, and trigger matching based on regular expressions.

88 questions
135
votes
14 answers

UltiSnips and YouCompleteMe

I have bundles ultisnips and youcompleteme installed on my macvim. The problem is that ultisnips doesn't work because tab is bound by ycm. I tried putting let g:UltiSnipsExpandTrigger = "" so that I can trigger the snippet completion with…
pvinis
  • 3,855
  • 5
  • 33
  • 55
21
votes
2 answers

Vim Ultisnips - How do I move to the next placeholder or tabstop?

I just installed a brand new copy of Macvim and UltiSnips, but I can't figure out how to move to the next completions using tabstops and placeholders. When I press tab, it simply adds a tab space. My guess is that the tab key was remapped in…
Bryan
  • 15,409
  • 22
  • 92
  • 119
13
votes
1 answer

How do I configure an ultisnip to override an existing snippet?

I use rails.vim but would like to override one or two snippets with my own using ultisnips. I've created the snippets but since they're already defined by rails.vim a menu now appears when triggered. I'd like my snippets to override the existing one…
Zubin
  • 8,254
  • 7
  • 42
  • 52
10
votes
3 answers

UltiSnips doesn't automatically reload changes to snippets file

(Documenting this here because I couldn't find a good answer online.) When using UltiSnips, the documentation says (2:12 in this screencast) that writing the .snippets file is enough to cause an automatic reload of the snippet. However, this doesn't…
A.Wan
  • 1,395
  • 3
  • 13
  • 32
8
votes
1 answer

UltiSnips new snippet snippet

I'm trying to create a new snippet snippet the way that the author of UltiSnips does at 1:28 in this instructional video that he made http://www.youtube.com/watch?v=f_WQxYgK0Pk How do you put "endsnippets" inside of the snippet without it calling…
pickle323
  • 483
  • 3
  • 9
8
votes
2 answers

How to solve the collision of TAB key mapping of `UltiSnips` plugin in the Vim

I've set the mapping keys as follows: " Easy indent for code blocks nmap v> nmap v< vmap >gv vmap
mockee
  • 1,237
  • 1
  • 14
  • 20
7
votes
2 answers

Compatible way to use either :py OR :py3 in vim?

In my .vimrc and my vim plugin UltiSnips I've got a lot of code that looks like that :py << EOF print("Hi") EOF Now, I want to check if python3 is compiled into Vim via has("python3") and then use :py3 instead of :py. Keeping the python code…
SirVer
  • 1,329
  • 1
  • 16
  • 15
6
votes
3 answers

ultisnips expand not working and I can't figure out why

I removed practically everything while troubleshooting. Vim opens without error, :UltiSnipsEdit works but when I enter snip an actual tab is entered. My current vimrc. The configs have been copied from github for both Vundle and…
trevor
  • 294
  • 3
  • 12
5
votes
1 answer

vim 8, UltiSnips and coc-ultisnips: `${VISUAL}` does nothing

Using vim 8, Ultisnips, and coc-ultisnips. Consider this snippet: snippet cdeg "Add console.debug({})" console.debug(${0:${VISUAL:value}}) endsnippet I would expect it to expand cdeg to console.debug(value). The problem is if I have that…
Pierre
  • 304
  • 1
  • 13
4
votes
1 answer

UltiSnips not triggering correctly

I'm using UltiSnips. http://www.vim.org/scripts/script.php?script_id=2715 Everything works. Let's say when I type st it inserts submit_tag…. But if st is in between other characters, it won't work. For example: foostbar Anyway to…
Christian Fazzini
  • 18,642
  • 20
  • 100
  • 212
4
votes
2 answers

Trying to change directory for UltiSnips snippets

What is the correct way to change where UltiSnips searches for snippets. I tried the below with no success: let g:UltiSnipsSnippetsDir = "/newfolder/snippets/" let g:UltiSnipsSnippetDirectories=["UltiSnipsNewDir"]
horatio1701d
  • 6,909
  • 14
  • 36
  • 66
4
votes
1 answer

YouCompleteMe freezes when used with python-mode

When I type self. a popup will automatically select the first one and will never change no matter what input is given. For example, match 1 of 52 is shown. After is used to return to normal mode and enter insert mode again then YouCompleteMe…
Kamel
  • 1,586
  • 1
  • 12
  • 24
4
votes
2 answers

Vim UltiSnips - 2 File Types for 1 Snippet File

Can I map two file types to one snippet file? For example, I would like both .html and .ctp files to use the hmtl.snippets file. If not, would a sym link from the operating system do the trick? Or can I create a global snippet file for all file…
Bryan
  • 15,409
  • 22
  • 92
  • 119
3
votes
2 answers

How can you capitalize this word in VIM snippet?

EDIT — This is not possible with coc-snippets. It's possible with Ultisnips. I've got the following vim snippet that I'm using (with coc-snippets) for React: snippet STATE_HOOK "useState hook" b const [${1:state}, set${1:`!v expand('%:t:r')`}] =…
Harry Cramer
  • 1,844
  • 5
  • 15
  • 38
3
votes
1 answer

How to expand an UltiSnips snippet using in the YouCompleteMe pop-up menu?

This problem really hit a nerve with me. I have both YouCompleteMe and UltiSnips installed on my vim 8.0 editor. It seems that both of these plugins use the tab key for doing the auto-completion and that has created an incompatibility that has been…
Saeed Ahadian
  • 196
  • 1
  • 6
  • 13
1
2 3 4 5 6