Coder Social home page Coder Social logo

Comments (4)

joaotavora avatar joaotavora commented on May 20, 2024

I think it would be a good idea to add a control sequence like "$>" to allow the user
to control indentation in their snippet definitions. A per buffer variable is not
flexible enough. Also 'indent-according-to-mode' is the only sane way to do
indentation -- I work on several different projects at a time, they all have varying
coding styles, so blindly inserting tabs and spaces will not work.

Google Code Info:
Author: [email protected]
Created On: 2008-08-27T11:33:29.000Z

from yasnippet.

joaotavora avatar joaotavora commented on May 20, 2024

Yes, I know your requests. I'm also missing the "$>" feature from smart-snippet.
However, "$>" in smart-snippet doesn't really work well sometimes. For example, in
python-mode, indent-according-to-mode will make the overlays into garbage. But, in
fact, it works in most cases. The main reason I didn't add this feature to YASnippet
for such a long time might be that I didn't found a better solution. But, there are
so much users miss it, maybe it is still worth implementing it in YASnippet despite
it doesn't work well in some modes.

Google Code Info:
Author: [email protected]
Created On: 2008-08-27T11:41:00.000Z

from yasnippet.

joaotavora avatar joaotavora commented on May 20, 2024

Oh, I see. But that most definitely is a bug in Python mode, so the better approach
is to file a bug report against python-mode, not limiting your features to cater to
other people's bugs. (I don't use python-mode, so...)

Google Code Info:
Author: [email protected]
Created On: 2008-08-27T12:35:11.000Z

from yasnippet.

joaotavora avatar joaotavora commented on May 20, 2024

Fixed by adding $> support. Feel free to try it out by checking out the latest svn
version. Refer to
http://pluskid.lifegoo.com/upload/project/yasnippet/doc/define_snippet.html#indenting
for the document.

Google Code Info:
Author: [email protected]
Created On: 2008-09-02T13:07:52.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.