Coming from Emacs or Vim
imp takes its editing from Vim and its idea from Emacs: the editor is written in its own language, and you can change any of it while it runs. Here's what carries over, and what doesn't.
From Vim
Your hands already know imp. Motions, operators, text objects,
counts, ., registers, macros, marks, visual mode,
/ search, :s, :g, folds, splits
and buffers all work as in Vim. See Vim.
What's different:
- Configuration is Scheme, not Vimscript.
init.scmtakes the place of.vimrc. The:mapfamily still works, from the command line or with(run-ex! "nnoremap ..."). See Configuring init.scm. - Space is the leader.
SPCopens a menu of everything you can do next, andM-xruns any command by name. See Leader and modes. - Plugins are packages. Git, Org, a file browser, language servers, completion and terminals come built in. Extras are packages; see Packages.
- Some mappings aren't supported:
:omap,:xmap,:smap,:cmapand:tmap, and the<buffer>and<expr>arguments. - No undo by time.
:earlier 10mand:laterdon't exist, and undo history isn't kept after you close a file.
From Emacs
What feels familiar:
- The editor is its own language. Most of imp is
Scheme.
SPC h fshows any function's docs and where it's defined, and you can redefine it on the spot. See Live Scheme and help. - Evaluate as you go. In a Scheme buffer,
SPC e eruns the form at the cursor,SPC e bthe buffer, andSPC e iopens a REPL. - Hooks and advice.
add-hook!andadvice-add!work much like Emacs's. - The packages you'd miss. A Magit-style git
interface (
SPC g g), Org mode with an agenda and capture, and an editable file browser like dired. See Git, Org and File browser. M-x. It lists every command, with its key and what it does.
What's different:
- Scheme, not Elisp. imp can't run Emacs's packages or your Emacs config.
- Vim keys by default. Press
C-zto switch to Emacs state, where keys insert text and Emacs keys edit:C-x C-f,C-x C-s,C-k,C-y,C-sand the rest.C-zswitches back.
To start in Emacs state every time, add this to
init.scm:
(set-option! 'editing-style "emacs")See Emacs state for the keys it has.