-
Notifications
You must be signed in to change notification settings - Fork 1k
Conversation
Can delete multiple lines moving upwards or downwards. Potential issue: Check for upward or donward movement is based on unicode key, not action.
dj and dk actually delete an additional line. dj deletes 2 lines, 2dj deletes 3, ect.
Conflicts: main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViMode.cs
Can now yank multiple lines with commands like 3yy, 5yj, 2yk. Bug: The caret resets to the line start after pasting a yanked line (should reset to first non whitespace)
Adds support for indentation movement commands such as 4<j and >3k.
Macros can be repeated by preceding @ with a number.
@mhutch could you review this? |
I made these additions before I realized the new vi mode was in progress. |
I had a quick scan and it looks good. There's one problem though - it doesn't match the MD code style. If you'd be willing to fix the style (ideally squashed/edited into each commit) I'll land it. It doesn't do any harm to have these improvements while the new mode is in progress :) |
Just read over the coding guidelines (probably should have done that earlier...) I've never tried rewriting history, but I'll give it a shot. If that doesn't work out, though, would it be acceptable to just have 1 reformatting commit? |
Take a look at other files and how they're written. MD coding guidelines should be used, not the Mono ones. It explains in the 2nd link pretty clearly. Have fun! :D |
I reformatted the code in each commit and made a separate pull request. |
Thanks for making this. I was having a hard time with MonoDevelop. |
Will this or #319 not merge? |
I made this awhile ago and I'm not really sure what the status is now. As you can see from the comments above, there was a new vi mode framework in progress at the time I made this. I'm not sure how far that has come or whether this would still merge as I haven't been using (or developing for) Monodevelop lately. |
Thanks for replying. https://github.com/kanonji/monodevelop/compare/merged-293 I have tried to merge this PR on my forked repos. There are no any conflicts. |
- See pull request: mono/monodevelop#293
My profound apologies for being such a poor maintainer of the vi addin and letting your pull request languish so long. Unfortunately vi mode was an old side project for me and I have not had the time recently to do a proper review of the PR, let along work on it myself, and I did not want to risk regressions. Fortunately another another contributor has factored out the vi mode into a standlone addin which can be updated independently of MD/XS, and has merged this pull request: The standalone vim addin is already available to be installed from the addin manager. I think it's best if I officially deprecate the built-in vi mode in favor of the standalone addin. I'll remove it soon. |
filter completions by first character
In Monodevelop's Vi mode, you may now prefix actions with one or more digits to allow for repeated commands.
For example, 3dd deletes three lines, 25k moves the caret up 25 lines, 3cw deletes three words and enters insert mode.
The following command types now support numbered repetition:
Basic Movement (h,j,k,l,w,b)
Delete (dd, dj, dk)
Change (cc, cj, ck)
Yank (yy, yj, yk)
Indent (<< or >>, also < or > followed by j or k)
Execute Macro (@)