Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customization tips: allow rgrep to search properly for the symbols #1932

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/customization_tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ You may sometimes find when you try to navigate to a function/class definition w
(ring-insert find-tag-marker-ring (point-marker))
(condition-case nil (elpy-goto-definition)
(error (elpy-rgrep-symbol
(concat "\\(def\\|class\\)\s" (thing-at-point 'symbol) "(")))))
(concat "\\(def\\|class\\)\s" (thing-at-point 'symbol) "\\((\\|:\\)")))))

This function will try to find the definition of the symbol at point using ``elpy-goto-definition``, but will do elpy-rgrep-symbol_ instead, if the former function fails to return a result. You can bind this function to the key combination of your choice, or you can bind it to ``M-.`` to use it as a replacement for the the default ``goto-definition`` function:

Expand Down