Deleting Text

From Notepad++ Wiki
Jump to: navigation, search
On the various manners to delete text


While using the Delete and Backspace keys is a common and well-known way to remove the character on the right (respectively left) of the caret, rhese are only the most common ways.

Cutting text both deletes it and places it onto the clipboard. This is why everything about cutting is covered in Clipboard Uses instead.

Also, when some area of text is selected, any typing command will delete the selection before performing its expected action. An important exception to this principle is the case of rectangular selections: typing when some rectangle is selected will insert a column of the typed character, as tall as the selection. To remove the last column, do not use Backspace, but Edit -> Undo.

The following commands are available:

Commmands that delete text
Name Default shortcut Menu or plugon Description
SCI_CLEAR Del (Scintilla) Removes next character, if any
SCI_CLEARALL <None> (Scintilla) Deletes all text
SCI_DELETEBACK Backspace (Scintilla) Deletes previous character if any, or joins to the previous line
SCI_DELETEBACKNOTLINE <None> (Scintilla) Deletes previous character if any
SCI_DELWORDLEFT Ctrl+Backspace (Scintilla) Deletes leftwards to the previous word start
SCI_DELWORDRIGHT Ctrl+Del (Scintilla) Delete rightwards to the next word start
SCI_DELLINELEFT Ctrl+Shift+Backspace (Scintilla) Deletes leftwards to the beginning of current line
SCI_DELLINERIGHT Ctrl+Del (Scintilla) Delete rightwards to the end of current line
SCI_LINEDELETE Ctrl+L (Scintilla) Removes all of the current line
Delete bookmarked lines <None> Search menu Removes all lines that have a bookmark
Delete Marked {([<Brace>])} Pair <None> TextFX Quick When the caret is left or right of a brace, deletes all the text between matching braces. Leftmost brace is used if the caret is between two braces
Delete Blank Lines <None> TextFX Edit Removes all blank lines from selection/document
Delete Surplus Blank Lines <None> TextFX Edit Replces adjacent empty lines in selection/document by one empty line
Delete Visible Selection <None> TextFX Viz When a selection has hidden lines, only removes the ones that are visible
Delete Invisible Selection <None> TextFX Viz When a selection has hidden lines, only removes the ones that are not visible