From 7f26998bd488f600bc15099c9ff0d7ea9e4c658f Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Sat, 9 Apr 2016 11:20:59 -0500 Subject: [PATCH] Add Toggling Syntax Highlighting as a vim til --- README.md | 3 ++- vim/toggling-syntax-highlighting.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 vim/toggling-syntax-highlighting.md diff --git a/README.md b/README.md index 754f837..0c74408 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really warrant a full blog post. These are mostly things I learn by pairing with smart people at [Hashrocket](http://hashrocket.com/). -_387 TILs and counting..._ +_388 TILs and counting..._ --- @@ -459,6 +459,7 @@ _387 TILs and counting..._ - [Swapping Split Windows](vim/swapping-split-windows.md) - [Tabs To Spaces](vim/tabs-to-spaces.md) - [The Vim Info File](vim/the-vim-info-file.md) +- [Toggling Syntax Highlighting](vim/toggling-syntax-highlighting.md) - [Unloading A Buffer](vim/unloading-a-buffer.md) - [Use Active Window With BufExplorer](vim/use-active-window-with-bufexplorer.md) - [Verbose Commits With Fugitive](vim/verbose-commits-with-fugitive.md) diff --git a/vim/toggling-syntax-highlighting.md b/vim/toggling-syntax-highlighting.md new file mode 100644 index 0000000..c8ccf99 --- /dev/null +++ b/vim/toggling-syntax-highlighting.md @@ -0,0 +1,19 @@ +# Toggling Syntax Highlighting + +Syntax highlighting in Vim is generally a good thing, but sometimes you need +to turn it off. This can be achieved with the `syntax` command. + +```vim +:syntax off +``` + +When you need that syntax highlighting back again, you can turn it right +back on like so: + +```vim +:syntax on +``` + +See `:h syntax-on` for more details. + +h/t Steve Klabnik