
Move a line in the source code...
Move a line in the source code...
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) 

-
- Addict
- Posts: 4779
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Move a line in the source code...
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...
Ugh!
Thanks Little John, I don't know about it 


Re: Move a line in the source code...
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...
Thank you for this excellent tip I also didn't know!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).
On MacOS it's [Command] + [Shift] + [↑] and [Command] + [Shift] + [↓].
- Mindphazer
- Enthusiast
- Posts: 457
- Joined: Mon Sep 10, 2012 10:41 am
- Location: Savoie
Re: Move a line in the source code...
WowLittle 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).

I wasn't aware of this tip either !
That's a great one !
Thanks Little John !
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
...and unfortunately... Windows at work...
Re: Move a line in the source code...
Cool! Works in Linux too. 
Moulder.

Moulder.
"If it ain't broke, fix it until it is!
This message is brought to you thanks to SenselessComments.com
My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
This message is brought to you thanks to SenselessComments.com
My PB stuff for Linux: "https://u.pcloud.link/publink/show?code ... z3MR0T3jyV
- Kwai chang caine
- Always Here
- Posts: 5494
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Move a line in the source code...
Amazing..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).

i don't know this function since several decade i use the IDE

Thanks for the TIP


Not a destination
Re: Move a line in the source code...
Check out the scintilla documentation (on their site) for other nifty keyboard shortcuts.Kwai chang caine wrote: Thu Jun 27, 2024 7:23 pmAmazing..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).![]()
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...
Tip #2
Highlight the line (or a section of code), click on it, and drag it where you want.
Highlight the line (or a section of code), click on it, and drag it where you want.

- It was too lonely at the top.
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
Re: Move a line in the source code...
I like your tip blueb, because I use it a lot.
Best part: The clipboard text remains unchanged.
Best part: The clipboard text remains unchanged.

Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Re: Move a line in the source code...
Code: Select all
; close a code section :
;{
; blablabla
;}

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
Re: Move a line in the source code...
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.
It works with line blocs too.

Edit: Finally, it was since 5.72.
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
Except on this sentence...