Email    LaTeX    Other Bits   Scripts    Vim    Wilkes         Index

Vim-Related Goodies

Vim Resources

(nb. filenames here are preceded with the prefixes “a_”, “ftp_”, “ind_”, “syn_” and “ls_”. These are to avoid namespace clashes on this page, but are not part of the actual filename in the $runtime path. Thus, “a_syn_foo.vim” refers to ~/.vim/after/syntax/foo.vim. )

Filetypes

~/.vim
filetype.vim Nothing remarkable here, but the lines to distinguish Gaussian Log files from various system log files might be useful to someone else.
 

Syntax Highlighting

.vim/syntax
Homegrown syntax-highlighting.
    GaussianCom: for command files used by the Gaussian modeling suite. This file is by J.M.Frost with minimal tweakings on my part.
    GaussianLog: for the output (.log) files produced by the Gaussian modeling suite.
       This file is the work of J.Sonnenberg, with the addition of folding and a bit more highlighting. See also filetype.vim, above.
    comments: for the summary report produced by sendgrades.
    hidebin: hides the non-printable glop of binary files.
    known hosts: for the ssh known-hosts file.
    log files: makes the logs in /var/log a bit more readable.
    periodic files: for the daily.out, weekly.out, and monthly.out files from the periodic cleanup scripts.
    plist files: makes property-list files more readable (to me) than does the normal xml highlighting. See also the binary-plist plugin and the plist indentation script, both below..

.vim/after/syntax
Tweaks to standard syntax-highlighting. Note that parts of some of these files really belong in an ftplugin file.

    • A few additions so that the awk highlighting will also work for states.
    • Lots of other syntax highlighting files:
      calendar    conf    csh    tcsh    html    mail    makefiles    markdown    muttrc    procmailrc    sh/bash    TeX/LaTeX (zip-file)    vim (zip-file)
       

Indentation

.vim/indent

    plist files: Indents the <dict> and <array> constructs of Apple’s plist-files. (See also the syntax and plugin files elsewhere on this page.)
    TeX/LaTeX: As well as the standard indentation, also indents plain-tex conditionals (\if, \else, \ifnum, etc).
     

Generic Plugins

.vim/plugin

    colors: enables syntax-highlighting and tones the default colors down somewhat.
    BinaryPlist: allows binary property lists to be edited — the work of M.Heckscher with some microscopic tweaks on my part. See also the plist syntax highlighting and indentation files above.
    • Lots of key-mappings:
      · spell-check (hunspell)
      · remove trailing whitespace after pasted material
      · show highlghting group under cursor
      · reformat text into a table
      · remove blank lines
      · group text into blocks of three lines   (see ByThrees in “.vim/scripts” below)
      · insert a divider line
      · skip to next paragraph in a quoted portion of an e-mail draft
      [· reformat input from Banner’s “Interact” page, to check semester-grades   (see GradeCheck in “.vim/scripts” below) Obsolete: see newer awk script]

.vim/scripts

    Scripts called by the key-mappings above:       ByThrees     [GradeCheck Obsolete: see newer awk script]
     

File-Type Plugins

.vim/ftplugin

    TeX/LaTeX: Various vim commands for LaTeX files, including
          · automatic insertion of quoted spaces after common abbreviations (eg, “Mr.\  ”),
          · spell-checking with the option of a per-file dictionary,
          · processing through lview.

.vim/after/ftplugin

    html: a few handy shortcuts for editing html files — spelling and go-to-fold.
    sed: an end-run to use allow indenting of sed files by using the awk.vim plugin.
    sh/bash: shortcuts for sh/bash scripts — go to fold, toggle commenting.
    TeX/LaTeX: vim settings, commands, etc. Potential glitches and problem spots when text is pasted in from MSWD are highlighted. Also, a bunch of additions to the vim-latex suite. (see the LaTeX section.)
    vim: a few handy shortcuts for editing .vim resource files.
     

.vim/ftplugin/latex-suite
The vim-LaTeX Suite provides many useful shortcuts and niceties for producing LaTeX documents using vim. Here are a few files that I’ve tweaked to my taste.
(See also the .vim/after/ftplugin section, above.)

    envmacros:   Several trivial changes to the Environment Macros that
       · allow French typesetting. The defaults map <M-i> (ie, “é”) to a command. (Must also set g:Tex_AdvancedMath to false: see the TeX/LaTeX ft-plugin above.)
       · reduce the spacing around figures.
       · default to the \includegraphics command for figures.
    folding:   Manual folding (<<<) will now create a fold within a \section, rather than the other way around.
    templates:   Lots of changes to how template files are read in: allowing for indention in the preamble, allowing a template to include \usepackage{cfr-lm} despite the hyphen in the package name, not ignoring the modeline of a template file,…