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.

96 questions
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
  • 212
  • 2
  • 4
  • 14
3
votes
0 answers

UltiSnips not work in vim:E887: Sorry,this command is disabled, the Python's site module could not be loaded

OS: Windows 10 vim version: vim8.1 Plugin manager: vim-plug I have used vim-plug to install the following plugins successfully: I used Anaconda3 to create a new environment called VimEnv and equipped with the 32bit python2.7 version. In cmd, I…
yahoo
  • 293
  • 1
  • 4
  • 10
3
votes
1 answer

Can't Enter newline in insert mode while using YouCompleteMe and Ultisnips

I can't press Enter in Insert Mode while using the above two plugins. Is there a way to fix this? Or reassign how YouCompleteMe handles Enter? I'm using the default configuration for YouCompleteMe, and a simple config for Ultisnips as follows: au…
Jin
  • 778
  • 1
  • 8
  • 23
3
votes
1 answer

Vim UltiSnips plugin remaps (Enter key) in insert mode even when I'm not in a snippet

Whenever I hit Enter in insert mode, nothing happens, which is quite annoying as you can probably imagine. I've checked the mapping with :imap and it turns out UltiSnips maps : i * =UltiSnips#ExpandSnippetOrJump() If i…
Anni
  • 33
  • 1
  • 3
3
votes
0 answers

vim ultisnips reactivate snipet

I'm a vim/ultisnips newbie trying to be more efficient when writing and coding. I've successfully installed the ultisnips plugin and it works so far. My question is: is it possible to "reactivate" a snippet after it has been filled? The…
3ak
  • 43
  • 3
3
votes
2 answers

Define UltiSnip With Variable Default Placeholder

I'm using the excellent UltiSnips Vim plugin to help improve my development workflow. I've been using it for several years now, and it has really helped me automate a lot of my redundant typing while coding. Anyhow: I'm attempting to define a…
rdegges
  • 32,786
  • 20
  • 85
  • 109
3
votes
2 answers

How to load UltiSnips file types by default in JS files?

I know that doing :UltiSnipsAddFiletypes javascript-node in vim console works. But I need this load automatically whenever I open a javascript file. Regardless documentation, I understood that I should create a ftplugin/javascript.vim file and put…
Stevens Garcia
  • 147
  • 2
  • 10
3
votes
1 answer

Adding Additional Markdown Snippets to Vim Snippets for Use When Editing Markdown Files

I have vim-snippets installed (which, as I understand it, is basically built on top of ultisnips). How do I add a snippet to markdown files (i.e., .md and .markdown files) such that if I type a // followed by a tab it converts it into a
George
  • 6,927
  • 4
  • 34
  • 67
3
votes
1 answer

Prevent vim from autofolding when typing

Every time i use snippets in vim while coding in Python i get a problem which i desire to get rid off. Here is the sequence of steps which leads to my problem: type fun and hit Tab to trigger snippets of a new function start typing to define its…
xolodec
  • 823
  • 1
  • 8
  • 17
3
votes
2 answers

vim - UltiSnips not working with YCM

when I use YouCompleteMe and UltiSnips together, I encounter 2 errors: I can type a snip pattern and the YCM dropdown menu recognizes it, however when I tab down to the snip in the menu, I cannot expand it. I have tried remapping …
3
votes
1 answer

Prevent Duplicate UltiSnips Matching

I have two UltiSnips triggers defined that are matching in one particular way that I want to prevent. The first trigger is defined as this: snippet "exa(ct)?" "Exact" r The second like this: snippet "getct|ct" "Get( CurrentTime )" rw Typing…
Chuck
  • 4,662
  • 2
  • 33
  • 55
3
votes
1 answer

vim-UltiSnips: expand one snippet in another

I would like to DRY up my snippets by expanding one snippet from another. For example some python snippets: snippet all from __future__ import print_function import numpy as np endsnippet snippet ia import $1 as $2 endsnippet snippet future from…
Simon Walker
  • 5,523
  • 6
  • 30
  • 32
2
votes
0 answers

Ultisnips Neovim - Timestamp with strftime() keeps changing

I have the following snippet for the .cpp files. /** * author: kartikPant23 * created: `!v strftime("%d.%m.%y %H:%M:%S")` **/ #include using namespace std; int main () { $1 return 0; } The problem here is that…
2
votes
1 answer

Ultisnips dynamic tabstop generation based on first tabstop

I want a Ultisnips snippet capable of dealing with the following scenario: const [value1, value2, value3, ...valueN] = await Promise.all([ promise1, promise2, promise3, ..., promiseN, ]); Based on what I type inside the first square…
Henrique Barcelos
  • 7,670
  • 1
  • 41
  • 66
2
votes
1 answer

ultisnips gives me an error message in Vim: E117: Unknown function: UltiSnips#

I've got the next error when trying to use ultisnips plugin in vim. vim starts but the message appears every time I to run several commands in vim. E117: Unknown function: UltiSnips#FileTypeChanged I'm using: Debian 10 Buster vim-plug to manage…
Eduardo RE
  • 171
  • 1
  • 5