GithubHelp home page GithubHelp logo

Comments (5)

keith-hall avatar keith-hall commented on August 21, 2024 2

just wanted to make a note here that I have listed a lot of indentation engine info at https://forum.sublimetext.com/t/everything-you-n-ever-wanted-to-know-about-indentation-in-st3/26207 which we could pull into the undocs

from sublime-undocs.

FichteFoll avatar FichteFoll commented on August 21, 2024 1

stops it from changing the indentation as you type, though it still works with the reindent command

Ah, that could be it exactly (and would also make sense with their naming). Basically, batch* patterns are only applied when reindenting blocks (i.e. multiple lines of code) while the normal patterns also apply when auto_indent is true and a newline is inserted.

from sublime-undocs.

keith-hall avatar keith-hall commented on August 21, 2024

Also worth mentioning:

from sublime-undocs.

FichteFoll avatar FichteFoll commented on August 21, 2024

I noticed a few of these settings, notably batch*IndentPattern, but have no idea what they do compared to the non-batch version. Do you know?

The others should be simple enough to be mentioned, so thanks for the heads-up.

from sublime-undocs.

keith-hall avatar keith-hall commented on August 21, 2024

Unfortunately, I have absolutely no idea how the batch patterns differ from the "normal" ones... It doesn't seem to be a TextMate thing, because they are not mentioned here: https://manual.macromates.com/en/preferences_items.html


The only difference I have noticed, while experimenting with the indentation rules, is that changing decreaseIndentPattern to batchDecreaseIndentPattern and increaseIndentPattern to batchIncreaseIndentPattern stops it from changing the indentation as you type, though it still works with the reindent command...
i.e. in HTML (which uses the batch rules), it doesn't change the indentation after typing Enter <div> Enter or Enter </div> Enter, but in XML (which doesn't use the batch rules), it does change the indentation. Confirmed by changing the tmPreferences file.

from sublime-undocs.

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.