
Remove Ex-Mode from Neovim - stepanbujnak
https://github.com/neovim/neovim/issues/1089
======
linguafranca
This is one of the reasons I very strongly support the Neovim project. They
are taking an incredibly sensible and pragmatic approach to modernizing Vim.

Yes, there will be controversies. There always are. But even collaborative
open source projects need strong-willed leadership, or they cannot grow
properly.

------
epmatsw
For those who, like me, had never heard of Ex-mode:
[https://en.wikibooks.org/wiki/Learning_the_vi_Editor/Vim/Mod...](https://en.wikibooks.org/wiki/Learning_the_vi_Editor/Vim/Modes#Ex-
mode)

~~~
k__
"... similar to the command line mode ... Unlike the command-line mode you
won't return to normal mode automatically ... enter ... by typing a Q in
normal mode"

So they have a mode you enter when pressing q (which quits many other
programs) that you can't leave if you don't know the leave command?

This is comedy gold. :D

~~~
goldfeld
As much as vim is known as the modal editor, that sounds like you're
describing Emacs (I'm using evil-mode instead of vim these days.) Whereas vim
has dual-modality as its core, it's very well-defined and self-contained as
far as modes go, and with the exception of this Ex mode, you can get out of
any weird state by pressing Esc. Emacs, on the other hand, has potentially
dozens of different 'modes' you can accidentally find yourself in, and each
one seeming to have a different way of getting out, it drives me insane! Even
a question in Emacs which can only be answered by typing out 'yes' or 'no',
and by no other frigging escape sequence, is a mode come from hell. Worse yet,
press Esc and Emacs goes into the mode of a mode where it briefly becomes
unresponsive as it lets you know that you are WRONG.

Vim to me is like having a smooth technical conversation with a work partner.
Emacs is like conversing with my partially deaf grandpa.

~~~
thegeomaster
I'm interested to hear why you're using evil-mode instead of vim if that's how
you feel. I'm using vim with slimv for Lisp hacking at the moment and I have
to admit that there are some whoopsies, but not enough to make me learn to use
a whole new editor :)

~~~
goldfeld
Well, rant and occasional surprise aside, I've found evil-mode to truly be a
better implementation of vi than vim itself, at least where it concerns me (as
formerly a pretty advanced vim user and plugin developer, it took me some
adapting to stop using all the ex vim idioms and the like.) It's faster to
handle big files and execute macros, overall snappier and has a profoundly
better %s///g with real time preview.

I really did start using Emacs when I started learning Clojure(/Script),
though, and made it my main language and platform investment. And org-mode had
been playing a part in my want of switching for a while, building up for
years. I also told myself it'd be better to hack in a lisp but Elisp is so
fucked up I still haven't mustered up the courage to properly learn all its
old and unexpressive idiosyncracies (god, even creating a closure requires
explicit verbosity!) Meanwhile I don't think I can bear VimScript anymore--
since getting into Clojure my language standards have gone considerably up. As
a result I do the odd hack but haven't developed more powerful plugins in a
while, not in elisp nor vimscript; I'm in a psychological limbo there. Kinda
hoping Guile-Emacs takes off so I can do stuff in scheme.

~~~
thegeomaster
Thanks for the insight, much appreciated.

Out of curiosity, what do you mean by 'verbosity' in this case? I just Googled
and it looks like Elisp uses the same (lambda (arg _) form_ ) syntax, like CL
---is this what you're referring to?

~~~
xrange
Lexical binding is a "new" feature for elisp. See:

[http://www.emacswiki.org/emacs/LexicalBinding](http://www.emacswiki.org/emacs/LexicalBinding)

...for some of the issues.

------
otikik
This is like dropping support for Internet Explorer 6 in a website - code gets
cleaner at the expense of a minor group of users getting a worse experience. I
think it is a good tradeoff.

~~~
gfodor
More like IE3. Nobody uses ex mode.

~~~
nXqd
It's not true. Some still uses it extensively in the case of editing the last
commands. But there is alternative way.

I am happy that they will remove this mode in the future :)

~~~
pydave
q:

That gives you a buffer you can look through previous commands and use normal-
mode commands to edit them.

Also, you don't need Ex mode to edit last commands. You can just press Up from
cmdline.

------
unclebunkers
Good riddance. It's cruft. I've used it exactly twice, and never was it
something I couldn't have done on the command line. It might be useful on
Windows, I'm not sure? But if you're on a *nix, there really isn't any point.

------
Slackwise
While I don't particularly care for ex-mode, I think it's weird to be calling
it Neo 'vim' without it.

If it's going to become more of a radical departure from Vim and start
omitting features as well as adding, I would rather they change the name of
the project instead, one that alludes to its Vim heritage rather than having a
prefix that means 'new'. Is it a new version of Vim? Or an editor that started
as a fork of Vim, but only has the good parts?

 _Edit:_ Removed my insult of the name 'Neovim'. Just going to state that I
dislike it.

~~~
tarruda
I'm the project founder and also dislike it. I admit it was one of the first
things that came to my head(The name was inspired by some of @Shougo plugins).
If I knew the project would get so popular, I would have put more thought into
it. Too late now :(

I hope eventually the community will just use the 'nvim' abbreviation to refer
to Neovim, just like 'vim' is 'vi improved' abbreviated

~~~
scott_karana
Considering that there's already an "nvi", that might be confusing... but I
agree, a name change may be warranted. (personally I like it)

[http://en.wikipedia.org/wiki/Nvi](http://en.wikipedia.org/wiki/Nvi)

~~~
ehsanu1
There isn't usually too much confusion, at least among users, about the
different between vi and vim. Also, have never heard of nvi, whereas nvim
seems like it's going places.

------
bstar77
I've been using vim for 7 years and I've never even attempted to use this
mode. Am I missing out?

~~~
rkowalick
It seems like a very good way of using vim knowledge to do non-interactive
text processing. You could say, indent a javascript file that is ugly.

~~~
tyler_ball
easier than hitting gg=G ?

~~~
kevinmgranger
_non-interactive_

------
dorfsmay
As an old "vi" user, I used it quite a bit both while editing and to test ex
scripts. To me, by removing it, they will compete with emacs and the likes but
not with vi/vim.

~~~
fdsary
Burrrrn!

------
bryanlarsen
AFAICT, ex-mode is usually used for scripting, as an alternative to sed, awk,
and/or perl.

So even if you have neovim set up as your "vi", you'll probably still have an
"ex" available on your command line. It'll just be symlinked to legacy vim,
not neovim.

~~~
bluefinity
The post doesn't make it clear at first, but they're not removing support for
reading ex commands from stdin, just the interactive ex mode you can enter
from inside the editor.

------
krick
Removing pretty powerful feature just because author of fork doesn't use it
sounds… well, actually author of fork can remove whatever he likes, but
presenting neovim like "refactord vim with more features" isn't fair or even
plausible in this case. And for what reasons? Oh, I see, it makes code
complicated. Did he think vim'c codebase is scary for _no_ reason? Removing
all the code from vim would be the ultimate simplification in that case. It's
not popular feature? Well, I believe that there can still be more vim users
that don't use macros, maybe remove them as well? Or maybe just replace vim
with nano?

I, personally, used ex-mode only a couple of times, so even if I will use
neovim I don't think I would care. But that just doesn't sound like a right
think to do.

~~~
saidajigumi
They're not removing _command line mode_ , they're removing interactive Ex-
mode[1]. Batch ex-mode from the command line (nvim -e) stays. From the
research the team has done, most users 1) don't even know about it, 2) are
annoyed when it is triggered by accident, and 3) when they do know about it,
just remap it. And yes, there are a few users of ex-mode out there.

A huge part of good design is being able to make good (and often hard)
decisions about when and where to simplify. This includes things like
occasionally _eliminating_ features. Ones that have shipped. For months, or
even decades.

There are very solid arguments presented in that thread for _interactive_ Ex-
mode's removal. Specifically, one problem that @tarruda mentions is that ex-
mode is one of the blockers for "implementing GUIs over msgpack API."
Seriously, I'd trade ex-mode for that in a heartbeat!

[1] [http://vimdoc.sourceforge.net/htmldoc/intro.html#Ex-
mode](http://vimdoc.sourceforge.net/htmldoc/intro.html#Ex-mode)

~~~
dllthomas
I don't know that there is any good reason to allow a move from visual mode to
ex mode (or vice-versa). I do think that ex mode is very important - though I
would expect you could implement it as its own UI over msgpack?

~~~
saidajigumi
As neovim matures I think the opportunities for rich extension and scripting
are going to _blow away_ anything vi/vim users have ever had. I think ex-mode
could be reimplemented as you suggest, or we'll end up with other awesome
approaches that were simply unthinkable in the old architecture and codebase.

~~~
dllthomas
It looks like tarruda explicitly says, _" As for the ex command-line utility,
that can easily be implemented as separate program that talks to nvim via
msgpack-rpc"_.

This seems like a reasonable separation of concerns.

------
4ad
Ugh. Some awful distributions remove ed(1) by default, when that happens, I
use vi's ex mode as a substitute. Now these people want to remove that too,
amazing. I can only hope this vim fork never becomes the default vi on any
systems I am forced to use...

~~~
pydave
Nah, they're keeping that:

[https://github.com/neovim/neovim/issues/1089#issuecomment-56...](https://github.com/neovim/neovim/issues/1089#issuecomment-56177138)

You just can't switch between ex and vi modes.

------
dllthomas
Can they implement ex over the same msgpack interface they want for GUIs? The
ability to switch back and forth between ex mode and visual mode is much lower
priority than the ability to interface with my editor over something
resembling ex (which itself is not _super_ high priority, but this definitely
falls in the "cons" column for neovim).

Edited to add:

FTA:

 _" As for the ex command-line utility, that can easily be implemented as
separate program that talks to nvim via msgpack-rpc"_

Great! I have no to minimal objection.

------
nicwest
I have been using Ex mode for it's REPL like qualities while learning
vimscript, it's a useful feature if you are writing vim plugins or doing
complex search/replace operations.

Will a similar conversation happen with Replace mode? I use this mode less
than Ex mode and it has a useful key bind (R) that could be recycled.

~~~
gh02t
I doubt it. Apart from the fact that at least I find replace mode useful, I
think their main reason is not just because most people don't use it, but also
because ex mode behaves inconsistently.

------
erikb
Although I have no idea how good or bad this will turn out, I think it's a
very good idea to kill edge features and instead focus on treating edge cases
of core features better.

------
mcantor
Hadn't heard of nvim until today.

Can anyone sell me on this project? I looked at the homepage and README, but
they're both pretty hand-wavey.

What problems does nvim solve for experienced vim users?

~~~
davis
It is trying to refactor Vim and update it. If those sources are all too
"hand-wavey", here's the consolidated feed for the development in the last
months: [http://neovim.org/news/archive/](http://neovim.org/news/archive/)

------
icambron
I probably feel the same way about this mode as my mom feels in a terminal
window.

------
co_dh
as a developer, I think it's good to remove some rare feature to reduce code
complexity.

Also it's good to make this kind of feature as plugin, so it will reduce the
code complexity.

~~~
doorhammer
I was thinking something along these lines.

I've never used ex mode, so I could be wrong about this, but briefly reading
through the description for it made it seem like you could replicate the
functionality through the neovim plugin/messaging architecture, and probably
get something cleaner on the other side.

------
crouchy
I accidentally pushed the wrong button

------
hardikpandya
Very well.

------
adamors
Removing "NeoVim" from the title removed the context as well. As it is, the
title doesn't make any sense.

~~~
dang
We put it back. The real problem here is that "neovim" doesn't show in the
domain, which is part of the title row. "github.com" is far too generic to be
meaningful. We may experiment with making the domain say, e.g.,
"github.com/neovim" for github.com and one or two other popular sites.

~~~
adamors
That would definitely help.

