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
1
vote
1 answer

Can we combine the usage of Vim Plugins: Ultisnips and youcompleteme, for using library function prototypes

I am using Ultisnips and youcompleteme plugins. In my C++ project, I have set(CMAKE_EXPORT_COMPILE_COMMANDS=ON) that gives me intellisense completion based on the context. I want to use the "completion" results provided by youcompleteme, and use it…
1
vote
0 answers

Tabstops in Ultisnips not working properly with zsh

I recently switched from bash to zsh and now the tabstops in my Ultisnips-snippets aren't working properly anymore. I didn't change anything in my snippet files and after I encountered the problem for the first time, I went back to bash, started vim…
n7kvz
  • 111
  • 2
1
vote
2 answers

Why doesn't UltiSnips listing of available snippets work?

I would like to list the available snippets using a simple keystroke. However I can't seem to do this. Here are my UltiSnips settings: let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpForwardTrigger="" let…
jlconlin
  • 14,206
  • 22
  • 72
  • 105
1
vote
1 answer

Why if can expand instead of ifee in vim-snippets and ultisnips?

I have installed vim-snippets and ultisnips with plugin manager--pathogen this way. cd ~/.vim/bundle sudo git clone https://github.com/honza/vim-snippets.git cd ~/.vim/bundle && git clone git://github.com/SirVer/ultisnips.git Set configuration in…
showkey
  • 482
  • 42
  • 140
  • 295
1
vote
0 answers

UltiSnips generate python docstring with a fixed size box wrapping text

I am trying to create a snippet that will let me generate a nice pattern for python docstring such as this one: #################################################################################################### #…
PiggyGenius
  • 443
  • 2
  • 9
  • 25
1
vote
1 answer

Get value from online xml

I want to get the value of the 'latest' version tag from here: https://papermc.io/repo/repository/maven-public/com/destroystokyo/paper/paper-api/maven-metadata.xml I tried using this python: import urllib.request from xml.etree import…
theonlygusti
  • 11,032
  • 11
  • 64
  • 119
1
vote
1 answer

ultisnips: How to "freeze" vim.current.window.cursor value for snippet

I had a snippet that used to work well (neovim 0.2.0) snippet #= "comment ===" b # `!p snip.rv = '=' * (78 - vim.current.window.cursor[1])` # ${1:comments} # `!p snip.rv = '=' * (78 - vim.current.window.cursor[1])` endsnippet This snippet is…
Nic
  • 3,365
  • 3
  • 20
  • 31
1
vote
0 answers

Vim NerdTree file opening in hsplit when ultisnips & YouCompleteMe

I'm facing this weird issue when I started using YCM and ultisnips. So the issue is if I select any file in NerdTree it is opening in the new buffer as expected but If is write code inside that file by using any YCM + ultisnips. It starts opening in…
Dimpu Aravind Buddha
  • 9,505
  • 4
  • 17
  • 23
1
vote
2 answers

adding new file type to ultisnips

I am trying to add for the cuda (.cu) files. The basic objective is to first make all c,cpp snippets available for the cu files and then add additional support. The first thing I did to test is to set the filetype inside vim set ft:cpp.c and this…
knightrider
  • 2,063
  • 1
  • 16
  • 29
1
vote
3 answers

Optional lines in Ultisnips using parameters

I am trying to have some additional lines inserted in snippets based on a parameter. I am not sure how design such snippet. snippet 'mysnip' 'snippets with optional lines' This snippet line1 is inserted by default
Srik
  • 2,341
  • 2
  • 21
  • 35
1
vote
1 answer

UltiSnips not work: PYTHON caused GVim to EXIT

Environments OS:Windos 7, x64 bit Vim: gvim74 from vim.org Python: Python 2.7.11 UltiSnips: just downloaded from github Gvim worked perfectly for me with SnipMate for a long time and lately I want to use UltiSnips instead. So i newly installed…
Cicero
  • 11
  • 2
1
vote
2 answers

vim ultisnips plugin doesn't work

i'm use vim on arch linux and ultisnips plugin doesn't work for my even i tried to use neocomplete and YCM but they don't work for me too, what can i do? ENV: OS: ArchLinux VIM: 7.4 $ vim --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled…
Adham El-Deeb
  • 335
  • 3
  • 16
1
vote
1 answer

Regex for extract first character of word (Ultisnips)

I am attempting to use the Ultisnips Vim plugin to replace a word with its first character, transformed to lowercase (anong other things that aren't relevant to the question). For illustration, I wish to write a snippet snippet $1 ${1/ WHAT TO PUT…
user59959
  • 193
  • 1
  • 5
1
vote
1 answer

UltiSnips - Create argument list with placeholders

I am trying to create a way in UltiSnip to take a list of variable names and transform them into a line delimited list of strings (like you would see in AngularJS). So you type each arg, jump to next placeholder, and above the function is filled in…
beeryardtech
  • 605
  • 1
  • 4
  • 15
1
vote
1 answer

Custom auto-complete with UltiSnips in vim

I would like to create snippets that do a custom completion at each tab stop using Vim's complete() function. Here's a simple example of what i want to achieve. snippet date "Date snippet" day of month: ${1:`!v complete(col('.'), [1, 2, 3, 4])`} …
siu
  • 312
  • 1
  • 5
  • 10