Giter Site home page Giter Site logo

comfortablesoftware / custom-folds Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bsegraves/custom-folds

0.0 1.0 1.0 268 KB

Atom plugin for defining custom markers for foldable regions.

License: MIT License

CoffeeScript 12.65% JavaScript 79.82% CSS 7.53%

custom-folds's Introduction

Custom Folds

An Atom plugin for defining custom markers for foldable regions.

This plugin was inspired by Visual Studio's treatment of C#'s #region tags.

Usage

In the plugin's settings, you can define custom text that identifies the start and end of a foldable section of code.

By default, a comment starting with <editor-fold identifies the start of a foldable region and another comment starting with </editor-fold> marks the end of that region. These default settings were only chosen because the author works on a team where a few "special" engineers insist on using JetBrain's WebStorm IDE. These tags allow both sets of engineers (those using Atom and those using WebStorm) to have the same foldable regions of code.

But you don't need to be working with people that insist on using WebStorm. You can configure the starting and ending tags to whatever you want. This allows you to create your own, custom, collapsible regions.

The folding is recursive, so you can have regions within regions within regions.

Highlighting of these foldable tags is also enabled by default. This can be easily disabled from the package's Settings screen.

Image of highlighting

There is also an option to auto-fold files on load. This can be enabled from the package's settings.

Commands

  • custom-folds:fold-here (ctrl-shift-[) — Folds the region you're within.
  • custom-folds:unfold-here (ctrl-shift-]) — Unfolds the region you're within.
  • custom-folds:fold-all (ctrl-alt-shift-[) — Folds all regions recursively.
  • custom-folds:unfold-all (ctrl-alt-shift-]) — Unfolds all regions.
  • custom-folds:fold-top-level — Only fold the outer regions.
  • custom-folds:toggle-fold (ctrl-shift-\) — Toggle folding at the cursor position.

Tips

Personally I use the following snippet for creating new foldable regions.

"editor-fold":
	"prefix": "// e"
	"body": "// <editor-fold desc='$1'>\n// </editor-fold>"`

License

See LICENSE for details.

custom-folds's People

Contributors

bsegraves avatar danchianucci avatar marcel0ll avatar thtliife avatar ultrahex avatar

Watchers

 avatar

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.