Page 1 of 1
Move a line in the source code...
Posted: Thu Jun 13, 2024 6:55 pm
by Caronte3D
Would be nice if we have the shortcut Alt+ArrowUp or Alt+ArrowDown to move the current line up and down (like in another IDEs)

Re: Move a line in the source code...
Posted: Thu Jun 13, 2024 8:15 pm
by Little John
We can do that in the PureBasic IDE, using [Ctrl]+[Shift]+[↑] and [Ctrl]+[Shift]+[↓] (tested with PB 6.04 LTS on Windows).
Re: Move a line in the source code...
Posted: Thu Jun 13, 2024 9:40 pm
by Caronte3D
Ugh!

Thanks Little John, I don't know about it

Re: Move a line in the source code...
Posted: Fri Jun 14, 2024 4:42 am
by AZJIO
I encounter this every time I try to expand the selection, but instead a line is moved.
Re: Move a line in the source code...
Posted: Fri Jun 14, 2024 8:50 am
by Shardik
Little John wrote: Thu Jun 13, 2024 8:15 pm
We can do that in the PureBasic IDE, using
[Ctrl]+[Shift]+[↑] and
[Ctrl]+[Shift]+[↓] (tested with PB 6.04 LTS on Windows).
Thank you for this excellent tip I also didn't know!
On MacOS it's
[Command] + [Shift] + [↑] and
[Command] + [Shift] + [↓].
Re: Move a line in the source code...
Posted: Fri Jun 14, 2024 9:01 am
by Mindphazer
Little John wrote: Thu Jun 13, 2024 8:15 pm
We can do that in the PureBasic IDE, using
[Ctrl]+[Shift]+[↑] and
[Ctrl]+[Shift]+[↓] (tested with PB 6.04 LTS on Windows).
Wow
I wasn't aware of this tip either !
That's a great one !
Thanks Little John !
Re: Move a line in the source code...
Posted: Fri Jun 14, 2024 1:18 pm
by moulder61
Cool! Works in Linux too.
Moulder.
Re: Move a line in the source code...
Posted: Thu Jun 27, 2024 7:23 pm
by Kwai chang caine
Little John wrote: Thu Jun 13, 2024 8:15 pm
We can do that in the PureBasic IDE, using
[Ctrl]+[Shift]+[↑] and
[Ctrl]+[Shift]+[↓] (tested with PB 6.04 LTS on Windows).
Amazing..
i don't know this function since several decade i use the IDE
Thanks for the TIP

Re: Move a line in the source code...
Posted: Fri Jun 28, 2024 12:27 am
by Tenaja
Kwai chang caine wrote: Thu Jun 27, 2024 7:23 pm
Little John wrote: Thu Jun 13, 2024 8:15 pm
We can do that in the PureBasic IDE, using
[Ctrl]+[Shift]+[↑] and
[Ctrl]+[Shift]+[↓] (tested with PB 6.04 LTS on Windows).
Amazing..
i don't know this function since several decade i use the IDE
Thanks for the TIP
Check out the scintilla documentation (on their site) for other nifty keyboard shortcuts.
Re: Move a line in the source code...
Posted: Fri Jun 28, 2024 12:03 pm
by blueb
Tip #2
Highlight the line (or a section of code), click on it, and drag it where you want.

Re: Move a line in the source code...
Posted: Fri Jun 28, 2024 12:11 pm
by Axolotl
I like your tip blueb, because I use it a lot.
Best part: The clipboard text remains unchanged.

Re: Move a line in the source code...
Posted: Fri Jul 05, 2024 2:51 pm
by SPH
Code: Select all
; close a code section :
;{
; blablabla
;}
Test that

Re: Move a line in the source code...
Posted: Fri Jul 12, 2024 5:00 am
by boddhi
I use this tip for a long time ago (I don't remember precisely but before PB 5.73, 5.60 maybe?).
It works with line blocs too.
Edit: Finally, it was since 5.72.