Purpose: to discuss the Vim editor. ---- First, you can find Vim at http://www.vim.org/ ---- * Tcl embedded within Vim [http://vimdoc.sourceforge.net/cgi-bin/vim2html2.pl?page=if_tcl.txt] (This link didn't work for me, try [http://vim.sourceforge.net/htmldoc/if_tcl.html]). * [Tags for Vi/ViM editing] * google thread about using Tcl in Vim [http://groups.google.com/groups?th=24332f92a66fdcc9] ---- [MC] 16 Jul 2003: This is probably old news to many, but I finally stumbled upon this little gem only this evening: vim already does syntax highlighting for *.tcl files. For files without an extension, however, adding a comment in your code that says: # vim: syntax=tcl causes vim to do the highlighting properly. [glennj] This magic depends on two settings: (default values) set modeline modelines=5 vim will then look at the top 5 lines and the bottom 5 lines for these special comments. See :help modeline Modelines are handy for "forcing" people to conform to particular vim settings. For example, if you like a 8 space indent using tabs, but you're editing someone else's code who likes 4 space indent and no tabs, you'll want a modeline like (demonstrating the alternate modeline syntax) # vim: set shiftwidth=4 smarttab expandtab: ---- '''Configuring Vim to conform to yhe [Tcl Style Guide]''' indenting set autoindent " keep the previous line's indentation set cindent " indent after line ending in {, and use 'cinwords' " see also ':help c-indent' set shiftwidth=4 do not inadvertantly break a line set textwidth=0 comments set comments=:# set formatoptions+=r " Automatically insert the current comment leader set formatoptions+=q " Allow formatting of comments with 'gq' prevent the comment character from forcibly being inserted in column 1 set cpoptions-=< " allow '' forms in mappings, e.g. inoremap # X# set cinkeys-=0# " # in column 1 does not prevent >> from indenting set indentkeys-=0# ---- What: Vim Where: http://www.vim.org/ http://www.mcs.net/%7Eimdave/ftp/vimconsole-1.2.tgz Description: Vi clone which provides language syntax colorization (including Tcl), command line edit and recall, filename completion, split windows, mouse control, drag and drop, and other features. The vimconsole is a Tclsh shell that interacts with the Tcl support one can build into vim. Currently at version 6.0 . Updated: 09/2001 Contact: mailto:vim@vim.org ---- [Category Application]