Open giluis opened 3 years ago
Hi, Please try to configure:
"vim.argumentObjectClosingDelimiters": [
")",
"]",
"}"
],
"vim.argumentObjectOpeningDelimiters": [
"(",
"[",
"{"
],
Hopefully it's what you're looking for
Describe the bug This bug was noticed while programming in TypeScript.
daa
anddia
should delete object literal attributes like if they were function arguments (including or excluding the commas, respectively) However, it it doesn't work with object attributes.To Reproduce \<c> means the cursor is on top of c
1a. Setup
2a. Press
daa
1b. Setup
2b. Press
dia
Expected behavior After 2a, expected is:
But we got:
(Nothing happened)
After 2b, expected is:
But we got:
(Nothing happened)
Aditional Context This situation is also observed with
cia
andcaa
I know the original vim-target plugin does not target things like typescript object attributes. I wouldn't have opened this issue, if not for the fact that thisdaa
anddia
actually work on object attributes in some circumstances eg. when the object is an argument to a function. Example \<c> means the cursor is on top of cPressing
daa
in the situation will result inEither
dia
anddaa
should not work at all on object attributes (which I would not want, since I think it is a very useful feature) This behaviour is, however, not correct: it is deleting everything (backwards) until the(
, which does not make sense in this context. I will open another issue for this, as I think it is a bug. Please let me know your thoughts on this.