www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DSnips - making D coding awesome in Vim (with GIFs!)

reply "Kiith-Sa" <kiithsacmp gmail.com> writes:
DSnips is a set of UltiSnips snippets for D (now with GIFs 
showing each snippet in action (image-heavy))

https://github.com/kiith-sa/DSnips

This is an attempt to overhaul the D snippets I got merged to 
UltiSnips (now a separate "vim-snippets" repository), as the 
previous snippets had quite a few bugs. The snippets should now 
be easy to use together/chain (e.g. an "imp" (import) snippet 
places the cursor on the beginning of the next line so "imp" can 
be used for another import, "wrap in try/catch" places the cursor 
to be ready to add more catch blocks, "module" license can be 
replaced by using another snippet inside it, etc.

There are some rather "intelligent" snippets, e.g. an operator 
builder for opBinary/opUnary/opOpAssign that will generate the 
skeleton for all operators typed in by the user, automatic DDoc 
Params: generation from function parameters, etc.

I want to eventually try to merge this back to the default 
repository, but I'd like some comments/criticism/ideas first. 
Should any snippets be removed? Added? Any problems with the 
current snippets? (the wrap in try/catch in the previous version 
had issues with wrapping indented text, for example)
Jul 17 2014
next sibling parent Justin Whear <justin economicmodeling.com> writes:
On Thu, 17 Jul 2014 20:57:10 +0000, Kiith-Sa wrote:

 I want to eventually try to merge this back to the default repository,
 but I'd like some comments/criticism/ideas first. Should any snippets be
 removed? Added? Any problems with the current snippets? (the wrap in
 try/catch in the previous version had issues with wrapping indented
 text, for example)
I'll try it out. Of course, I'm really bad at using the current D snippets (aside from `main`--use that one all the time). Those opBinary and friends snippets look quite useful.
Jul 17 2014
prev sibling next sibling parent reply "uri" <email ether.com> writes:
On Thursday, 17 July 2014 at 20:57:10 UTC, Kiith-Sa wrote:
 DSnips is a set of UltiSnips snippets for D (now with GIFs 
 showing each snippet in action (image-heavy))

 https://github.com/kiith-sa/DSnips

 This is an attempt to overhaul the D snippets I got merged to 
 UltiSnips (now a separate "vim-snippets" repository), as the 
 previous snippets had quite a few bugs. The snippets should now 
 be easy to use together/chain (e.g. an "imp" (import) snippet 
 places the cursor on the beginning of the next line so "imp" 
 can be used for another import, "wrap in try/catch" places the 
 cursor to be ready to add more catch blocks, "module" license 
 can be replaced by using another snippet inside it, etc.

 There are some rather "intelligent" snippets, e.g. an operator 
 builder for opBinary/opUnary/opOpAssign that will generate the 
 skeleton for all operators typed in by the user, automatic DDoc 
 Params: generation from function parameters, etc.

 I want to eventually try to merge this back to the default 
 repository, but I'd like some comments/criticism/ideas first. 
 Should any snippets be removed? Added? Any problems with the 
 current snippets? (the wrap in try/catch in the previous 
 version had issues with wrapping indented text, for example)
Trying this out now. It's very good so far, nice work! /uri
Jul 17 2014
parent "Kiith-Sa" <kiithsacmp gmail.com> writes:
On Friday, 18 July 2014 at 00:44:15 UTC, uri wrote:
 On Thursday, 17 July 2014 at 20:57:10 UTC, Kiith-Sa wrote:
 DSnips is a set of UltiSnips snippets for D (now with GIFs 
 showing each snippet in action (image-heavy))

 https://github.com/kiith-sa/DSnips

 This is an attempt to overhaul the D snippets I got merged to 
 UltiSnips (now a separate "vim-snippets" repository), as the 
 previous snippets had quite a few bugs. The snippets should 
 now be easy to use together/chain (e.g. an "imp" (import) 
 snippet places the cursor on the beginning of the next line so 
 "imp" can be used for another import, "wrap in try/catch" 
 places the cursor to be ready to add more catch blocks, 
 "module" license can be replaced by using another snippet 
 inside it, etc.

 There are some rather "intelligent" snippets, e.g. an operator 
 builder for opBinary/opUnary/opOpAssign that will generate the 
 skeleton for all operators typed in by the user, automatic 
 DDoc Params: generation from function parameters, etc.

 I want to eventually try to merge this back to the default 
 repository, but I'd like some comments/criticism/ideas first. 
 Should any snippets be removed? Added? Any problems with the 
 current snippets? (the wrap in try/catch in the previous 
 version had issues with wrapping indented text, for example)
Trying this out now. It's very good so far, nice work! /uri
I made a blog post about DSnips, what to consider when designing snippets, etc: http://www.reddit.com/r/vim/comments/2b2609/ultisnips_snippet_design_and_gifs/
Jul 18 2014
prev sibling next sibling parent simendsjo <simendsjo gmail.com> writes:
On 07/17/2014 10:57 PM, Kiith-Sa wrote:
 DSnips is a set of UltiSnips snippets for D (now with GIFs showing each
 snippet in action (image-heavy))
 
 https://github.com/kiith-sa/DSnips
 
 This is an attempt to overhaul the D snippets I got merged to UltiSnips
 (now a separate "vim-snippets" repository), as the previous snippets had
 quite a few bugs. The snippets should now be easy to use together/chain
 (e.g. an "imp" (import) snippet places the cursor on the beginning of
 the next line so "imp" can be used for another import, "wrap in
 try/catch" places the cursor to be ready to add more catch blocks,
 "module" license can be replaced by using another snippet inside it, etc.
 
 There are some rather "intelligent" snippets, e.g. an operator builder
 for opBinary/opUnary/opOpAssign that will generate the skeleton for all
 operators typed in by the user, automatic DDoc Params: generation from
 function parameters, etc.
 
 I want to eventually try to merge this back to the default repository,
 but I'd like some comments/criticism/ideas first. Should any snippets be
 removed? Added? Any problems with the current snippets? (the wrap in
 try/catch in the previous version had issues with wrapping indented
 text, for example)
This looks great! A lot better than my non-pythonized snippets :)
Jul 18 2014
prev sibling parent Justin Whear <justin economicmodeling.com> writes:
On Thu, 17 Jul 2014 20:57:10 +0000, Kiith-Sa wrote:

 DSnips is a set of UltiSnips snippets for D (now with GIFs showing each
 snippet in action (image-heavy))
 
 https://github.com/kiith-sa/DSnips
 
 This is an attempt to overhaul the D snippets I got merged to UltiSnips
 (now a separate "vim-snippets" repository), as the previous snippets had
 quite a few bugs. The snippets should now be easy to use together/chain
 (e.g. an "imp" (import) snippet places the cursor on the beginning of
 the next line so "imp" can be used for another import, "wrap in
 try/catch" places the cursor to be ready to add more catch blocks,
 "module" license can be replaced by using another snippet inside it,
 etc.
 
 There are some rather "intelligent" snippets, e.g. an operator builder
 for opBinary/opUnary/opOpAssign that will generate the skeleton for all
 operators typed in by the user, automatic DDoc Params: generation from
 function parameters, etc.
 
 I want to eventually try to merge this back to the default repository,
 but I'd like some comments/criticism/ideas first. Should any snippets be
 removed? Added? Any problems with the current snippets? (the wrap in
 try/catch in the previous version had issues with wrapping indented
 text, for example)
Posted to /r/vimplugins: http://www.reddit.com/r/vimplugins/comments/2b2prz/ much_better_ultisnip_snippets_for_d/
Jul 18 2014