ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Center Comment

by coder-mike ALL

Sublime Text plugin for centering comments

Details

Installs

  • Total 2K
  • Win 2K
  • Mac 405
  • Linux 263
Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7
Windows 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Center Comment

A plugin for Sublime Text to center comments like this:

// ----------------------------- Section Here -----------------------------

This is particularly useful for headings and sections in code.

Installation

To install use Sublime Text Package Control.

Usage

The default shortcut key is ctrl+shift+c or super+shift+c, and will center commented text on lines under the current cursor(s).

Here are some examples in a C-like language such as C#, Java, and JavaScript, but this should work for other languages as well. Each example shows what it looks like before and after using the command:

// Padded with spaces
//                            Padded with spaces

// -Dashes
// --------------------------------Dashes---------------------------------

// - Extra Space
// ----------------------------- Extra Space -----------------------------

//-No space
//--------------------------------No space--------------------------------

// = Equals
// =============================== Equals ================================

// * Asterisks
// ****************************** Asterisks ******************************

// -
// -----------------------------------------------------------------------

// = Multi -- Part
// ============================ Multi -- Part ============================

/* - Single-line block comment */
/* -------------------- Single-line block comment --------------------- */