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

Command to select current function #4531

Closed
cremacs opened this issue Jan 11, 2016 · 3 comments
Closed

Command to select current function #4531

cremacs opened this issue Jan 11, 2016 · 3 comments
Labels
Enhancement ☺ Evil stale marked as a stale issue/pr (usually by a bot)

Comments

@cremacs
Copy link

cremacs commented Jan 11, 2016

Emacs has mark-defun, to select the function that point is in. This functionality varies between major modes, obviously, but mark-defun leverages mode knowledge to make it work. Can spacemacs support a text object that knows about functions, particularly for python? https://github.com/bps/vim-textobj-python is a vim attempt.

@cremacs
Copy link
Author

cremacs commented Jan 11, 2016

Sorry, emacs has a special implementation for python: https://github.com/emacs-mirror/emacs/blob/91917dd58ec5278e555b9c693a830749083e8f89/lisp/progmodes/python.el has an implementation of python-mark-defun which is remapped

@cremacs cremacs closed this as completed Jan 11, 2016
@cremacs cremacs reopened this Jan 11, 2016
@shea-parkes
Copy link

I too would like to see this happen. You can get close with the indentation-objects, but they're very sensitive as to what line you start on. I'd love to see a port of vim-textobj-python.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ☺ Evil stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

3 participants