Vim is a light and powerful editor. If you are comfortable with Emacs, I recommend using the excellent Emacs mode for Ciao. If you are unsure about Emacs, and VIper, the Vi Package for Emacs Rebels hasn't helped you, there is a fledging Vim mode for Ciao. This page describes the current state and future improvements for this Vim mode.
This extension is maintained by agadani at gmail dot com
The configurations on this page require at least Vim 7.0
You can find the current version of Vim for your platform at http://www.vim.org/download.php
For integrated interpretor support, you will need to compile your vim
with the +python
option and download and install the vimsh utility.
You can download Ciao from the CLIP Lab.
Download ciao-vim.tar.
This tarball contains the files:
~/.vim
. If this isn't the case, change the $VIMDIR environment
variable to your local directory. E.g.:
export VIMDIR="/Applications/Vim.app/Contents/Resources/vim/runtime"Some possible location for your vim local directory, based on operating system:
Unix | ~/.vim |
OS X Fink | /usr/share/vim/vim70 |
OS X Vim.app     | /Applications/Vim.app/Contents/Resources/vim/runtime |
Windows | C:\Program Files\Vim\vimfiles |
If you have modified the following files in your Vim local directory (if you aren't sure, you probably haven't), DO NOT run the installer:
If this isn't the case, simply untar the package and run the provided
shell script. Ciao should be included next time you open an instance of
Vim
Note: If you are using an older verion
of vim, make certain that the line filetype on
is in your
.vimrc
The installer also puts ciao-vimsh.vim in your home directory. You will need this file in the working directory of the Ciao project you are currently editing, so copy it accordingly.
Because Vim does not yet support full integration of the shell, using the
Ciao interpreter within vim is a bit of a hack.
If you've downloaded and installed vimsh as per the directions above, the
following commands in your Vim should give you a vertically split window
with an interpreter:
vertical split let g:vimsh_split_open=0 let g:vimsh_sh_arg="" let g:vimsh_prompt_pty="?- " let g:vimsh_sh="/usr/bin/ciao" source vimsh.vim
Run the following commands for your $VIMDIR:
cp ciao-syntax.vim $VIMDIR/syntax/ciao.vim cp ciao-compiler.vim $VIMDIR/compiler/ciao.vim cp ftplugin_ciao.vim $VIMDIR/ftplugin/ciao.vim cp colorful.vim $VIMDIR/colors/colorful.vim
Modify the following lines in your filetype.vim:
fun! s:FTpl() if exists("g:filetype_pl") exe "setf " . g:filetype_pl else " recognize Ciao or Prolog by specific text in the first non-empty line " require a blank after the '%' because Perl uses "%list" and "%translate" let l = getline(nextnonblank(1)) if l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-' let m = getline(nextnonblank(2)) if m =~ '\Add the following line to synmenu.vim:' setf prolog else setf ciao endif else setf perl endif endif endfun
Add the following line to makemenu.vim:an 50.80.400 &Syntax.C.Ciao :cal SetSyn("ciao")
SynMenu C.Ciao:ciao
lpdoc
integrationLast Modified: 12/08/2006 by agadani at gmail dot com
Table of Contents Home