new SnippetMagic plugin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

new SnippetMagic plugin

Jeff Rose-3
Hey everyone,
   I've got a new version of the SnippetMagic plugin available for download:

http://blog.rosejn.net/articles/2006/02/28/snippetmagic-0-02

This time it's using YAML for the snippet definition storage, and a vim
menu is added that lets you select the active package.  (It will soon
correctly support multiple active packages.)  The indentation is now
done according to your vim settings (tabs & spaces are a mess), and I
have fixed some of the cursor placement, highlighting and movement bugs.
  The url above has more info...

Please let me know what you think and where you have bugs.  Once it's
somewhat stable I'd like to step back for a refactoring so that some of
this code can be put into a ruby library that should simplify writing
vim plugins in the future.

-Jeff
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: new SnippetMagic plugin

Alexandru E. Ungur
>>> sender: "Jeff Rose" date: "Tue, Feb 28, 2006 at 02:02:32PM +0100" <<<EOQ
> Hey everyone,
>    I've got a new version of the SnippetMagic plugin available for download:
>
> http://blog.rosejn.net/articles/2006/02/28/snippetmagic-0-02
Hi,

I'd very much like to test this plugin. I already have it installed but
I'm not sure how to use/test it...
I tried opening this link: http://blog.rosejn.net/admin/content/show/32
found at the above mentioned link which should point to a more detailed
description, but it doesn't work (asks for login?).

Have a nice day everyone,
Alex
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: new SnippetMagic plugin

Jeff Rose-3
Thanks for catching that.  I updated the link to the correct one:
http://blog.rosejn.net/articles/2005/12/09/snippets-0-01

If you are using a graphical vim you should be able to select "ruby"
from the SnippetMagic menu, and then when you hit tab after any of the
defined tab-triggers it will print out a snippet.  You can then tab
through the parts of the snippet to edit the pieces.  Here is a capture
of the last version (working on new ones):

http://code.rosejn.net/images/snippetMagic.gif


Let me know if you run into problems,
Jeff

Alexandru E. Ungur wrote:

>>>> sender: "Jeff Rose" date: "Tue, Feb 28, 2006 at 02:02:32PM +0100" <<<EOQ
>> Hey everyone,
>>    I've got a new version of the SnippetMagic plugin available for download:
>>
>> http://blog.rosejn.net/articles/2006/02/28/snippetmagic-0-02
> Hi,
>
> I'd very much like to test this plugin. I already have it installed but
> I'm not sure how to use/test it...
> I tried opening this link: http://blog.rosejn.net/admin/content/show/32
> found at the above mentioned link which should point to a more detailed
> description, but it doesn't work (asks for login?).
>
> Have a nice day everyone,
> Alex
> _______________________________________________
> vim-ruby-devel mailing list
> [hidden email]
> http://rubyforge.org/mailman/listinfo/vim-ruby-devel
>

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: new SnippetMagic plugin

Alexandru E. Ungur
>>> sender: "Jeff Rose" date: "Wed, Mar 01, 2006 at 12:42:47PM +0100" <<<EOQ
> Thanks for catching that.  I updated the link to the correct one:
> http://blog.rosejn.net/articles/2005/12/09/snippets-0-01
>
> If you are using a graphical vim you should be able to select "ruby"
> from the SnippetMagic menu, and then when you hit tab after any of the
> defined tab-triggers it will print out a snippet.  You can then tab
> through the parts of the snippet to edit the pieces.  Here is a capture
> of the last version (working on new ones):
>
> http://code.rosejn.net/images/snippetMagic.gif
Thank you very much, now the plugin makes much more sense to me :)

I use the console vim, and select the ruby with
:emenu SnippetMagic.ruby

Everything works as expected, except that if I have the plugin installed
the arrow keys are inserting A/B/C or D everytime I touch them (they
do move however). If I delete the plugin files, everything comes back to
normal.

BTW, I'm not sure if this feedback is appropriate here on the list
or not, so if it's not, I appologise.


Alex
_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel
Reply | Threaded
Open this post in threaded view
|

Re: new SnippetMagic plugin

Jeff Rose-3
Shoot.  I never use the arrow keys so I forgot about this problem.
Maybe someone on the list has an idea what's causing the abc's to get
printed when the arrows are hit in insert mode.  (up=A, down=B, right=C,
left=D) You can look at the bottom of snippetMagic.vim if you have the
plugin, or this is an example of what I'm doing:

-------------------------------

" Remap the down key "
" NOTE: This nullifies active snippets. "
function! SnippetMagicDown()
if g:snippet_active
   call SnippetMagicFinish()
endif
return "\<down>"
endfunction
imap <Down> normal :call SnippetMagicDown()<cr>
vmap <Down> :call SnippetMagicDown()<cr>

-------------------------------

I just included a patch and posted a new version that should fix some
issues with snippets that included periods and dollar signs.

Thanks for the help,
Jeff

Alexandru E. Ungur wrote:

>>>> sender: "Jeff Rose" date: "Wed, Mar 01, 2006 at 12:42:47PM +0100" <<<EOQ
>> Thanks for catching that.  I updated the link to the correct one:
>> http://blog.rosejn.net/articles/2005/12/09/snippets-0-01
>>
>> If you are using a graphical vim you should be able to select "ruby"
>> from the SnippetMagic menu, and then when you hit tab after any of the
>> defined tab-triggers it will print out a snippet.  You can then tab
>> through the parts of the snippet to edit the pieces.  Here is a capture
>> of the last version (working on new ones):
>>
>> http://code.rosejn.net/images/snippetMagic.gif
> Thank you very much, now the plugin makes much more sense to me :)
>
> I use the console vim, and select the ruby with
> :emenu SnippetMagic.ruby
>
> Everything works as expected, except that if I have the plugin installed
> the arrow keys are inserting A/B/C or D everytime I touch them (they
> do move however). If I delete the plugin files, everything comes back to
> normal.
>
> BTW, I'm not sure if this feedback is appropriate here on the list
> or not, so if it's not, I appologise.
>
>
> Alex
> _______________________________________________
> vim-ruby-devel mailing list
> [hidden email]
> http://rubyforge.org/mailman/listinfo/vim-ruby-devel
>

_______________________________________________
vim-ruby-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/vim-ruby-devel