<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Parrot - Productivity Comes in Pretty Colors</title> <link rel="stylesheet" type="text/css" href="../../resources/parrot.css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="wrapper"> <div id="header"> <a href="http://www.parrot.org"> <img border=0 src="../../resources/parrot_logo.png" id="logo" alt="parrot"> </a> </div> <!-- "header" --> <div id="divider"></div> <div id="mainbody"> <div id="breadcrumb"> <a href="../../html/index.html">Home</a> » Productivity Comes in Pretty Colors </div> <h1><a name="NAME" >NAME</a></h1> <p>editor/README.pod - Productivity Comes in Pretty Colors</p> <h1><a name="Syntax_Highlighting_and_Other_Editor_Assistance" >Syntax Highlighting and Other Editor Assistance</a></h1> <p>Included in this directory are some add-ins for making working on parrot (or in parrot) easier, for various popular editors. Mostly that means syntax-highlighting and automatic indenting. Read on to see what's available for your favorite editor. For a summary on what is available do cd editor && make help</p> <h2><a name="Vim" >Vim</a></h2> <p>By default calling <code>make vim-install</code> in the <em>editor/</em> directory will install several files in <em>~/.vim</em>. You can use the variable <code>VIM_DIR</code> on the command line by calling <code>make</code> to choose a different target directory for the vim files.</p> <pre> make vim-install [VIM_DIR=/vim_files_target_directory]</pre> <p>All these files have the <em>.vim</em> extension. <em>pir.vim</em> (generated from <em>pir_vim.in</em>), <em>pasm.vim</em>, and <em>pmc.vim</em> are syntax files; <em>indent_pir.vim</em> is an indent plugin; and <em>filetype_parrot.vim</em> is a filetype script that tells vim to associate the extensions .pir, .pasm, and .pmc with the right syntax. The syntax files are installed to <em>~/.vim/syntax/</em>; <em>filetype_parrot.vim</em> is installed to <em>~/.vim/parrot.vim</em>; <em>indent_pir.vim</em> is copied to <em>~/.vim/indent/pir.vim</em>. If you want indenting, you should also place <code>filetype indent on</code> somewhere in your <em>~/.vimrc</em>.</p> <h2><a name="Kate" >Kate</a></h2> <p>There is a syntax file for the KDE editor Kate, but it is not built by default. Run:</p> <pre> make imc.kate</pre> <p>in <em>editor/</em> to build it.</p> <p>Copy the file <em>imcc.xml</em> to <em>~/.kde/share/apps/katepart/syntax</em>.</p> <h2><a name="Emacs" >Emacs</a></h2> <ul> <li>Editing the Parrot VM source</li> <p>In this directory is a <em>parrot.el</em> describing the c-mode and cperl-mode changes modifications required to edit the Parrot source code. To install the Parrot mode support copy <em>parrot.el</em> to a directory where Emacs looks for external packages and add the following to your <em>~/.emacs</em> file:</p> <pre> (load "parrot")</pre> <p>Alternatively, if you're an active Parrot developer, you may wish to add this to your .emacs instead, to automatically track future changes:</p> <pre> (load-file "/<path-to-parrot>/editor/parrot.el")</pre> <li>Editing PASM source files</li> <p>Included here is an Emacs mode for editing pasm files, in <em>pasm.el</em>.</p> <p>To install the pasm major mode copy <em>pasm.el</em> to a directory where Emacs looks for external packages and add the following to your <em>~/.emacs</em> file:</p> <pre> (load "pasm")</pre> <p>To automatically associate .pasm files with this major mode add:</p> <pre> (add-to-list 'auto-mode-alist (cons "\\.pasm\\'" 'pasm-mode))</pre> <p>to your <em>~/.emacs</em> or you can alternatively type <code>M-x pasm-mode</code> for every file that you want to use the major mode in.</p> <p>Additionally, you might want to add:</p> <pre> (add-hook 'pasm-mode-hook (function (lambda () (setq indent-tabs-mode nil))))</pre> <p>to <em>~/.emacs</em> as this seems to prevent the odd behavior that is noted when using tabs in the pasm mode.</p> </ul> <h2><a name="TAGS_file" >TAGS file</a></h2> <p>There is a script here to automatically generate a TAGS file, which works with Vim and other editors that recognize ctags-format files. Run</p> <pre> make tags-vi</pre> <p>for Vim-compatible tags or</p> <pre> make tags-emacs</pre> <p>for Emacs-style tags. The tool "exuberant ctags" is required for both. There is also the</p> <pre> make tags-xemacs</pre> <p>target which will work with older XEmacs etags (21.5*).</p> </div> <!-- "mainbody" --> <div id="divider"></div> <div id="footer"> Copyright © 2002-2011, Parrot Foundation. </div> </div> <!-- "wrapper" --> </body> </html>