[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plug treesit.el into other emacs constructs
From: |
Stefan Monnier |
Subject: |
Re: Plug treesit.el into other emacs constructs |
Date: |
Wed, 14 Dec 2022 12:46:36 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>>and when moving backward it moves from
>>
>> int a = 0;
>> int b = 1;|
>>
>>to
>>
>> int a = 0;|
>> int b = 1;
>>
>>> But if we move over the smallest
>>> subtree, I’d imagine it only move across the semicolon after [1].
>>
>
> Doesn't this look like forward-sentence?
In this case, yes. But in other cases it will move at different levels
of the tree. E.g.:
int x = f (b + 4, c * 7 - z * 2, d, e);
It will sometimes move over the whole instruction, and other times over
just a single variable or over a whole argument or over just a "factor".
This depends on where point is when `forward/backward-sexp` is called.
Stefan
- Re: Plug treesit.el into other emacs constructs, (continued)
- Re: Plug treesit.el into other emacs constructs, Stefan Monnier, 2022/12/12
- Re: Plug treesit.el into other emacs constructs, Theodor Thornhill, 2022/12/13
- Re: Plug treesit.el into other emacs constructs, Stefan Monnier, 2022/12/13
- Re: Plug treesit.el into other emacs constructs, Yuan Fu, 2022/12/13
- Re: Plug treesit.el into other emacs constructs, Perry Smith, 2022/12/13
- Re: Plug treesit.el into other emacs constructs, Stefan Monnier, 2022/12/13
- Re: Plug treesit.el into other emacs constructs, Yuan Fu, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Theodor Thornhill, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Stefan Monnier, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Theodor Thornhill, 2022/12/14
- Re: Plug treesit.el into other emacs constructs,
Stefan Monnier <=
- Re: Plug treesit.el into other emacs constructs, Theodor Thornhill, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Stefan Monnier, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Stefan Monnier, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Theodor Thornhill, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Stefan Monnier, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Theodor Thornhill, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Stefan Monnier, 2022/12/14
- Re: Plug treesit.el into other emacs constructs, Theodor Thornhill, 2022/12/15
- Re: Plug treesit.el into other emacs constructs, Stefan Monnier, 2022/12/15
- Re: Plug treesit.el into other emacs constructs, Theodor Thornhill, 2022/12/15