Hacker News new | ask | show | jobs
by gkya 3337 days ago
I'm an Emacs user and that's because the Unix way doesn't quite work out well in practice: composition is hard, requires textual transformation with many possible edge cases as glue which is hard to build and maintain and is bug-prone, and interfaces are cryptic, only partly portable and inconsistent. Elisp on the other hand is a nicer primitive for building my day-to-day tools: Uniform data format everywhere; buffers and processes are nicer primitives as an interface to other programs in the system; single, extensible programming language (with lexical-scope added and threads coming in, Elisp is quite pleasant to program in in fact).

NeoVim seems to bring these qualities into Vim sphere, giving the users and extension developers (in Emacs many extensions are apps themselves) better primitives to develop tools and applications, and allow to abstract-away Unix userland which is way too low-level and as I said above, not that friendly and helpful environment to live in. It holds on to what makes Vim interesting (modal editing, the range-command-object-movement style editing commands, ex mode) while adding a better API (VimL is...).

1 comments

I used vim and neovim for quite some time and eventually switched back to Emacs. The "you do not have to leave your environment" is actually quite nice. magit and org-mode are awesome. Color scheming is actually easier.

Still having trouble with identation, though. vim is just smarter ...

> Still having trouble with identation, though. vim is just smarter ...

While that is still generally true in my experience, it helps a lot to set c-style indentation to linux-style instead of gnu-style.

From the top of my .emacs:

    (setq c-default-style "linux"
          c-basic-offset)
FWIW, I disable electric-indent globally and use C-j instead of RET which indents after new-line (it's bound to electric-newline-and-maybe-indent, I believe it's the default binding):

C-j runs the command electric-newline-and-maybe-indent (found in global-map), which is an interactive compiled Lisp function in ‘electric.el’.

It is bound to C-j.

(electric-newline-and-maybe-indent)

Insert a newline. If ‘electric-indent-mode’ is enabled, that’s that, but if it is disabled then additionally indent according to major mode. Indentation is done using the value of ‘indent-line-function’. In programming language modes, this is the same as TAB. In some text modes, where TAB inserts a tab, this command indents to the column specified by the function ‘current-left-margin’.