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

Delete Lines

by harawata ALL

Sublime Text plugin simulates Delete Line command in Eclipse

Details

Installs

  • Total 6K
  • Win 3K
  • Mac 2K
  • Linux 603
Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11
Windows 1 1 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 2 0
Mac 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0
Linux 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 0 0 0 0 0 0 0 1 0 0 0 0 0 1

Readme

Source
raw.​githubusercontent.​com

Delete Lines (Sublime Text plugin)

Delete Lines is a Sublime Text plugin that adds a new command delete_lines simulating the Delete Line Eclipse key command.

Sublime Text has a built-in macro called Delete Line.sublime-macro (ctrl + shift + k), but it works slightly different from the Eclipse' Delete Line when the selection includes the last line break.

Assuming there are three lines in the buffer and I am going to delete the second line.

Here is what the macro does.

How macro works

Note that the third line is also deleted because the selection includes the line break on the second line.
This might be the right behavior, but not the expected behavior.

This plugin's delete_lines command deletes only the second line with the same selection.

How plugin works

The attached key bindings are ctrl + shift + k on all platforms.

{ "keys": ["ctrl+shift+k"], "command": "delete_lines" }

Installation

Using Package Control

If you already installed Package Control

  1. Press cmd + shift + p (OS X) or ctrl + shift + p (Win, Linux) to open Command Pallette.
  2. Type package and select Package Control: Install Package from the list.
  3. Search Delete Lines and install it.

Manual Installation

  1. On GitHub, press Download Zip button to download this repository as an archive.
  2. Choose Browse Packages... from the menu of Sublime Text to open Packages directory.
  3. Unarchive the downloaded zip in the Packages directory.
  4. Restart Sublime Text.

License

Delete Lines plugin is licensed under MIT License.