I found this where I can highlight code if it exceeds a certain width. However, I don't want that for text files (like LaTeX). Thus, I tried (in my .vimrc
):
if (&ft=='python' || &ft!='r')
highlight OverLength ctermbg=red ctermfg=white guibg=#FFD9D9
match OverLength /\%81v.\+/
endif
What am I doing wrong? All code/text is highlighted, even for other types. My LaTeX files are .Rnw
and thus set ft
yields rnoweb
.