* Christian Brabandt <[email protected]> [2011-09-24 22:06+0200] > Hi Lennart! > > On Sa, 24 Sep 2011, Lennart Andersen wrote: > > > * Christian Brabandt <[email protected]> [2011-09-22 10:13+0200] > > > On Thu, September 22, 2011 8:05 am, Lennart Andersen wrote: > > > > Could some tell me how I get syntax highlight on log files in the > > > > /var/log > > > > dir? Such as > > > > message, syslog, so on files with no extension. > > > > > > It should work out of the box. A simple :syntax on should work. > > > Vim's runtime files contain detection of logfiles below */log/ > > > which should work for most of those files below /var/log/ without > > > problems. But I believe there have been some changes on that matter > > > to the runtime files within the last half year, so you might need > > > to update your runtime files. > > > > I know, but it is not and I do get every other file in color, but not > > files in the "/var/log" directory. It is starting to piss me off! :-) > > > > Well, something must mess it up for you. Try with: > vim -u NONE -U NONE -N -c ':syntax on' /var/log/syslog > > Does that show you colors? It does for me, so the runtime files are > correct and the problem must be your configuration. > > If it doesn't for you, you should really check your vim version and > might want to update your runtime files. > > If it does show you colors, you need to check your config files. > Run vim -u ~/.vimrc --noplugin -N /var/log/syslog > If this does show you colors, the problem is a plugin, if it doesn't > show colors, it must be your configuration. You should then modify your > .vimrc, e.g. by adding a :finish command in the middle of your .vimrc. > > Check again and see if something changed. If you see syntax coloring the > problem must be in the second half of your .vimrc, if you don't see > colors, the problem must be in the first half of your .vimrc file. Add a > :finish command again the the middle of either half and go your way > down, until you find the problematic config option. > > regards, > Christian > > -- > You received this message from the "vim_use" 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
I got it, I add this the the filetype.vim file...... au BufNewFile,BufRead /var/log/syslog,/var/log/syslog.*[0-9] setf messages I did have in there before but the setf was "syslog" :-( after I changed the "setf" to messages, all good. -- Lennart Andersen St Thomas, Ontario http://www.lennartandersen.com lennartka at rogers dot com gdane0871 at gmail dot com ---------------------------- - Debian - apt-get into it -- You received this message from the "vim_use" 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
