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.
Asked
Active
Viewed 272 times
1 Answers
3
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.
To install:
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
Error detected while processing BufRead Auto commands for "*.map": E475: Invalid argument: =map, but it looks great so far, any idea about that error message? – Gery Jun 01 '15 at 03:49