Giter VIP home page Giter VIP logo

brackets-quick-markup's Introduction

brackets-quick-markup

Brackets Extension that creates a quick markup mode

Overview

This is an Extension for Brackets.

Features

This extension is accessed in Brackets using menu Edit > Quick Markup Mode or Ctrl-M.

A minimal bottom panel is displayed to indicate you are in quick markup mode. A "mode" is required because this extension uses a lot of keyboard shortcuts which conflict with some Brackets standard shortcuts. All other Brackets commands and editing work as expected. Conflicting shortcuts are removed when this extension is enable and restored when it's disabled.

Quick Markup mode allows fast HTML markup generation as you type similar to what how a rich text editor works. It was created with text formatting in mind, but can be configured for any kind of markup. It currently only works in HTML and PHP documents.

Text Formatting

Start adding markup by pressing Ctrl-P to create a paragraph using a <p> tag. The tag will be wrapped around the currently selected "raw" text.

As you are typing, pressing Ctrl-Enter closes the current <p> tag and starts a new one. To convert a <p> tag to a heading, where heading refers to any <h1> through <h6> tag, press Ctrl-Shift-1 through Ctrl-Shift-6, respectively. At the end of a heading tag, pressing Ctrl-Enter closes the heading tag, and then starts a new <p> tag, as this is most likely what you'll want next.

You can also use Ctrl-Enter in the middle of a paragragh or heading to split the tag. Pressing Ctrl-Delete at the end of the (inner) text of a <p> or heading tag joins the tag with the following sibling (if tag is the same). Pressing Ctrl-Backspace at the start of the (inner) text joins with the previous tag in a similar manner.

Inline Text Formatting

Selecting text and pressing Ctrl-B applies a <strong> tag. Pressing Ctrl-B again removes the <strong> tag. There is similar behavior pressing Ctrl-I for <em> and pressing Ctrl-D for <del>.

Resulting text is properly indented based on Brackets preferences and the appropriate line end characters are inserted for the current operating system.

You can switch documents while in quick markup mode.

Default shortcuts used to generate markup:

Ctrl-P <p>
Ctrl-L <li>
Ctrl-1..6 <h1>..<h6>
Ctrl-B <strong>
Ctrl-I <em>
Ctrl-D <del>

Note: Ctrl + [key] inserts new tag. Ctrl + Shift + [key] changes existing tag.

Ctrl-Enter Split Tag or Start New Tag
Ctrl-Delete Join Next Sibling Tag
Ctrl-Backspace Join Previous Sibling Tag

Note: Ctrl refers to Ctrl key on Windows or Cmd key on Mac.

Use Edit > Quick Markup Mode Help or Ctrl-Shift-M to see a list of all shortcuts used by this extension.

##Configuration

The tags and shortcuts are defined in data.json, so they are fully configurable.

Once this extension is installed in Brackets, use Help > Show Extensions Folder to navigate to the extensions folder. Hint: drag the folder onto Brackets window to quickly switch the current Brackets project to that folder. Open the user/brackets-quick-markup folder to find the data.json file.

License

MIT-licensed -- see main.js for details.

brackets-quick-markup's People

Contributors

redmunds avatar jbalsas avatar sygnas 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.