l4mpi
  • Member for 6 years, 11 months
  • Last seen more than a month ago
Disable syntax highlighting depending on file size and type
Accepted answer
15 votes

This comment by derobert led me to the solution: autocmd Filetype xml if getfsize(@%) > 1000000 | setlocal syntax=OFF | endif This seems to reliably disable syntax highlighting in one buffer only....

View answer
How to differentiate visually the white spaces in vim?
5 votes

This can be done with :set list. The Characters displayed for the different whitespace chars can be controlled by :set listchars. See the help topics for detailed information. Here's an example from ...

View answer
How do I delete matching lines in multiple files at once?
3 votes

With the original command, the bar would be interpreted as an argument to :g as described by :help :bar. Per :h :exe... ":execute" can be used to append a command to commands that don't ...

View answer
Periodic W11 "File has changed" warnings when reading file
1 votes

This comment by Matt led me to the solution: creating an autocommand for the FileChangedShell event seems to suppress the warning. I ended up using the following no-op autocommand: autocmd ...

View answer