Thursday, March 26, 2020

Re: Customize vim for YAML

I got an answer from vi.stackexchange.com:

* I needed filetype on in .vimrc to get it to recognize the filetype.  (Don't think I had that before when it worked!??  And in fact once I had this all working, I deleted the filetype on and it still worked.  Go figger.)
* I needed syntax on in .vimrc to get it to highlight syntax.  (Also don't think I had this before, but I DO need this one.)
* I did NOT need the first autocommand to source ~/.vim/yaml.vim.  Without it, vim sources /usr/share/vim/vim80/syntax/yaml.vim.
* In the remaining autocommand they recommend I use setlocal instead of set, and sts=2 (softtabstop) instead of ts=2 (tabstop).

Works great now!

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/1c9a03d1-5063-44de-85bb-1891aa9f860f%40googlegroups.com.

No comments: