This is a VIM helper to edit oldskool PCGen files. It allows you to convert between multi-line object files and tab-based object files and back by pressing and .
- Converts tab-delimited files to multi-line files by pressing
F2
; converts back when pressingF3
; protects against accidental double conversion. - Shows tab characters using special syntax (
»---
). This helps to differentiate between the two classes and helps you spotting inserting accidental spaces where tabs are needed when copying or such. - Shows trailing white-space.
- Writes out tab-delimited files on buffer write, so no more forgetting to convert back.
- Now preserves multible tabs so prettylst.pl prettifying is preserved. This keeps the patches clean.
- Knows to set specific options that are helpful in the two editing modes (autoindent, noexpandtab, etc).
You need Vim compiled with Perl bindings to make this work.
- Use
F2
to convert from single-line object file to multi-line - Use
F3
to convert back - Use
F4
while editing to insertPREABILITY:1,CATEGORY=Special Ability,
.
Install Pathogen.vim:
Then run:
cd ~/.vim/bundle/
git clone https://github.com/pcgen/vim-pcgen.git
- Download the zip using the download link.
- Unpack into your bundle dir.
- Download the zip using the [download link])(https://github.com/pcgen/vim-pcgen/downloads).
- Unpack the zip.
- Alternatively, install ftdetect/pcgen.vim and ftplugin/pcgen.vim into your ftdetect and ftplugin dirs respectively.
2012-10-01
- Move the Perl command execution to in-line code.
2012-09-28
- On buffer write, convert back to tab-based files.
- Keep the spaces that are added by prettylst at the end of lines when converting to multi-line objects. This keeps the diff smaller when converting back to tab-based files on write-out or when converting back using
2012-09-26
- Add protection against converting tab-based files to multi-line multiple times.
- Add distinct options for multi-line mode and tab-based mode. (autoindent in multi-line)
Add options for auto-reverting to tab-based lines on write-out. Add options for keeping multible tabs at the end of the line on reverting to tab-based.