Wednesday, February 8, 2017

Sublime line editing

One of the most common code editing actions I do is at the individual line level. I copy lines, delete lines, move lines. The shortcuts that sublime provides are great. Here's some of the main ones I use.

Selecting

Select a line - CMD + L

Deleting

Delete from cursor to end of the line - CTRL + K
Delete from cursor to the beginning of the line - CMD + Delete
Delete entire line - CTRL + SHIFT + K (Really annoying to use)
Cut line - CMD + X (delete entire line and copy)

Moving

Move a line up - CTRL + CMD + UP
Move a line down - CTRL + CMD + DOWN

Copying

Duplicate a line - CMD + SHIFT + D


Then there are a couple more that are not about manipulating lines themselves but are based on lines:

Insert cursor to line before current line - CMD + SHIFT + ENTER
Insert cursor to line after current line - CMD + ENTER


No comments:

Post a Comment