Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Oh, and it can also handle PDFs (with
Word Documents (read-only, with [Antiword](http://www.winfield.demon.nl/)),
and Mac OS X plist files.

If you are more scientifically inclined it also lets you edit
[NetCDF](http://www.opengeospatial.org/standards/netcdf) files in their
CDL form.

Installation
------------

Expand Down
3 changes: 3 additions & 0 deletions doc/afterimage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Word documents have their text extracted (one way) with antiword.

OS X binary plists are converted to/from XML with plutil.

NetCDF files are converted to CDL with ncdump for editing and back to NetCDF
with ncgen

CUSTOMIZATION *afterimage-customization*

The easiest way to provide custom handlers is to learn from the source to the
Expand Down
7 changes: 7 additions & 0 deletions plugin/afterimage.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ augroup afterimage
autocmd BufWriteCmd,FileWriteCmd *.ico call AfterimageWriteCmd("convert %s ico:%s")
endif

" Convert NetCDF files to cdl for editing (http://www.unidata.ucar.edu/software/netcdf/)
if !exists("#BufWriteCmd#*.nc")
autocmd BufReadPre,FileReadPre *.nc setlocal bin
autocmd BufReadPost,FileReadPost *.nc if AfterimageReadPost("ncdump %s >%s") | set ft=c | endif
autocmd BufWriteCmd,FileWriteCmd *.nc call AfterimageWriteCmd("cat %s | ncgen -o %s")
endif

if !exists("#BufWriteCmd#*.pdf")
autocmd BufReadPre,FileReadPre *.pdf setlocal bin
autocmd BufReadPost,FileReadPost *.pdf call AfterimageReadPost("pdftk %s output %s uncompress")
Expand Down