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

Delete Lines

by harawata ST2/ST3

Sublime Text plugin simulates Delete Line command in Eclipse

Details

Installs

  • Total 3K
  • Win 2K
  • OS X 953
  • Linux 339
Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4
Windows 0 2 1 3 0 0 0 5 1 2 1 2 0 2 2 0 2 0 0 0 1 2 1 0 3 1 2 0 0 5 3 5 1 1 6 5 1 2 1 1 0 4 2 0 2 1
OS X 0 0 0 0 0 0 1 3 0 1 0 1 0 1 0 0 3 3 0 0 1 0 3 0 0 1 0 1 1 2 0 3 1 2 3 0 0 0 0 0 0 1 1 1 2 1
Linux 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 2 0 0 2 0 0 1 0 0 0 0 0 0 0 0

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.