Skip to content

Fixed all the tests + Added (true) Visual Mode#130

Merged
unelma merged 13 commits into
egaga:masterfrom
ademby:fix-tests
Jul 18, 2026
Merged

Fixed all the tests + Added (true) Visual Mode#130
unelma merged 13 commits into
egaga:masterfrom
ademby:fix-tests

Conversation

@ademby

@ademby ademby commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

I enjoyed the tutorial, but felt sad that the sandbox doesn't work properly. So I decided to contribute.

Things done :

  • Added some utilities here and there (executor.js).
  • Fixed all the failing tests
  • Refactored the Visual Mode commands

Results :

  • All tests are now successful
  • Sandbox works as expected

Things to be done :

  • Add more commands, more tutorials, and more tests.

PS :
I've just noticed the tasks.txt file. So, my next steps will be to follow the tasks.
Additionally, now that i understood the whole project. I am ready to migrate it to Typescript. That would be a sensible and empowering choice.

On standby.

Note :
AI-agents fail maintaining legacy code : they write (3x) more code than needed, and still introduce errors.
Maybe Typescript would allow them contribute better.

ademby added 13 commits July 2, 2026 01:05
When pressing j or h, the cursor should stay on
the same column. Even if a line didn't have enough
characters, the cursor should adapt for that line
than go back to same column.
There is a problem with the w, e, and b commands :
they follow "WORDS" and not "words"
- `init_testing.js`-> `$()` was missing, adding it fixed a lot of tests
- `testengine.js`-> Clean leftovers of last test [improved `setup`]
- `commands.js`-> After `dd`, cursor go to the start of next line
- `executor.js`-> Improve `removeBetween` funtion
- `commands.js`-> updated `vim_shifted_j()`
- `executor.js` -> added utilities for more clarity
- Factorized the `insertNewLine[Before/After]Cursor`
- To be used in other commands (check next commits)
- Simulated tests in Vim, observed results and updated the unit tests
- All Tests are now green
- Visual Mode works well in sandbox
- All visual mode logic in one file
@egaga

egaga commented Jul 16, 2026 via email

Copy link
Copy Markdown
Owner

@unelma
unelma merged commit 39e98b3 into egaga:master Jul 18, 2026
@unelma

unelma commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Thank you for the contribution!

I appreciate

  • that you checked the tests in real Vim
  • that you made multiple commits

I looked the code but did not spend time to verify all logic.
Some small details I would change but it's good enough. The code is originally obscure enough to not worry too much about similarly as a properly serious project would be. Not to say that the code should be whatever.

There is problems with tests but they were small so I accepted anyway:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants