How to modify the trigger key in the snip mate?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to modify the trigger key in the snip mate?

Zhe Lee
The mappings SnipMate uses can be customized with the |:map| commands. For
example, to change the key that triggers snippets and moves to the next
tab stop, >

        :imap <C-J> <Plug>snipMateNextOrTrigger
        :smap <C-J> <Plug>snipMateNextOrTrigger


I check the doc, and find the lines above,

but when I press c-j in vim the literaly "<Plug>snipMateNextOrTrigger" text was inserted in the vim. why is that?

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to modify the trigger key in the snip mate?

Nikolay Aleksandrovich Pavlov
2017-01-15 17:32 GMT+03:00 Zhe Lee <[hidden email]>:

> The mappings SnipMate uses can be customized with the |:map| commands. For
> example, to change the key that triggers snippets and moves to the next
> tab stop, >
>
>         :imap <C-J> <Plug>snipMateNextOrTrigger
>         :smap <C-J> <Plug>snipMateNextOrTrigger
>
>
> I check the doc, and find the lines above,
>
> but when I press c-j in vim the literaly "<Plug>snipMateNextOrTrigger" text was inserted in the vim. why is that?

Did you use literally `:imap` or used `:inoremap` instead?

>
> --
> --
> 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 [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to modify the trigger key in the snip mate?

Zhe Lee
On Monday, January 16, 2017 at 3:19:30 AM UTC+8, ZyX wrote:

> 2017-01-15 17:32 GMT+03:00 Zhe Lee <[hidden email]>:
> > The mappings SnipMate uses can be customized with the |:map| commands. For
> > example, to change the key that triggers snippets and moves to the next
> > tab stop, >
> >
> >         :imap <C-J> <Plug>snipMateNextOrTrigger
> >         :smap <C-J> <Plug>snipMateNextOrTrigger
> >
> >
> > I check the doc, and find the lines above,
> >
> > but when I press c-j in vim the literaly "<Plug>snipMateNextOrTrigger" text was inserted in the vim. why is that?
>
> Did you use literally `:imap` or used `:inoremap` instead?
>
> >
> > --
> > --
> > 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 [hidden email].
> > For more options, visit https://groups.google.com/d/optout.
Oh, I use the inoremap previously so it insert the string literaly. I change it to imap, it still doesn't work well after I press the c-j , the abbreviation word was deleted, but the snippet won't show out.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.