Skip to content
This repository
tag: RELEASE_0_4_11
Fetching contributors…

Cannot retrieve contributors at this time

file 92 lines (60 sloc) 2.969 kb

editor/README.pod - Productivity Comes in Pretty Colors

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 make help

There are several files here, all with the .vim extension. pir.vim (generated from pir.vim.in), pasm.vim, and pmc.vim are syntax files; indent_pir.vim is an indent plugin; and filetype_parrot.vim is a filetype script that tells vim to associate the extensions .pir, .imc, .imcc, .pasm, and .pmc with the right syntax. The syntax files should be installed to ~/.vim/syntax/; filetype_parrot.vim should be installed to ~/.vim/ftdetect; indent_pir.vim should be called ~/.vim/indent/pir.vim. make vim-install in the editor/ dir will do this automatically. If you want indenting, you should also place filetype indent on somewhere in your vimrc.

There is a syntax file for the KDE editor Kate, but it is not built by default. Run:

   make imc.kate

in editor/ to build it.

TODO: How do we install Kate syntax files?

  • Editing the Parrot VM source

    In this directory is a parrot.el describing the c-mode and cperl-mode changes modifications required to edit the Parrot source code. To install the Parrot mode support copy parrot.el to a directory where Emacs looks for external packages and add the following to your ~/.emacs file:

        (load "parrot")

    Alternatively, if you're an active Parrot developer, you may wish to add this to your .emacs instead, to automatically track future changes:

        (load-file "/<path-to-parrot>/editor/parrot.el")
  • Editing PASM source files

    Included here is an Emacs mode for editing pasm files, in pasm.el.

    To install the pasm major mode copy pasm.el to a directory where Emacs looks for external packages and add the following to your ~/.emacs file:

        (load "pasm")

    To automatically associate .pasm files with this major mode add:

        (add-to-list 'auto-mode-alist (cons "\\.pasm\\'" 'pasm-mode))

    to your ~/.emacs or you can alternatively type M-x pasm-mode for every file that you want to use the major mode in.

    Additionally, you might want to add:

        (add-hook 'pasm-mode-hook
                  (function (lambda ()
                              (setq indent-tabs-mode nil))))

    to ~/.emacs as this seems to prevent the odd behavior that is noted when using tabs in the pasm mode.

There is a script here to automatically generate a TAGS file, which works with Vim and other editors that recognize ctags-format files. The tool "exuberant ctags" is required. Run make tags in the parrot root directory to build the tags file.

Something went wrong with that request. Please try again.