Following Notepad++ syntax highlighting support for .mapfiles?, does anyone know a way to automatic indent MAP files? I use VIM but so far I haven't found a way to do this on MAP files. I have found for other file formats, such as JS and HTML, but they don't work with MAP files.
Looks like there's no current indent implementation for map files so you'll most likely have to write your own. However, if you're not already aware mapserver.org provides both syntax coloring and folding vim plugins.
The files were written a while ago, so you may need to tweak it or find a newer one.
mkdir ~/.vim/syntax/ cd ~/.vim/syntax wget http://mapserver.org/_static/map.vim mkdir ~/.vim/fold/ cd ~/.vim/fold wget http://mapserver.org/_static/map_fold.vim
Then you should edit your
.vimrc file to include the following:
syntax enable au BufRead,BufNewFile *.map filetype=map autocmd BufRead *.map source ~/.vim/fold/map_fold.vim