Comments (8)
Hey there. That's definitely possible, and not just in the jsx nodes: try C-M-d
and C-M-u
.
from combobulate.
Hey, thanks for the response.
When there are no attributes with ={}
in the tag, it seems to work (ish) but with (non string) attributes it behaves very different for me:
|<div className={foo}>
<p className={bar}>Text</p>
</div>
C-M-d
<div className=|{foo}>
<p className={bar}>Text</p>
</div>
C-M-d
<div className={|foo}>
<p className={bar}>Text</p>
</div>
C-M-d
<div className={foo}|>
<p className={bar}>Text</p>
</div>
C-M-d
<div className={foo}>
<p className={|bar}>Text</p>
</div>
from combobulate.
There are some liberties taken with the definition of moving down. Namely, it tries to mimic the default Emacs behaviour of C-M-d
(in the last example anyway) where C-M-d
will always jump into the next pair of brackets, regardless of where it is in the structure, if it can't think of anywhere else to go, or if they are closer than another node that is not a direct descendant.
The other liberty is that C-M-d
will try its best to always have somewhere to move to. It's not perfect: but the alternative is that you'll wind up entering lots of 'dead ends' in the tree, which is all too easy to do. (Try M-x treesit-explore-mode
to see what the tree actually looks like.)
from combobulate.
I should definitely document this behaviour better though.
from combobulate.
I see. The issue I have in my example from above is, that you don't ever end up with |<p>
(i.e. I never end up of the child I wanted to ascend to). Also if you have lot's of attributes, it takes a lot of time and attention to go to the inner tag. Could there maybe be a dedicated function to navigate explicitly sexp (is that the right name for xml tags in this case? 😆) up and down?
from combobulate.
Actually, when I think about it, this is not really limited to XML nodes. It is great to have the behavior as is. But it would be great to also have hierarchical up/down for bigger code structures. I.e.:
- the example from above
- moving into function bodies instead of the params
|const test = (bla) => {
console.log("test");
};
const test = (bla) => {
|console.log("test");
};
from combobulate.
Hey, me again. I have been working a lot more on TS React code and I am really missing this feature where I can move inside any XML Tag (with Inside I mean, directly after the opening tag closes) and so on.
I totally get that you time is constrained. Sadly my lisp is not the greatest, but maybe you could point me a bit to where best to implement such a behavior and I could give it a go?
from combobulate.
Fixed, as this is specifically one of the things the new navigation DSL resolves.
from combobulate.
Related Issues (20)
- combobulate-navigate-{previous,next} crash with "Unknown key in procedure" HOT 7
- query-builder status is truncated without wide window HOT 4
- C-g quits all transients, not the innermost one HOT 3
- Adding support for a new language HOT 3
- Installation error from github -- submodule permission denied HOT 2
- Is there any methods to toggle hl-line-mode when start or end combobulate-mark-node-dwim command ? HOT 1
- binding esc key ot combobulate-proffer-map failed.
- Feature Request: vanish node HOT 4
- branch checkout failure on Windows OS with NTFS HOT 3
- Status of toml support HOT 1
- combobluate-avy-jump fails with Node type error. HOT 1
- What is proper way to remove a default highlight rule? HOT 6
- Symbol's value as variable is void: _ HOT 12
- Python annotation navigation behaviors HOT 2
- Which emacs theme did you use for the screenshots ?
- Warnings from transient HOT 3
- combobulate-proffer-indentation's interactive spec is broken
- Combabulate, Selection And Speking HOT 4
- Idea: optional single-key modal operation while in carousel
- disable cycling for expand region HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from combobulate.