Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Mirzalazuardi Hermawan
@mirzalazuardi
Is ultisnips provide emberjs in coffeescript?
Holger Rapp
@SirVer
@mirzalazuardi I do not understand your question. All our snippets are in https://github.com/honza/vim-snippets/.
PSA: I am retiring as a maintainer. @seletskiy takes over. Please see for details SirVer/ultisnips#617.
Mirzalazuardi Hermawan
@mirzalazuardi
my question is there emberjs or other popular plugins like reactjs snippet provide by ultisnips
thanks for replying my question
Chris Paul
@bounceme
Hey, there seems to be an incompatibility with snipmate in some instances.please see this issue:
honza/vim-snippets#656
Severen Redwood
@severen
@SirVer I assume this is the reason for the stall in development on Swiboe?
Holger Rapp
@SirVer
@SShrike yes.
Camron Cade
@camroncade
does anyone know how I can make a snippet that replaces and spaces with underscores as I type?
maybe a live preg-replace?
Derek Robati
@drobati
Hello
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:59)
Included patches: 1-52
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version with GTK2 GUI. Features included (+) or not (-):
+acl +cscope +folding +menu
+netbeans_intg -sniff +virtualedit
+arabic +cursorbind -footer +mksession +path_extra
+startuptime +visual
+autocmd +cursorshape +fork() +modify_fname +perl
+statusline +visualextra
+balloon_eval +dialog_con_gui +gettext +mouse
+persistent_undo -sun_workshop +viminfo
+browse +diff -hangul_input +mouseshape +postscript
+syntax +vreplace
++builtin_terms +digraphs +iconv +mouse_dec +printer
+tag_binary +wildignore
+byte_offset +dnd +insert_expand +mouse_gpm +profile
+tag_old_static +wildmenu
+cindent -ebcdic +jumplist -mouse_jsbterm +python
-tag_any_white +windows
+clientserver +emacs_tags +keymap +mouse_netterm -python3
+tcl +writebackup
+clipboard +eval +langmap +mouse_sgr +quickfix
+terminfo +X11
+cmdline_compl +ex_extra +libcall -mouse_sysmouse +reltime
+termresponse -xfontset
+cmdline_hist +extra_search +linebreak +mouse_urxvt +rightleft
+textobjects +xim
+cmdline_info +farsi +lispindent +mouse_xterm +ruby
+title +xsmp_interact
+comments +file_in_path +listcmds +multi_byte +scrollbind
+toolbar +xterm_clipboard
+conceal +find_in_path +localmap +multi_lang +signs
+user_commands -xterm_save
+cryptv +float +lua -mzscheme +smartindent
+vertsplit +xpm
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H
-DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/
include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/gdk-pixbuf-2.0
-I/usr/include/pango-1.0 -I/usr/include/gio-unix-2
.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/pixman-1 -I/usr/inc
lude/libpng12 -I/usr/include/harfbuzz -g -O2
-fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -U_FOR
TIFY_SOURCE -D_FORTIFY_SOURCE=1
-I/usr/include/tcl8.6 -D_REENTRANT=1
-D_THREAD_SAFE=1 -D_LARGEFILE64_SOURCE=1
Linking: gcc -L. -Wl,-Bsymbolic-functions
-Wl,-z,relro -rdynamic -Wl,-export-dynamic -Wl,-E
-Wl,-Bsymbolic-functions -Wl,-z,relro
-Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0
-latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0
-lgdk_pixbuf-2.0 -lcairo -
lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0
-lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp
-lSM -lICE -lm -ltinfo -lnsl -ls
eli
oh sorry thought gitter would have gist support or something like slack
Either way I tested as the install docs say
and have the correct version of python and am even able to run those commands in vim fine
but when I load ultisnips I get crazy errors
I'll try not to paste those directly :\
Derek Robati
@drobati
I was just thinking that maybe because I use vim-plug I need to update
nope PlugUpdate didn't change anything
Derek Robati
@drobati
I think I solved the problem.
It looked like it was because I symlink .vim to a mounted dotfile folder in my vm
and then after I used a command to clean all pyc files
Nikolay Nozdrin-Plotnitsky
@scientistnik
Hello everyone! please tell me how create snippet for 'snip': in video 'snip' create to 'snippet endsnippet'. I tryed this do, but nothing. Maybe you give me text this snippet?
Holger Rapp
@SirVer
@scientistnik You need a little hack to make that work: https://github.com/honza/vim-snippets/blob/master/UltiSnips/snippets.snippets#L3
Alejandro Gallo
@alejandrogallo
I do not know if this is the most appropriate place to post this. Hello all, I am preparing for my personal use a project I keep updating over and over, and I realised that I could use some help and probably some nice ideas from people around here. It is about creating consistent snippets over a wide range of programming languages. vim-snippets is very nice but I always have to go back and check how to define function in python (trigger def) and in javascript is fun etc.. etc.. So I did my own general classification and for every programming language I use I have so as a trigger for standard output, class for class, arr for array, carr for constant array ... If someone is interested in doing such a Rosetta stone of programming languages please let me know and I can show you what I've got sofar.
Stanislav Seletskiy
@seletskiy
@alejandrogallo: Hi! I'm current maintainer of US. I'm dissatisfied with honza/vim-snippets because of: a) they do not use power features of US like interpolations/contexts/preexpand-/postexpand-/jump-actions, which renders them pretty useless; b) they use use long triggers which are not necessary to type.
@alejandrogallo: So, your proposal for using class for class does not sound efficient to me. For example, I'm using snippet with auto-trigger s which covers any type declaration in Go-lang: https://cloud.githubusercontent.com/assets/8445924/8632734/a3579b5a-2797-11e5-81fd-2f515ac04f04.gif
Alejandro Gallo
@alejandrogallo
This message was deleted
Alejandro Gallo
@alejandrogallo
@seletskiy I just deleted the previous message. So to sum up, it sound nice to use hardcore US capabilities. Originially I was just looking for simple snippets but fully consistent across different programming languages, so that you know exactly how to kickstart a method or a main method in a random programming language (and also for markup languages, bold font, italics, paragraph etc...)
A very crude example is here
https://asciinema.org/a/1ke63r2keh289x905yltl17jz
and you can take a look to my current triggers which I intend to implement where possible for different programming languages, I already have many implemented.
https://github.com/alejandrogallo/dotfiles/blob/master/link/vim/UltiSnips/rosetta/triggers.db
Alexander Yakovlev
@Oreolek
damn. how can I install this ultisnips?
it can't understand the vim-snippets package
Alexander Yakovlev
@Oreolek
nevermind, solved it. ugh, so complicated
mp526
@mp526
is Java no longer supported?
theres no Java in the snippets
rockydd
@rockydd
Hey Gus
Sorry, I mean hey guys.
Have a snippet problem, which looks like a recursive issue.
rockydd
@rockydd
For example I'd like to write a statement like " var http = require('http')". I have a snippet of "v" which will be expand to "var varname = xxxxx", but http is also a snippet. So after I typed http, and try to jump to next field, it will expand http instead of jumping to next field.
How to fix this? Thanks!
Befedo
@Befedo_twitter

Hi guys ...
I'm trying out the alias example given here. My Snippet-File looks like:

snippet pr "print debug" bw
`!p
prefix = t[1] + ": %q\\n' "
prefix = "{}:{}: {}".format(
    os.path.basename(px.buffer.get().name),
    str(px.cursor.get()[0]),
    prefix
)
`printf 'XXXXXX `!p snip.rv=prefix`$1 >&2
endsnippet

post_jump "px.snippets.expand(snip)"
snippet pd "Description" b
pr$1 >${2:/tmp/debug}
endsnippet

But when I expand the snippet this leads to:

...
NameError: name 'px' is not defined

Executed snippet code:
  1
  2   prefix = t[1] + ": %q\\n' "
  3   prefix = "{}:{}: {}".format(
  4 >     os.path.basename(px.buffer.get().name),
  5       str(px.cursor.get()[0]),
  6       prefix
  7   )
  8

What am I getting wrong? I'm running UltiSnips on Neovim with Python enabled :echo has ('python') is 1.

Thanks for your time and best regards,

Befedo

Befedo
@Befedo_twitter

Got it ... :)

Had to add:

global !p
def expand(snip):
    if snip.tabstop != 1:
        return
    vim.eval('feedkeys("\<C-R>=UltiSnips#ExpandSnippet()\<CR>")')
endglobal

To my local Snippet-File, to get expansion working.

linuxing3
@linuxing3
I installed ultisnips with vimplug on vim8.0 on mac. But can’t get it work. Could help?
ultisnips.png
Pratik Bhusal
@PratikBhusal
Hi I was wondering if there was a way to dynamically change the size of a string as you type. In particular, I'm trying to change the number of dashes based on what I type into $1. Do you guys have any suggestions on how to do this? It may work with python interpolation, but I'm not well versed in python.
snippet bordp "Add a border pair" b
" $1 {{{ ${2:------------------------------------------------------------------}
${0:${VISUAL:" Content}}
" $1 }}} $2
endsnippet
Rodrigo Queiro
@drigz
@PratikBhusal, do you mean something like this?
snippet bordp "Add a border pair" b
" $1 {{{ `!p snip.rv = '-' * (70 - len(t[1]))`
${0:${VISUAL:" Content}}
" $1 }}} `!p snip.rv = '-' * (70 - len(t[1]))`
endsnippet
If that's not the right number of dashes, you can change the expression (70 - len(t[1]))
Charles-André Bouffard
@cabouffard

Hi! I'm having a small problem with UltiSnips;

When I'm in a vim buffer, the default python and all snippets work, but not my custom one.. Ultisnips detects that I've created custom snippets, but I'm unable to expand them.
I've checked if the snippets were found and they are;

:UltiSnipEdit!
1: /Users/cabouffard/src/configs/UltiSnips/all.snippets
2: /Users/cabouffard/src/configs/UltiSnips/python.snippets
3: /Users/cabouffard/src/configs/dotfiles/.vim/bundle/vim-snippets/UltiSnips/all.snippets
4: /Users/cabouffard/src/configs/dotfiles/.vim/bundle/vim-snippets/UltiSnips/python.snippets

I made sure that my rtp contained my folder with set rtp+=~/src/configs/UltiSnips/ and when I do :UltilSnipEdit it correctly open my custom file.

My custom python.snippets file includes:

snippet dw "print test" b
This should print this text
endsnippet

I've tried adding custom snippets to my all.snippets file but I have the exact same behavior.

Here are my custom configurations for UltiSnips:

    let g:UltiSnipsExpandTrigger = "<tab>"
    let g:UltiSnipsJumpForwardTrigger = "<tab>"
    let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
    let g:UltiSnipsSnippetsDir = "/Users/cabouffard/src/configs/UltiSnips"
    let g:ultisnips_python_quoting_style = 'single'
    let g:ultisnips_python_style = 'google'

Any suggestions?

Pratik Bhusal
@PratikBhusal
@drigz It works amazingly! Could you tell me what t[1] represents? I know what len() does thanks to :h len().