Multiple cursors

CodeLite installation/troubleshooting forum
spaces
CodeLite Veteran
Posts: 67
Joined: Mon Aug 22, 2011 10:15 pm
Genuine User: Yes
IDE Question: c++
Contact:

Multiple cursors

Post by spaces » Sat Jan 14, 2012 4:13 pm

Ok just a quick update.

Sometimes I have multiple cursors in the edit window. That means I press 'a' and it is written in to different places. I had this issue in the prev version and in this, too.

Unfortunately I can't yet tell precisely how to reproduce this bug but I'm working on it. It involves the edit window losing the focus then when getting it back it produce another caret position but does not delete the previous. Anyway I'm working on Windows.

I will update this topic when I find the precise way to reproduce this bug!

jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Multiple cursors

Post by jfouche » Sat Jan 14, 2012 5:08 pm

That comes from scintilla : If you press 'control' + left click, it will add another cursor. It's very helpfull sometimes. You can also make a rectangular selection using ctrl + left click and drag the selection.

An example :

let suppose you have the following code :

Code: Select all

add('a');
add('b');
add('c');
and you want to replace your add function with the append function. Just ctrl left click just before the a of add('a'), and drag the selection just after the last d of add('c'). you will see your 3 add functions selected. You just have to type 'append' and all add function will be replaced by the append one.

Enjoy
Jérémie

spaces
CodeLite Veteran
Posts: 67
Joined: Mon Aug 22, 2011 10:15 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Multiple cursors

Post by spaces » Sun Jan 15, 2012 3:24 am

OMG... any way to disable it?

jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Multiple cursors

Post by jfouche » Sun Jan 15, 2012 5:07 pm

Well, I don't think you can do it in CodeLite today.
You can submit a feature request to add an option to enable / disable multiple selection in CodeLite. This is done with the SCI_SETMULTIPLESELECTION option.
Jérémie

spaces
CodeLite Veteran
Posts: 67
Joined: Mon Aug 22, 2011 10:15 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Multiple cursors

Post by spaces » Sun Jan 15, 2012 9:48 pm

Ok I see, thank you very much.

User avatar
eranif
CodeLite Plugin
Posts: 5926
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Multiple cursors

Post by eranif » Wed Jan 18, 2012 11:14 am

spaces wrote:OMG... any way to disable it?
This is one of codelite's best features!

Eran
Make sure you have read the HOW TO POST thread

foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Re: Multiple cursors

Post by foxmuldr » Thu Jan 26, 2012 6:47 pm

You can also do [Shift + Alt + up/down arrows] to manually make the cursor go onto other lines. Very handy for doing something across multiple lines. You can also use right/left arrows to select some text on every line (to delete or automatically replace when you start typing).

One issue I see, Eran, is that if you do something that causes a code completion lookup to appear, it disables the multi-cursor selection and continues only on the current source line.
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org

spaces
CodeLite Veteran
Posts: 67
Joined: Mon Aug 22, 2011 10:15 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Multiple cursors

Post by spaces » Thu Feb 02, 2012 6:04 am

Yeah thank you! I find it a quite good addition. I was just a little bit scared to see it the first time. :D

Somtimes my fingers just stuck on the CTRL key, that's why it was scary first.

But a switch off option wouldn't hurt. :D

Post Reply