vi/Vim Mapfile Syntax File Instructions
| Author: | Andreas Hirner |
|---|---|
| Contact: | andreas.hirner(at)dlr.de |
| Last Updated: | 2005/12/21 |
1 General remarks
vi (vim) resides in: /usr/share/vim/current (vim_root).
Syntax definitions are in vim_root/syntax/*.vim files. Linking file types to extensions is done in vim_root/ftdetect/*.vim. (The the star denotes the extension and would be replaced with map to define highlighting of Mapserver config files).
2 Installation
The installation process requires two steps:
Copy the map.vim syntax file to the syntax directory
Copy map.vim to the vim syntax directory (on Suse: /usr/share/vim/current/syntax)
Register the syntax file in the custom filetype directory
If absent, create a new directory called ftdetect in vim_root (on Suse Linux: /usr/share/vim/current). Create a new file called map.vim in ftdetect according to the example shown below:
" Mapserver config file au BufNewFile,BufRead *.map setf map
Now restart vim and open a map file ....
3 Closing Remarks
The keywords are based on the TextPad Symbol Map_40.syn file contributed by Christopher Thorne, which can also be found on the Mapserver utility page. I hope the file is somehow useful to anybody out there. If there are any questions or suggestions, please feel free to contact me.
This How-to applies to: Any version.
Vim for Mapserver map files syntax
Thanks for the effort to put together this syntax file for VIM. However, instinctively, I searched www.vim.org (Scripts section) for this. Apparently it is not to be found there (search came up empty). Naturally, it would be great to have a copy on www.vim.org. Just a thought.