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

Add ability to limit to current function #2

Open
notbaab opened this issue Jun 20, 2017 · 0 comments
Open

Add ability to limit to current function #2

notbaab opened this issue Jun 20, 2017 · 0 comments

Comments

@notbaab
Copy link
Owner

notbaab commented Jun 20, 2017

A little unsure how to do this. It will definitely have different code paths depending on the language features.

For C++ like languages, using the scope may still work, we would do something similar to expand to scope command.

For whitespace significant languages, we could just use the indentation level? That is a future idea anyway.

For Ruby or Bash languages, i.e. where expanding to scope pretty much expands it to the whole file, it needs to do something similar to BracketHighlighter and have a regex of keywords that define a function block.

It would be possible to include BracketHighlighter as a dependency, and that would actually help out the other above issues as well, there a tons of helper functions for these types of cases, but it adds a ton of functionality that a user may not want, and also turns this tiny package into a much larger beast.

notbaab added a commit that referenced this issue Jun 25, 2017
Working toward #2. I'm not sure if I would like to use the undocumented function or just base indentation on the number of spaces in the line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant