Skip to content
This repository has been archived by the owner. It is now read-only.

select enclosing c/c++ element #373

Open
szymonk211 opened this issue May 1, 2018 · 1 comment
Open

select enclosing c/c++ element #373

szymonk211 opened this issue May 1, 2018 · 1 comment

Comments

@szymonk211
Copy link
Contributor

@szymonk211 szymonk211 commented May 1, 2018

Hey. Great project!

I have a proposition for feature i often used in Intellij and Eclipse called in Eclipse: "select enclosing element".
For example in code below:

image

if you put cursor mark in the center of the word "positions_" and activate shortcut, editor will select one word:
image
After subsequent calls to the same shortcut it's selecting bigger and bigger fragments of code:
image
image
image
image
image
after that it selects whole function block, whole function, whole namespace and finally whole file.

This can save user from a lot of troublesome arrow manipulations.

That is certainly not trivial to get it right for every type of expressions, but maybe with some clang help it would be doable? I think it's a neat feature that might be worth a trouble.

@eidheim
Copy link
Member

@eidheim eidheim commented May 1, 2018

Thank you, I'll look into this in a few weeks. Something similar should be possible with libclang.

doe300 pushed a commit to doe300/jucipp that referenced this issue Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.