Giter Site home page Giter Site logo

Comments (7)

joaotavora avatar joaotavora commented on May 18, 2024

Obviously, this is an enhancement, however the google interface won't allow me to
change the type...

Google Code Info:
Author: scherpenisse
Created On: 2008-10-10T15:10:26.000Z

from yasnippet.

joaotavora avatar joaotavora commented on May 18, 2024

Cool indeed.

Google Code Info:
Author: [email protected]
Created On: 2008-10-16T19:07:06.000Z

from yasnippet.

joaotavora avatar joaotavora commented on May 18, 2024

It will be great if this feature is supported.

Google Code Info:
Author: [email protected]
Created On: 2009-01-11T08:38:50.000Z

from yasnippet.

joaotavora avatar joaotavora commented on May 18, 2024

I think this feature is already supported. But I'm not sure it will work in all
situations, so I just disabled it by default. If you want to try it, just add this
after YASnippet initialization:

(define-key yas/keymap [tab] 'yas/expand)

However, since Emacs can't tell the difference between TAB and [tab] on a terminal, I
think this might not work properly inside a terminal.

Google Code Info:
Author: [email protected]
Created On: 2009-01-21T02:21:19.000Z

from yasnippet.

joaotavora avatar joaotavora commented on May 18, 2024

Another temp (and it usually works perfectly for me) is to bind expand to another key.

I bound yas/expand to C-RET, so, when i'm in snippet and i need to expand some small
snippet in it, i just press C-RET. As at expanding of snippet, C-RET sense don't
changed (as it done with TAB key), small snippet expands. Some kind of recursion.

Google Code Info:
Author: [email protected]
Created On: 2009-03-05T17:40:01.000Z

from yasnippet.

joaotavora avatar joaotavora commented on May 18, 2024

I confirm that the recursive snippet-editing works great. Thanks.

I use hippie-expand and bind it to tab:

(setq hippie-expand-try-functions-list
(cons 'yas/hippie-try-expand hippie-expand-try-functions-list)))

And I use Enter/M-Enter to switch field:

;; reset yas/keymap
(setq yas/keymap (make-sparse-keymap))
(define-key yas/keymap (kbd "RET") 'yas/next-field-group)
(define-key yas/keymap (kbd "M-RET") 'yas/prev-field-group)

Google Code Info:
Author: [email protected]
Created On: 2009-03-17T03:57:59.000Z

from yasnippet.

joaotavora avatar joaotavora commented on May 18, 2024

Already supported.

Also in new version 0.6.0, see also new customization variable `yas/triggers-in-field'.

Google Code Info:
Author: [email protected]
Created On: 2009-07-31T00:02:12.000Z

from yasnippet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.