You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PyCharm开启驼峰识别后如何选中完整驼峰单词

Solution for Selecting Full Camel-Case Words in PyCharm (With Camel Humps Enabled)

Got it, I totally get your frustration—wanting to keep the camel humps navigation enabled for jumping between parts of a camel-case word, but needing a quick way to select the entire word when you want it. Here are two reliable methods to fix this:

Method 1: Use Expand Selection (Quick & Built-In)

PyCharm's built-in Expand Selection feature is perfect for this. Here's how it works:

  • Place your cursor anywhere inside the camel-case word (e.g., ImCamelCase)
  • Press Ctrl+W (Windows/Linux) or Cmd+W (Mac) once: this selects the current camel-hump segment (like Im if your cursor is there)
  • Press the same shortcut again: it will expand to select the entire camel-case word (ImCamelCase)

This is great because it’s context-aware—you can keep expanding to select larger chunks (like the whole line or function) if needed, but it stops at the full camel word on the second press when you’re in a camel-case identifier.

Method 2: Customize a Dedicated Shortcut

If you want a one-press shortcut to select the full camel-case word immediately, you can set up a custom keybinding:

  1. Open File > Settings (Windows/Linux) or PyCharm > Settings (Mac)
  2. Navigate to the Keymap section
  3. In the search bar at the top, type Select CamelHump Word to find the specific action
  4. Right-click the action and choose Add Keyboard Shortcut
  5. Press the key combination you want to use (e.g., Ctrl+Shift+Alt+→)—make sure it doesn’t conflict with existing shortcuts
  6. Click OK to save the changes

Now, whenever you press your custom shortcut, it will select the entire camel-case word in one go, while keeping your camel humps navigation enabled for Ctrl+→/← jumps.


内容的提问来源于stack exchange,提问作者Waseem Francis

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:13:52