Replies: 1 comment
-
Hi! Thanks for reporting. There are two issues here.
The Current FormLet me start with the General case. When there is no selection, Expand selection will select the Current Form. This is an important concept in Calva, a lot of commands depend on it. A form here means about the same as an s-expression. It's either a ”solid” thing, like a symbol or a keyword or a literal number, or a list of some type (
If we consider the cases for things on the same line, using your example, and use
Here are two places where we have described the Current Form concept in different ways: The Ignore Reader Tag (
|
Text and cursor | Current form |
---|---|
#_|foo |
#_ |
#_foo| |
foo |
#_ |foo |
foo |
#_| foo |
#_ |
I'm not sure what would be least surprising and most useful, tbh. Maybe this:
Text and cursor | Current form |
---|---|
#_|foo |
#_foo |
#_foo| |
#_foo |
|#_foo |
#_foo |
#_ |foo |
#_foo |
Beta Was this translation helpful? Give feedback.
-
When I'm using the expand selection (ctrl + w) on something like:
(and my cursor is located after
#_
)It selects
#_
and notWhich I thought it would. Don't know if this is intentional or not.
I expected it to work as this: if i stand in between the "" in the example below - it selects
bar
- but if i'm outside it selects"bar"
and if I'm inside the function onfoo
it selectsfoo
and if I'm outside it selects(foo "bar")
Beta Was this translation helpful? Give feedback.
All reactions