News for hackers. Stuff that matters.
Re:A Look at Vim, a Text Editor for the Ages by didibus on Tuesday August 21, 2018 @07:51PM (#17814930)
I love both Vim and Emacs, but I think they have different use cases.

For example, I find it much more productive to use Emacs for writing heavy tasks, where you'll spend a lot of time in the editor. Such as coding, writing notes, a book, an article, a paper, etc.

To me, these tasks suffer from having to switch back and forth between modes, and emacs just provides more features for them and can be customized endlessly to your specifics.

Vim on the other hand shines for quick edits, touch ups, or reading, viewing and analysing use cases.

Its best feature is performance. It starts fast, runs fast, can handle big files, consumes little memory and is small in size. This is ideal on a server, or as a default editor. I wouldn't want to have Emacs for these, it's too heavy.

For editing small parts of an existing file, the modal editing is also best. It makes navigation front and center, which is what you want, quickly find the part to edit, and quickly edit it, done.

I personally like it this way. I don't actually want Vim to grow to approach Emacs in customization. I also don't think anything can, the fundamental design of Emacs as a Lisp REPL with an editor loaded into it just can't be beat for that.

Re:A Look at Vim, a Text Editor for the Ages by ptero on Wednesday August 22, 2018 @08:28AM (#17818179)
Both editors are fully capable, it really depends on personal preferences: what they see as a minor if any annoyance: multi-key presses or two-mode editing. I use vim and it works great for me for large tasks as well. I never developed a pianist's finger agility for multi-key commands (those famous Esc-Meta-Alt-Ctl-Shift types). If I did I probably would have loved Emacs more than vim.
Re:A Look at Vim, a Text Editor for the Ages by zeveb on Wednesday August 22, 2018 @11:32AM (#17819401)
> Both editors [ed: vim & emacs] are fully capable, it really depends on personal preferences

I think that Paul Graham's Blub Paradox[0] applies to editors and operating environments as well as to programming languages: someone using an editor or environment which sits at a particular level can look down at lesser editors or environments and see how much more productive his is, but when he looks up at other editors or environments he just thinks they don't make sense — at best they solve problems he's never had, and at worst they are just plain weird.

The troublesome thing is, vi is in many ways a better editor than emacs is, but emacs is definitely a better operating environment than vi, vim or neovim is, so you're kinda stuck. If you want a great editor, then you want vi — but then you're stuck with a terrible, sub-par editing environment. If you want a great environment, emacs is hands-down the best — but you're stuck with a hand-hurting morass of keychords. I honestly don't believe it's a personal preference to state that vi's text-manipulation language is better than emacs's, but I also honestly don't believe it's a personal preference to state that emacs is a better, more extensible environment than vi, vi or neovim.

Spacemacs is a really interesting experiment in merging the two, adding the text-editing language of vi to the operating environment of emacs. It's probably the way of the future, although there are just enough rough edges that I ended up returning to emacs.

Why did I do that, when vi is the better editor? Because as important as editing text is, emacs provides an entire environment for computing. It's the ocean in which I swim, the forest in which I hunt, the field where I sow my corn and the air I breathe. Less poetically, Magit & Org mode are awesome; four decades of contributed code mean that just about anything I want to do has been implemented; elisp means that anything that hasn't is easily implementable.

0: http://paulgraham.com/avg.html

Re:A Look at Vim, a Text Editor for the Ages by xfer on Wednesday August 22, 2018 @12:11PM (#17819741)
You keep talking about "better" editor, keybindings doesn't make an editor, emacs is as capable editor as vi is. Then you go on to talk about how spacemacs is so much better, what? All it does is add someway to structure your packages and use evil-mode(which shows that yes you can replace keybindings).
Re:A Look at Vim, a Text Editor for the Ages by didibus on Wednesday August 22, 2018 @02:36PM (#17820849)
The editor in a concrete form is one thing. Like what can the editor actually accomplish in terms of features. I'm not sure which of Emacs, Vim or Neovim would win this one.

It also depends if you assume out of the box feature set, or potential feature set. Like with added plugins and customization. I feel Emacs has the potential for many more features, and does have more in my experience, but not out of the box. Vim has a slight edge out of the box.

The other thing is the editing UX. The modal editing Vs key-chord editing. That's where I feel there is no all around winner. I find modal is great for small edits as I said. And single mode with key-chord I find better for long writing sessions, where you actually type a lot.

Are you saying you find modal to be best at both of these use cases?

Re:A Look at Vim, a Text Editor for the Ages by didibus on Wednesday August 22, 2018 @02:24PM (#17820736)
You could try Spacemacs in that regard.

You can use it with Vim key bindings, but get the customization offered by Emacs.

I also suggest trying it in Holy mode. What it does well is make commands mnemonic, more similar to Vim, but they just all start with M-m (Alt+m)

So you would do something like M-m b N to create a new buffer. Or M-m w / to split the frame in two windows horizontally.

This I find saves you to modal switch overhead, but maintain the simpler keystroke commands.

Re:A Look at Vim, a Text Editor for the Ages by partycoder on Wednesday August 22, 2018 @10:26PM (#17824057)
Spacemacs and Spacevim can be slower than a standalone IDE.
Re:A Look at Vim, a Text Editor for the Ages by newen on Tuesday August 21, 2018 @08:58PM (#17815304)

   $ alias cs='emacsclient -nw'
   $ emacs --daemon
   $ cs notes.txt
Emacs starts up pretty quick for me. Kind of agree though, especially about the modal editing and quickly navigating. I often start up vim when I want to edit a word or two at a specific line fast. I switch over to emacs if I end up editing multiple lines and organizing the text.
Re:A Look at Vim, a Text Editor for the Ages by dmortin on Wednesday August 22, 2018 @05:49AM (#17817534)
For server editing there is Tramp, so Emacs does not have to be installed on the server at all to edit files there.
Re:A Look at Vim, a Text Editor for the Ages by atilaneves on Wednesday August 22, 2018 @07:48AM (#17817995)
I don't understand the meme of "vim is great because I ssh and it's intalled everywhere" when tramp exists.
Re:A Look at Vim, a Text Editor for the Ages by giancarlostoro on Wednesday August 22, 2018 @07:54AM (#17818018)
Indeed, I open Emacs and can edit files on multiple target platforms.
Re:A Look at Vim, a Text Editor for the Ages by falcolas on Wednesday August 22, 2018 @10:22AM (#17818849)
Does tramp work well when you have a bastion server?
Re:A Look at Vim, a Text Editor for the Ages by kip_ on Wednesday August 22, 2018 @11:11AM (#17819211)
The docs located at https://www.gnu.org/software/emacs/manual/html_node/tramp/Mu... should help you there.
Re:A Look at Vim, a Text Editor for the Ages by another-cuppa on Wednesday August 22, 2018 @06:23AM (#17817652)
When I install Gentoo or Arch, one of the first things I install is vim and one of the last things I install is emacs because that's where I do all my work.
Re:A Look at Vim, a Text Editor for the Ages by arminiusreturns on Wednesday August 22, 2018 @12:35PM (#17819929)
I use emacs for almost everything, but for me nano is the lightweight gnu editor I use when I would use vi(m)... of course, knowing vim is important because some systems only have it. (but with emacs I can just edit files remotely anyway)
Re:A Look at Vim, a Text Editor for the Ages by thomastjeffery on Tuesday August 21, 2018 @09:03PM (#17815335)
emacsclient really fills the gap for me.

I have emacs running as a systemd service, so I never notice its real start time.

> I don't actually want Vim to grow to approach Emacs in customization.

It already has. The difference is that it doesn't come with very many packages, and packages aren't all written in elisp.

Neovim will end up with a similar amount of packages eventually. A lot of those packages will be written in Lua, making them relatively fast and lightweight.

(Neo)Vim doesn't lend itself to total customizability, since its foundation is dependent on its default keybindings.

Re:A Look at Vim, a Text Editor for the Ages by _emacsomancer_ on Wednesday August 22, 2018 @10:36AM (#17818962)
Careful running emacs as a systemd service. I did this for some time, but then one day when I rebooted the computer, nothing worked - drives weren't mounted properly, services I expected weren't there. I finally found that none of my systemd services had come up (but systemd didn't generate errors or failed messages) and yet later still discovered that it was apparently an error in my .emacs that had somehow caused a domino effect of none of my systemd services starting up.

I've gone back to just having `emacs --daemon` in my .xnitrc.

Re:A Look at Vim, a Text Editor for the Ages by thomastjeffery on Wednesday August 22, 2018 @01:15PM (#17820218)
I've had errors in my .emacs, and had no issues. I don't see your experience as a reason to not to do it this way.

In case you are interested, I followed the instructions here: https://nixos.org/nixos/manual/index.html#idm140737316012272

I imagine it is a very common practice for NixOS users to run emacs as a systemd service.

Re:A Look at Vim, a Text Editor for the Ages by _emacsomancer_ on Thursday August 23, 2018 @12:59AM (#17824725)
I also had errors in my .emacs many times and had no issues, until one day.

> I don't see your experience as a reason to not to do it this way.

That's fine. I simply offer it as a cautionary tale. It's possible that systemd on Nix handles things more gracefully than systemd on Arch (though it seems unlikely).

Re:A Look at Vim, a Text Editor for the Ages by pecg on Wednesday August 22, 2018 @02:29PM (#17820790)
It sounds as if the problem was systemd instead of 'emacs --dameon'.
Re:A Look at Vim, a Text Editor for the Ages by _emacsomancer_ on Thursday August 23, 2018 @12:58AM (#17824716)
Yes, indeed. That's why I began with "Careful running emacs as a systemd service."
Re:A Look at Vim, a Text Editor for the Ages by pecg on Thursday August 23, 2018 @03:59PM (#17830256)
I'm glad I made the switch from Arch to Void. Runit is clean and simple, it does the correct job in a deterministic fashion, if something fails proper errors appear on usual logs.
Re:A Look at Vim, a Text Editor for the Ages by _emacsomancer_ on Friday August 24, 2018 @12:12PM (#17835831)
I've shifted my work desktop and work laptop to Void, partially for similar reasons. Home desktop is on Arch still though, for various reasons.
Re:A Look at Vim, a Text Editor for the Ages by didibus on Wednesday August 22, 2018 @06:07AM (#17817597)
When I meant customization, I didn't mean the availability of plugins. I meant the ability to change everything, and do it myself simply and quickly if needed, from within the editor itself.

There's only two editors I know that give you that, Emacs and Atom.

That said, I didn't try neovim, but it just seems like Vim with Lua plugins. Kinda similar to how Sublime Text can have Python plugins.

Re:A Look at Vim, a Text Editor for the Ages by thomastjeffery on Wednesday August 22, 2018 @01:19PM (#17820237)
I agree: Vim is really held back by its reliance on default keymaps. Sure, you can remap them, but they are still the lifeblood of what Vim is. You can't change what they are.

Even emacs has this problem: there is a general set of consistent keymaps that are set by a wide variety of emacs modes. It's certainly not a trivial task to change, or get rid of them.