Web lists-archives.com

Re: text editors




Erik Christiansen [2019-03-29 16:26:41+11] wrote:

> It's not. They [Vim extensions] are written in vimscript, analogous to
> elisp.

Vim script is analogous to Emacs Lisp in the point of view that both of
them are used to extend and configure the editor. There is also
important difference which comes from the environment.

Vim is written in the C language which provides the editor interface and
the programming environment for Vim script. Some Vim's features are
written in Vim script language.

Emacs's core is written in the C language but the relation to Emacs Lisp
is different from Vim. Very big part of the editor and the Lisp
environment is written in Emacs Lisp. So Emacs Lisp is not only an
extension language or a scripting language. It's also the
_implementation_ language of the Emacs system itself. This means that
Emacs developers and Emacs users mostly work on the same language and
users can go much deeper into the Emacs core than in Vim's case.

For example, text buffers are first-class Lisp objects in the Emacs
system, just like integers, strings and other usual programming language
objects. Below is an example with "M-x ielm" REPL:

    ELISP> (type-of "foo")
    string
    ELISP> (current-buffer)
    #<buffer *ielm*>
    ELISP> (type-of (current-buffer))
    buffer

-- 
/// Teemu Likonen   - .-..   <https://keybase.io/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

Attachment: signature.asc
Description: PGP signature