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
0 answers

Ultisnips transformations with regex seem to not work

I am trying to remove whitespace at the beginning of a tabstop using transformations. I have found that the regex \S+ should return all characters that aren't whitespace. snippet getset "Create a get/set pair" b ${1:type} get${2:name}(){ return…
DrLuke
  • 11
  • 2
1
vote
1 answer

installing ultisnip with vim-snippets

I tried to install ultisnip on vim with vundle , following exactly this code: " Snippets are separated from the engine. Add this if you want them: Bundle 'honza/vim-snippets' " Trigger configuration. Do not use if you…
podema
  • 13
  • 3
1
vote
0 answers

map ultisnips snippet to a keymap

I know that by default ultisnips snippet are triggered when the TABkey is pressed. I also know that this trigger key can be changed. However, can a snippet be triggered automatically when certain keys are typed. For example, suppose I have the…
Curious2learn
  • 31,692
  • 43
  • 108
  • 125
1
vote
1 answer

UltiSnips not completing all the placeholders

How to write a simple snippet where the placeholder value is replaced at both places. snippet test "test struct" type ${1} struct { id string } func (p *${1}) Id() string { return p.id } endsnippet so when I type test, it needs to…
bsr
  • 57,282
  • 86
  • 216
  • 316
0
votes
0 answers

Vim plugins on IdeaVim

I was using Vim in my computer, but recently I began using IntelliJ as IDE. I was using some plugins in my Vim such as UltiSnips, vimtex, through vim-plug. the problem is to transfer the plugins into IdeaVim in IntelliJ, I know about .ideavimrc…
0
votes
2 answers

ultisnip multi-line trigger possible?

I'd like to create an Ultisnip regex trigger that triggers with multi-line. I'm trying the following: snippet 'hee\nhaa' "multi-line trigger" r my awesome result$0 endsnippet but when in my vim I write : hee haa It doesn't work. I tried with…
franck
  • 13
  • 5
0
votes
1 answer

Unable to autocomplete with lsp using mason.nvim and nvim-cmp with ultisnips

I'm using neovim to edit my LaTeX and python projects, using packer to be my plugin manager. I'm trying to use lsp along with ultisnips to autocomplete, and for now the ultisnips works very well but lsp doesn't work. Here is my configures. --…
0
votes
0 answers

neovim- set global variable for UltiSnips

In vim, I remap my key tab to using this: ".vimrc let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsJumpBackwardTrigger="" now I want to migrate this to neovim, done installed and everything,…
sooon
  • 4,718
  • 8
  • 63
  • 116
0
votes
0 answers

Setting via vimrc does not seem to be reflected inside of VIM

I have the following vimrc: if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall…
Tryer
  • 3,580
  • 1
  • 26
  • 49
0
votes
0 answers

Dynamic tabstop generation with custom justified option in snippets

Ultisnips provides the option of writing a tex snippet with dynamic tabstop location. The code is available here, the relevant parts of which are reproduced below: global !p def create_matrix_placeholders(snip): # Create anonymous snippet body …
Tryer
  • 3,580
  • 1
  • 26
  • 49
0
votes
1 answer

How to add python3 support to MacVim?

I recently installed MacVim (not through brew), and as I was trying to set up some basic configurations, I encountered an issue with python3 and the UltiSnips plugin. My vimrc is currently just a very basic one that I downloaded from vim bootstrap,…
0
votes
0 answers

error when switching to insert mode of vim after installing a github config

I am currently installing a vim config by the name of vimcake. Once the installation is done when I try to write to a file by switching to insert mode this error is displayed permanently. Would you have any information on this? I'm on macOS and…
legnico
  • 17
  • 2
0
votes
1 answer

txt.snippets-file not loaded

As a windows user my .snippets-files are located at $HOME\vimfiles\Ultisnips. I created some snippets to use in .txt-files and stored them in a file named txt.snippets. When i created a new .txt-file they weren't available. So for testing if they…
0
votes
3 answers

Regex Puzzle: Match a pattern only if it is between two $$ without indefinite look behind

I am writing a snippet for the Vim plugin UltiSnips which will trigger on a regex pattern (as supported by Python 3). To avoid conflicts I want to make sure that my snippet only triggers when contained somewhere inside of $$___$$. Note that the…
Shadow43375
  • 514
  • 7
  • 20
0
votes
1 answer

vim - how to use complete_check() on mapping

while Integrating ultisnip and supertab - I am trying to map F7 so if there are completion to be made with supertab or ultisnip - try to complete, otherwise if there are no suggested patterns (and ultisnip cant expand), ultisnip forwardsJump. but…
suannai
  • 13
  • 4