Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move selected text in Notepad++

Tags:

notepad++

I've been looking in the Notepad++ shortcuts and options for something that permits me to move selected text in any direction, but I couldn't find anything.

There are two commands I use very often that offer similar functionality "Move Up Current Line" and "Move Down Current Line" but they apply to an entire line and I need something to work with just a selected text.

That functionality is very useful for rearranging columns or elements inside arrays.

Do you know a way to do this? Or maybe an extension or macro?

Edit:

Here some graphical examples of the functionality I wish:

You have some code: enter image description here

You notice a expression is not in the right place. Why copy-paste? Why not move it? enter image description here

Or even set it in the previous line, just using the arrow keys: enter image description here

The idea is to move the selected text as a unit.

like image 389
Memochipan Avatar asked Dec 03 '22 20:12

Memochipan


1 Answers

It is also possible to move an entire row with a keyboard shortcut.

Place your curson on the line you want to move (not needed to select anything, just position the text insertion point in the row) then press ctrl + Shift + up [or down]

The row moves accordingly of one row at once.

Keep pressed to move faster.

like image 150
willy wonka Avatar answered Dec 23 '22 00:12

willy wonka