Skip to content

Instantly share code, notes, and snippets.

@dmi3mis
Created August 14, 2020 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmi3mis/7fe10534316e282c8178ddd8ac7f7ae4 to your computer and use it in GitHub Desktop.
Save dmi3mis/7fe10534316e282c8178ddd8ac7f7ae4 to your computer and use it in GitHub Desktop.
vim indentation for yaml files
syntax on
filetype plugin indent on
"Get the 2-space YAML as the default when hit carriage return after the colon
autocmd FileType yaml,yml setlocal ts=2 sts=2 sw=2 expandtab
" Highlight tabs as errors.
" https://vi.stackexchange.com/a/9353/3168
autocmd FileType yaml,yml match Error /\t/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment