[an error occurred while processing this directive]
NCL Home> Application examples> Miscellaneous || Data files for some examples

Example pages containing: tidbits | resources | functions/procedures

Editor Enhancements

This page contains some handy scripts for customizing various editors to do special highlighting of NCL syntax. They were documented and contributed by other users.

These scripts are not necessarily supported by the NCL team, but we greatly appreciate and encourage these kind of contributions.

If you have an editor enhancement contribution for NCL, please let us know.

ncl.el: emacs

Functionality includes:

Issues that remain

Controlling your emacs window:
Add and modify the following to your .Xdefaults if desired:

    Emacs.geometry:         80x38+250+10
    Emacs*background:       antique white
    Emacs*foreground:       black
    Emacs.pane.menubar.background: peachpuff
    Emacs.menu*.background: peachpuff
    Emacs.cursorColor:      red3
    Emacs.font:             10x20
    Emacs.pane.menubar.font: 10x20
    

Steps

ncl.nedit / ncl2.nedit / ncl3.nedit:Various files for nedit

The following scripts enable NCL syntax highlighting in nedit versions 5.1.0 and higher. The scripts range from a minimalistic approach with few highlighting schemes and few colors, to a more thorough highlighting scheme with many colors. The scripts can be downloaded and, if desired, edited and tested. When ready you can import the file into nedit by typing, for example:

    nedit -import ncl.edit
You will only have to import the file once. Go to "Preferences" and click on "Save Defaults".
ncl.vim / ncl2.vim / ncl.dic : Various files for vim

Steps

The following was donated by Prince K. Xavier [Laboratoire de Meteorologie Dynamique, France].

I experimented a bit with the VIM to include an auto-completion option for NCL commands. I think I have some good news for those who do not want to remember all the commands or consult the website often while writing a script! I find it particularly useful! Here is what you have to do.

  1. save ncl.dic to ~/.vim/dictionary/

    (I took the commands from the ncl syntax file compiled by Arindam Chakraborty. I am not sure how complete this list is, but one can always add entries to this file.)

  2. make the following entries to your .gvimrc

    "Show autocomplete menus.
    set complete-=k complete+=k " Add dictionary search (as per dictionary option)
    set wildmode=list:full
    set wildmenu
    au BufRead,BufNewFile *.ncl set dictionary=~/.vim/dictionary/ncl.dic
    

  3. open your .ncl file and start typing the first letter of the command/resource/function name and press 'control+n' and choose your option.

    Here is a screenshot of my editor that works great!

ncl.sl : JED

This script was contributed by TJ Olney of Western Washington University, for use with John E Davis's JED editor.

JED is a freely available text editor for Unix, VMS, MSDOS, OS/2, BeOS, QNX, and win9X/NT platforms. Although it is a powerful editor designed for use by programmers, its drop-down menu facility make it one of the friendliest text editors around. Hence it is ideal for composing simple email messages as well as editing complex programs in a variety of computer languages.

JED makes extensive use of the S-Lang library, which endows it with a powerful S-Lang macro language. This and other features of the library are discussed on the features page.

To incorporate this syntax in your JED environment, add the lines from the ncl.sl to your "defaults.sl" or "jed.rc" (.jedrc) file. The instructions are also in the file.

[an error occurred while processing this directive]