Next: , Previous: Compiling from UNIX source, Up: Installation



2.7 Editing modes

Users of emacs can edit Asymptote code with the mode asy-mode, which is installed and enabled by default in the Debian package.

Fans of vim can customize vim for Asymptote with

 
cp @value{Datadir}/doc/asymptote/examples/asy.vim.gz ~/.vim/syntax/asy.vim.gz
gunzip ~/.vim/syntax/asy.vim.gz

and add the following to their ~/.vimrc file:

augroup filetypedetect
au BufNewFile,BufRead *.asy     setf asy
augroup END
filetype plugin on

If any of these directories or files don't exist, just create them. To set vim up to run the current asymptote script using :make just add to ~/.vim/ftplugin/asy.vim:

setlocal makeprg=asy\ %
setlocal errorformat=%f:\ %l.%c:\ %m