[OpenWrt-Devel] Convincing vim on Fedora to highlight 'bad' whitespace
Daniel Dickinson
openwrt at daniel.thecshore.com
Sun Jan 10 10:01:51 EST 2016
Hi all,
While not strictly an OpenWrt topic, in the interests of helping other
with the style guidelines, here's a snipped for your $HOME/.vimrc
The following is mostly from John Crispin, with one additional regex
(for lines beginning with any number of sets of 8 spaces prior to
non-whitespace text).
Also note that on Fedora vim-minimal is install by default as vi. If
you do not set up and alias or similar, when you type vi you get
vim-minimal (which doesn't have the required functionality) instead of
vim-enhanced (assuming you've installed it), for which you must use the
command vim.
[below here goes in $HOME/.vimrc]
highlight link localWhitespaceError Error
highlight link localWhitespaceError Error
autocmd Syntax * syn match localWhitespaceError /\( \{8\}\)\+\ze[^\s]/
display
autocmd Syntax * syn match localWhitespaceError /\(\zs\%#\|\s\)\+$/ display
autocmd Syntax * syn match localWhitespaceError / \ze\t/ display
[above here goes in $HOME/.vimrc]
Regards,
Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list