Page 1 of 1

Regex and cutcopy/paste questions.

Posted: Thu Jul 22, 2010 2:02 am
by BigFanOfCheese
Hi there,

First off, I've only recently started using Codelite, so apologies if I've missed something daft. On the whole, I've found Codelite excellent - only wished I hadn't wasted my time on 3 or 4 other IDEs before I tried it.

I'm having a couple of issues, though. Firstly, I can't get backreferences working in the replace dialog when using regular expressions. I've tried \1 and a bunch of variations ($1 etc), but nothing seems to work: the replacement is always the text I enter with no replacement going on. Does anyone have an example of what I should be doing here?

Secondly, has the behaviour of copy/paste changed in the latest build? It seemed fine last week using the previous build, but now Ctrl+X or Ctrl+C don't appear to do anything.

A couple of gripes, and I've definitely got a few things I'd like added, but, those aside, it's lovely :)

BFOC.

Re: Regex and cutcopy/paste questions.

Posted: Thu Jul 22, 2010 8:22 am
by eranif
Always mention your codelite version + OS. (from the problem description, I am guessing that you are using Linux) - but I still need to know which version of codelite
BigFanOfCheese wrote:Secondly, has the behaviour of copy/paste changed in the latest build? It seemed fine last week using the previous build, but now Ctrl+X or Ctrl+C don't appear to do anything.
To work around that, go to :

'Settings -> Keyboard shortcuts' - and click OK (just open the dialog, and click OK nothing more)

This will fix the copy / paste issue - for more info I need to know your codelite version
BigFanOfCheese wrote:I'm having a couple of issues, though. Firstly, I can't get backreferences working in the replace dialog when using regular expressions. I've tried \1 and a bunch of variations ($1 etc), but nothing seems to work: the replacement is always the text I enter with no replacement going on. Does anyone have an example of what I should be doing here?
regex backreferences is currently only supported in the quick find bar.

So: type Ctrl-F and enable the 'regex' option in the quick find bar (as seen in the picture bleow)
find_bar.png
Eran

Re: Regex and cutcopy/paste questions.

Posted: Thu Jul 22, 2010 11:08 pm
by BigFanOfCheese
Sorry, should know better :oops: I'm using 2.6.0.4189, under Ubuntu 10.04. Previously I was on 2.5.2or3.something, where the issue definitely didn't happen.

Still not exactly sure when the copy/paste bug appears, but have noticed that when it does occur, in the Edit menu, Cut will be disabled, and Copy and Paste will both be enabled, but do nothing (from the menu, or the shortcut). Your workaround recovers the functionality (temporarily); I've also noticed that sometimes deselecting and reselecting the text causes the functionality to return.

Good news about the regex - should have read the release notes.