Comments (13)
For anyone wanting to follow along at home, I have a fix available on cw-special-case at https://gitlab.com/crussell/amVim.git
from amvim-for-vscode.
Why are you taking fixes but changing the committer ID to your name, and assigning bugs that already have fixes to yourself instead of either accepting the existing fix or discussing the changes?
from amvim-for-vscode.
@ghost
Sorry, I don't know how to merge commits from outside github, so I just copied them by hand.
from amvim-for-vscode.
About the assignment, I used it to identify that I might need to check the issue sooner.
This is misleading and I removed all those assignments.
from amvim-for-vscode.
I just realized I could add a new origin and merge branch from it!
I'll do this next time.
from amvim-for-vscode.
This is ready to merge with 0.1.1 now. git pull https://gitlab.com/crussell/amVim.git cw-special-case
from amvim-for-vscode.
Please give me some time to check this one.
from amvim-for-vscode.
I'm not sure about passing actions' args
to motions.
It can make the input -> action -> motion
flow harder to control and understand.
How about passing isChange: boolean
to ActionDelete.byMotions
and then deal with it like isInclusive
?
from amvim-for-vscode.
The problem is we need to be able to select the correct behavior for w
at some point before it gets added to the motions array. By the time we get to ActionDelete.byMotions
, we've already created the motion, which means it can only follow the normal semantics for w
(i.e., NEXT_START
).
Whatever fix we take for this is probably not going to be very clean. It's a special case where Vim itself, intervenes to rewrite the rules about what w
is supposed to mean.
If you don't want all the args getting merged, what about allowing commands to pass an optional set of args forward to the motion? We would be able to select the appropriate semantics that way. It would work the same as my current change does, except it would happen through an extra sidechannel, instead of creating a single set of coalesced args. Bindings that never use the sidechannel wouldn't be affected. This actually does end up sounding pretty clean to me.
from amvim-for-vscode.
The option
param of motions' apply
function is intended for special case like this.
I think we don't need to implement another way to deal with special cases unless it is impossible with the current one. (And if that is the case, we should eliminate the option
param and change it to the new way.)
https://github.com/aioutecism/amVim-for-VSCode/blob/master/src/Motions/Motion.ts#L15
from amvim-for-vscode.
Okay, I used option
instead.
https://gitlab.com/crussell/amVim/commit/9672a0adbbb91dee91af910d8beff999c2506563
I'm not calling it isChange
anymore. I was writing some code comments to clarify that it wasn't for general purpose use and there shouldn't really be any other reason to use it, but then I just named it cwNeedsFixup
instead. It's more self-documenting that way, and I can leave out the comments.
Note that this is a different branch (cw-new
). I branched off the old cw-special-case
to avoid committing changes that would have just reverted what was in the other commit.
from amvim-for-vscode.
Thanks for the fix.
Merged d7c0494.
from amvim-for-vscode.
Also, I'm thinking using getWordRangeAtPosition
from VSCode's API to do word motion.
Maybe next time.
from amvim-for-vscode.
Related Issues (20)
- release 1.32.0 and publish to extension marketplace HOT 2
- OpenVSX marketplace? HOT 10
- Multi-selection pasting is broken for multi-cursor
- Demo GIF in README
- release 1.33.0 and publish to extension marketplace HOT 2
- release 1.34.0 and publish to extension marketplace HOT 5
- Vgg does not work HOT 5
- Add the macro feature in amVim it's the most wanted feature right now!!!! HOT 1
- apply powerline theme HOT 1
- Is this project still active? HOT 2
- `o` Motion Cursor Position Incorrect HOT 22
- yy on line without trailing newline should insert a newline on p
- switching to visual mode and going down puts the cursor one to the right of where it should be
- Add Horizontal split HOT 1
- :set filetype could open language selector
- Some commands are (sometimes) broken in VS Code 1.75.0+ HOT 9
- Cannot switch out Normal mode in long file HOT 5
- feature request: distinct VScode mode to ignore amVim commands HOT 1
- Gets locked in 'shift' mode HOT 2
- Remapping jump to next section HOT 1
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 amvim-for-vscode.