Column mode in PB IDE

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
miskox
User
User
Posts: 95
Joined: Sun Aug 27, 2017 7:37 pm
Location: Slovenia

Column mode in PB IDE

Post by miskox »

Hello!

It would be great if Column mode be added to PB IDE. Sometimes I want to select (using shift key and arrow keys) some text but not the whole lines. See images.

(ultraedit has this funcionality - you can download a free demo)
Image
Image

Thanks.
Saso
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Column mode in PB IDE

Post by Caronte3D »

Push ALT key and select with the left mouse button :wink:
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Column mode in PB IDE

Post by mk-soft »

It's not written anywhere ...

On Windows and macOS the 'ALT' key
On Linux with the 'CTRL' key
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Column mode in PB IDE

Post by skywalk »

Ha! That is good to know.
Is split window another hidden gem?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: Column mode in PB IDE

Post by #NULL »

Well, you get a rectangle selection, but the edit does not work. In column mode i believe you would be able type/edit on all the lines at once.
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Column mode in PB IDE

Post by ChrisR »

I use it quite often, it is very useful.
One thing I miss though is when copying, pasting a block, to be able to insert the paste block, with lines insertion. Currently it is pasted on top of the existing code, as a replacement, which is another option to keep.
Be able type/edit on all the lines at once would be a great bonus feature +1
miskox
User
User
Posts: 95
Joined: Sun Aug 27, 2017 7:37 pm
Location: Slovenia

Re: Column mode in PB IDE

Post by miskox »

Thank you all!

Thanks for the ALT option. It is something (if I want to copy/paste it somewhere) but I would prefer full funcionality (and I prefer using the keys - after all we use keyboard when typing code, right?).

Thanks again.
Saso
Axolotl
Enthusiast
Enthusiast
Posts: 435
Joined: Wed Dec 31, 2008 3:36 pm

Re: Column mode in PB IDE

Post by Axolotl »

Have you tried:
1. CursorKeys to the starting position
2. SHIFT + CursorKeys to select some code (normal)
3. SHIFT + ALT + CursorKeys to select some code (block mode)

After copy (CTRL + C) you can paste (CTRL + V) the text block, but you have to be sure you want overwrite the "block area".
Because insertion is a kind of overwritng the existing text. :oops:
I use this a lot, but it still may not be what you are looking for.
Mostly running PureBasic <latest stable version and current alpha/beta> (x64) on Windows 11 Home
miskox
User
User
Posts: 95
Joined: Sun Aug 27, 2017 7:37 pm
Location: Slovenia

Re: Column mode in PB IDE

Post by miskox »

@Axolotl: thanks! It is close (holding ALT key is something I would have to memorize and it would be great to use only one key with my left hand: SHIFT).

Saso
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: Column mode in PB IDE

Post by #NULL »

You can also use search/replace to edit multiple identical lines simultaneously.
- select 'el' of multiple lines with shift alt cursor-keys (on linux)
- replace (cntrl F) 'el' with 'els', check 'search inside selection only'
- 'replace all'
now those lines have 'levels' instead of 'level'.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Column mode in PB IDE

Post by davido »

Thank you all for this. :D
I was unaware of this gem!

What other 'Easter eggs' are hidden?
DE AA EB
Post Reply