I just discovered a great tool that allows me to format my javascript code. I want that tool available for just javascript -- when I switch to a scratch buffer, I want default formatting for text. Unfortunately, formatprg is global. When looking through some of the plugin code in the main vim repository, I see people trying to setlocal on it. Why can't we have setlocal on formatprg?
I also see formatexpr, which can be local, but its behavior is very different and harder for me to just drop in a program that behaves the same for gq_, gqap, etc... In other words, I have to learn how to use vimscript to set this up. setlocal formatexpr=setline(v:lnum,systemlist('myprog',getline(v:lnum,v:count))) is close, but not. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.