Jump to content
  • Advertisement
Sign in to follow this  
Ectara

Qt Creator

This topic is 2025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've recently decided to try out Qt Creator, and while I'm impressed with its features, I'm very frustrated by its Find and Replace functionality. First, I'm bothered by the fact that the replacement buttons don't have mnemonics, so pressing Alt+A, for example, doesn't replace all, but opens a menu. Many other text editors allow you to find and replace without using the mouse; I've tried Tabbing to the buttons, but it only will give focus to the replace all button and the text fields, ignoring the other two replacement buttons and both finding buttons. I tried setting Replace Next to Alt+R in the shortcuts dialog, but pressing Alt+R doesn't seem to do anything; Alt+Shift+R does Replace Previous, but it is hard for that alone to be useful. I bound Replace to Ctrl+R, but I have yet to find out what that actually does, if anything.

 

In short, find and replace feels weak in Qt Creator, compared to some free text editors out there, and it is heavily affecting my workflow (I use find and replace a lot). Additionally, I can't seem to get it to replace within a single-line selection; every time I make a single-line selection and open the find dialog, it clears the selection if it is shorter than two lines! Are there any plugins for this to augment its behavior? I haven't found any. Has anyone here that uses Qt Creator managed to use keyboard shortcuts for this functionality? Ideally, I'd like it to function like Kate, or at least Notepad++ (not crazy about how MSVS does it, especially regex syntax).

Share this post


Link to post
Share on other sites
Advertisement

Does it replace within selections? I can't picture vi supporting it, but I haven't really used it.

Share this post


Link to post
Share on other sites

Does it replace within selections? I can't picture vi supporting it, but I haven't really used it.

yes, you can limit the search&replace to a selection by adding \%V at the start of the searchString. (you can also restrict it to a line range and a bunch of other things).

 

with vim (or fakeVim in QTCreator) you can also quickly select text using the keyboard by pressing v (to enter visual/select mode) and then follow it up with the normal commands for block or line manipulation. (viB selects the current { ... } block for example)

 

Also, if you don't like using fakevim you can just go into tools->options->enviroment->keyboard and add/change the normal keyboard shortcuts. (there are quite a few functions there that don't have a keybinding in the default configuration)

Edited by SimonForsman

Share this post


Link to post
Share on other sites


yes, you can limit the search&replace to a selection by adding \%V at the start of the searchString. (you can also restrict it to a line range and a bunch of other things).



with vim (or fakeVim in QTCreator) you can also quickly select text using the keyboard by pressing v (to enter visual/select mode) and then follow it up with the normal commands for block or line manipulation. (viB selects the current { ... } block for example)

It's certainly a possibility, but that's a steep learning curve to learn the control scheme of an entirely different text editor to work around an inadequate find and replace dialog panel.

 


Also, if you don't like using fakevim you can just go into tools->options->enviroment->keyboard and add/change the normal keyboard shortcuts. (there are quite a few functions there that don't have a keybinding in the default configuration)

As I said in the original post, I have already tried changing the keybindings there, with mixed success. Not everything I needed could be configured, and while some worked, some did nothing whatsoever, no matter which elements had focus when I pressed the key combination.

 

If making it behave like Kate isn't possible, I understand.

Share this post


Link to post
Share on other sites


that's a steep learning curve to learn the control scheme of an entirely different text editor to work around an inadequate find and replace dialog panel

Once you've learned vim, all other editors are inadequate1.  Take the plunge now, the only regret you will have is that you didn't learn it sooner.

 

 

1 Some say there's an equally good editor buried in emacs, but I have yet to find out how to access it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!