Thanks to visit codestin.com
Credit goes to github.com

Skip to content

aartaka/emvi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Emvi: trying to do Lisp in Vi (not Vim!)

POSIX/BSD vi is extremely primitive—no colors, no language modes, no plugins. But still, using it is a nice exercise in minimalist text editing. That’s what I, as a Lisp programmer, am trying to do, preferably without going insane. This .exrc config file is an attempt to reproduce the functionality of fancy Lisp-friendly systems. Like Emacs and Paredit. In vi.

Getting started

Just copy/symlink the .exrc to your home directory and start vi.

git clone https://github.com/aartaka/emvi
ln -s emvi/.exrc ~/.exrc

Bindings

Here are the (Emacs-inspired) bindings I’ve added:

C-x s
Save changes.
C-x b
Edit the previous/alternate file.
C-x q
Exit.
C-x Q
Exit without saving changes.
C-x e
Edit a new file.
C-x .
Jump to a tag/source. Use ctags-compatible solution (likely Universal Ctags) to generate a tags file for your Lisp codebase and use it to navigate around.
C-x d
Delete s-expression.
C-x y, C-x p, C-x P
Copy s-expression and paste it.
C-x x
Jump to matching paren/bracket/brace.
C-x J, C-x K
Jump to next/previous triple-semicolon section.
C-a (
Add empty parentheses and insert right into them.
C-a [
Same, but for square brackets.
C-a {
Same, but for curly braces.
C-a ”
Same, but for double quotes.
C-x (
Wrap the current symbol into parens (paredit-wrap-round).
C-x [
paredit-wrap-square.
C-x {
paredit-wrap-curly.
C-x ”
paredit-meta-doublequote, but without the internal quoting.
C-x )
Slurping the next symbol into the current parenthesized form.
C-x ]
Same, but for square brackets.
C-x }
Same, but for curly braces.

Thanks

About

Editing Lisp in vi (not Vim!)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published