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

ASPComment

by danielsd ALL

Allows users of SublimeText2 to comment selections with single quotes

Details

  • 2014.01.26.23.43.52
  • github.​com
  • github.​com
  • 6 years ago
  • 20 minutes ago
  • 8 years ago

Installs

  • Total 4K
  • Win 3K
  • Mac 508
  • Linux 193
Feb 21 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 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 1 1 0 0 2 0 0 0 1 1 0 1 1 0 2 0 1
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 1 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 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 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Description

ASPComment is a plugin for Sublime Text that allows for multi-line commenting with single quotes, a convention used in Classic ASP, VbScript, and Visual Basic. Though Sublime Text has a line commenting shortcut built in, it only supports HTML style comments for “ASP (HTML)” syntax and offers no support for VbScript or Visual Basic, which do not work for ASP blocks. Furthermore it does not (natively) support VbScript or Visual Basic syntax highlighting and contexts.

ASPComment provides this functionality so that programmers of any language requiring single quote comments can enter comments with ease.

Installation

  1. Use the SublimeText2 Package Manager to install ASPComment.

  2. You can manually install the package by downloading the zip file and extracting it to the location given in the documentation.

Commands

The default keymappings can be viewed by selecting Preferences > Package Settings > ASPComment > Key Bindings - Default from the SublimeText toolmenu. Changes to the keyboard shortcuts should be added to the corresponding “Key Bindings - User” file to override the default mappings rather than erase them.

Note: By default, if no selection is made, any performed action is applied to the line the cursor is currently on.

Add Comment

asp_comment_add_comment

Add a single quote (') to the front of each line in the current selection. Selected lines already starting with a single quote will be ignored. Also note that empty lines are not commented.

Remove Comment

asp_comment_remove_comment

Remove a single quote ' from each line in the current selection that starts with a single quote (ignores whitespace). Any lines without a leading single quote are unmodified.

Toggle Comment

asp_comment_toggle_comment

Toggles comments on the current selection. If there is a single uncommented line, then the entire selection is commented. If all lines are commented, the comments are removed. Also note that empty lines are not commented.

Configuration

ASPComment has three settings which modify its behavior. These settings can be modified by adding them to the file found at Preferences > Package Settings > ASPComment > Settings - User with the desired value.

allow_double_comments

When this setting is true and the asp_comment_add_comment action is performed, lines already starting with a single quote will still receive an additional single quote.

comment_empty_lines

When this setting is true, empty lines will receive a single quote when asp_comment_add_comment or asp_comment_toggle_comment are performed.

comment_after_indent

When this setting is true and the asp_comment_add_comment action is performed, the single quote will be added after any leading whitespace. This preserves the line's indentation, which can be useful for some Sublime features (such as code folding).