75 lines
5.5 KiB
HTML
75 lines
5.5 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<title>CLiki: vim</title>
|
||
|
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
|
||
|
href="https://www.cliki.net/site/feed/article.atom?title=vim">
|
||
|
<link rel="stylesheet" href="static/css/style.css">
|
||
|
<link rel="stylesheet" href="static/css/colorize.css">
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<span class="hidden">CLiki - vim</span>
|
||
|
<div id="content"><div id="content-area"><div id="article-title">vim</div><div id="article">The Vi family of editors (with vim probably being the most frequently used implementation) is almost universally "the other editor" to <a href="Emacs.html" class="internal">Emacs</a>. In the Lisp community, however, its use seems rather suppressed due to Emacs's tight connection with Lisp.<p>Still, there are some vim lispers out there. This page should point them to some ways to make life easier.<p>Currently the best solution is <a href="http://www.vim.org/scripts/script.php?script_id=2531">Slimv</a> by Tamas Kovacs, which attempts to do for Vim what SLIME does for Emacs, including a built in REPL, hyperspec lookup and completion, paredit mode, etc. It is implemented as a filetype plugin and relatively easy to get started with.<p>Out of the box, [D and [d should work (find definition/jump to definition), as well as [I and [i, but only in the open bufffers.<p>Some suggestions to vim settings (partly based on articles below). Stuff them to ~/.vim/ftplugin/lisp.vim, and be sure to have :filetype plugin on.
|
||
|
<pre>
|
||
|
setlocal lisp autoindent showmatch cpoptions-=mp
|
||
|
|
||
|
" Possible folding method
|
||
|
setlocal foldmethod=marker foldmarker=(,) foldminlines=1
|
||
|
|
||
|
" This allows gf and :find to work. Fix path to your needs
|
||
|
setlocal suffixesadd=.lisp,cl path=/usr/src/lisp/**
|
||
|
|
||
|
" This allows [d [i [D [I work across files if you have asdf buffer present.
|
||
|
" If I used load, it would be there too.
|
||
|
setlocal include=(:file\
|
||
|
</pre>
|
||
|
Exuberant Ctags (comes with Vim) works quite well with Lisp.<p><h2>Deprecated Tools</h2><p><a href="Limp.html" class="internal">Limp</a> by Mikael Jansson used to be the plugin of choice, but is no longer maintained. It uses scripting and GNU screen to integrate a Lisp session and vim/gvim, and is still useful if Slimv doesn't work for you and you can look past a few quirks.<p>Another recent and noble attempt at getting Vim to talk to slime was
|
||
|
<a href="http://web.archive.org/web/20080516055232/http://wiki.alu.org/Slim-Vim">slim-vim</a>,
|
||
|
which used a vim compiled with <a href="ECL.html" class="internal">ECL</a> to talk to SWANK, just like <a href="SLIME.html" class="internal">SLIME</a>. It has now been abandoned.<p>Previous efforts also include <a href="http://www-users.cs.umn.edu/~gini/lisp/vi-for-lisp.html">Using vi with Lisp</a> text and <a href="https://www.vim.org/scripts/script.php?script_id=221">VILisp.vim</a> utility. There is also <a href="http://www.vim.org/scripts/script.php?script_id=903">fvl.vim</a>.<p>Other things to describe/do:
|
||
|
<ul>
|
||
|
<li>Fix system to recognize asdf files as lisp file (either change filetype.vim, or add autocommands to your vimrc file)
|
||
|
</li>
|
||
|
<li>How make CLHS into file to be used as jump tags (attempt at <a href="https://github.com/mikaelj/limp/blob/master/bin/hypertags/hypertags.py">hypertags.py in the Limp repos</a>).
|
||
|
</li>
|
||
|
</ul>
|
||
|
<hr>
|
||
|
Categories: <a href="development.html" class="category">development</a></div></div>
|
||
|
<div id="footer" class="buttonbar"><ul><li><a href="vim.html">Current version</a></li>
|
||
|
<li><a href="https://www.cliki.net/site/history?article=vim">History</a></li>
|
||
|
<li><a href="https://www.cliki.net/site/backlinks?article=vim">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=vim&from-revision=3770679723">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
|
||
|
</div>
|
||
|
<div id="header-buttons" class="buttonbar">
|
||
|
<ul>
|
||
|
<li><a href="https://www.cliki.net/">Home</a></li>
|
||
|
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
|
||
|
<li><a href="CLiki.html">About</a></li>
|
||
|
<li><a href="Text Formatting.html">Text Formatting</a></li>
|
||
|
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
|
||
|
</ul>
|
||
|
<div id="search">
|
||
|
<form action="https://www.cliki.net/site/search">
|
||
|
<label for="search_query" class="hidden">Search CLiki</label>
|
||
|
<input type="text" name="query" id="search_query" value="" />
|
||
|
<input type="submit" value="search" />
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="pageheader">
|
||
|
<div id="header">
|
||
|
<span id="logo">CLiki</span>
|
||
|
<span id="slogan">the common lisp wiki</span>
|
||
|
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
|
||
|
<label for="login_name" class="hidden">Account name</label>
|
||
|
<input type="text" name="name" id="login_name" class="login_input" />
|
||
|
<label for= "login_password" class="hidden">Password</label>
|
||
|
<input type="password" name="password" id="login_password" class="login_input" />
|
||
|
<input type="submit" name="login" value="login" id="login_submit" /><br />
|
||
|
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
|
||
|
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body></html>
|