3
votes

Most applications select the whole word at the current cursor position when searching, but PyCharm doesn't seem to do this. I know I can double click or do Ctrl + Left then Shift + Ctrl + Right before hitting Ctrl + F, but it's not ideal.

Am I missing something? I can't see an option to turn on that selects the current word by default.

1
You could use Edit | Extend Selection (Ctrl+W) to quickly select what's under cursor before hitting Ctrl+F... Anyway: if all what you need is to search current file for word under cursor -- try BrowseWordAtCaret plugin -- works well for me.LazyOne
Good suggestions, thanks. Ctrl-W is better than ctrl-left,right and the plugin is handy too - it's pretty much what I'm after.jon_two
Thank you for accepting the answer. Would you consider also giving the customary upvote?bad_coder

1 Answers

0
votes

I searched the PyCharm keymap and the best match is Ctrl + W Extend Selection (before using Ctrl + F or Ctrl + Shift + F to search). It's configured by default but can also be constumized in File > Settings > Keymap.

image of settings keymap

There is also a plugin at JetBrains Marketplace called BrowseWordAtCaret that: "Allows to easily browse next/previous word at caret and highlight other appearances of selected word."