Page 1 of 1

Multiple cursors

Posted: Sat Jan 14, 2012 4:13 pm
by spaces
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!

Re: Multiple cursors

Posted: Sat Jan 14, 2012 5:08 pm
by jfouche
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

Re: Multiple cursors

Posted: Sun Jan 15, 2012 3:24 am
by spaces
OMG... any way to disable it?

Re: Multiple cursors

Posted: Sun Jan 15, 2012 5:07 pm
by jfouche
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.

Re: Multiple cursors

Posted: Sun Jan 15, 2012 9:48 pm
by spaces
Ok I see, thank you very much.

Re: Multiple cursors

Posted: Wed Jan 18, 2012 11:14 am
by eranif
spaces wrote:OMG... any way to disable it?
This is one of codelite's best features!

Eran

Re: Multiple cursors

Posted: Thu Jan 26, 2012 6:47 pm
by foxmuldr
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.

Re: Multiple cursors

Posted: Thu Feb 02, 2012 6:04 am
by spaces
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