Conversation
:`a,`b+10 and :/abc style ranges now work.
/cc @lloeki |
Thanks @jazzpi. |
(`:qall`, `:update`, `:wall`, `:wq`, `:xit`, `:exit` and `:xall`)
`:tabclose`, `:split`, `:new`, `:vsplit`, `:vnew`
Also adds support for `\C` in search patterns (force case sensitive search)
Alright, this should be finished, finally 😄 |
Thanks for the work on this. Pardon my ignorance, but what do I need to do to help test this as a package in Atom? |
Thanks for helping out 😄 What you'll want to do is opening a terminal and executing these commands: git clone https://github.com/jazzpi/vim-mode
cd vim-mode
git checkout ex-mode
apm link -d This will download the code, check out into the feature branch and then create a symlink in your dev packages so that when you start Atom in development mode ( If you have the |
I tried the instructions to get the package, but it failed to load. I disabled my other 3rd party packages to try running this. I am using Windows 7, Atom 1.0.2 Download of git repo was OK. apm link -d Started with 'atom -d' Failed to load the vim-mode package Any ideas? |
Try running Also, did the |
This isn't going to get merged, see #596 (comment) for the reasons. |
The reasons why implementing
ex
mode invim-mode
itself is a good idea are pretty well laid out in #596.As a follow-up, this PR attempts to implement
ex
. It's definitely not done yet (see the to-do list), but I would like to get some early feedback since this is a pretty big chunk of code (and it is still not quite clear to me whether or not this is actually wanted).So far, a lot of the code was simply copy-pasted over from ex-mode, however there is one crucial difference:
Ex commands are not added by simply adding a method to the
Ex
class. Instead, they are added by callingExCommand.registerCommand
. The reasons why the behemoth-class way didn't work are discussed in lloeki/ex-mode#49. They are also passed an object instead of an argument list.This allows for a simplified method of matching methods - Since every command has an associated priority with it, if multiple commands match an input (e.g.
:e
matching both:edit
and:echo
), the one with the higher priority is executed. If multiple commands with the same priority match the input, the one that comes first in the alphabet is executed.@romgrk proposed a different format in lloeki/ex-mode#49, but I felt like this format requires less effort and is less prone to errors. I would however like some feedback on this topic.
Now, here is a Todo list of things necessary before merging this:
:/a/d
style commands should work.:/
commandrange should work.Some things that would be nice to have:
[count]tabnext
style commands:'<,'>s/a/b
(Visual mode ranges):set
registerCommands
via a service to make adding commands frominit.coffee
possibleThe last one is a bit obscure, so here are some examples: