Hi Ivan,
On Sat, 11 Jan 2014 20:29:17 -0800 (PST)
Ivan <ivan.brennan@gmail.com> wrote:
> I've written a few iabbreviations into my vimrc that act like snippets, but
> they're pretty primitive compared to some of the available plugins (like
> snipMate). I'm thinking about trying out snipMate, or something similar, and
> I'm curious whether people find them a huge help, or something that can get
> in the way. I've been trying to keep my setup somewhat minimal, but some kind
> of snippet system would probably be a big help.
>
> Just fishing for opinions! :)
>
Regarding the question at the /topic - "Do most Vim users use snippets?", I
cannot answer this question because we have not done a definitive
https://en.wikipedia.org/wiki/Referendum about that among Vim users, doubt
it's possible, and I'm not sure the subscribers of this mailing list are
representative of them.
In any case, I'm using UltiSnips and find it of utility quite often. For
example, when writing Perl 5, I can write "_slurp" and then tab to give me:
«
sub _slurp
{
my $filename = shift;
open my $in, '<', $filename
or die "Cannot open '$filename' for slurping - $!";
local $/;
my $contents = <$in>;
close($in);
return $contents;
}
»
Or I can write "xsor"+[Tab] and then type the name once and get something like:
«
sub _hello
{
my $self = shift;
if (@_)
{
$self->{_hello} = shift;
}
return $self->{_hello};
}
»
I still have not completely integrated UltiSnips into my workflow - for
example, I still fully type the "if" conditionals and "while" loops. But it's
still coming at utility.
Another place where I like UltiSnips is for HTML files. I can write lipa to
give me:
<li>
<p>
<a href="..." > </a>
</p>
</li>
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
My Favourite FOSS - http://www.shlomifish.org/open-source/favourite/
A wiseman can learn from a fool much more than a fool can ever learn from a
wiseman. — http://en.wikiquote.org/wiki/Cato_the_Elder
Please reply to list if it's a mailing list post - http://shlom.in/reply .
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Sunday, January 12, 2014
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment