From 87c1a9155e17d174e00eadca101becb2075db418 Mon Sep 17 00:00:00 2001 From: Cyrus Yip <60951091+CyrusYip@users.noreply.github.com> Date: Sun, 12 Jun 2022 23:02:05 +0800 Subject: [PATCH] docs: Use modeline to set filetype in VIM --- .../docs/user-guide/frequently-asked-questions/design.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/design.md b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/design.md index 0280bb270d3..3bfe692aa5a 100644 --- a/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/design.md +++ b/assets/chezmoi.io/docs/user-guide/frequently-asked-questions/design.md @@ -30,7 +30,10 @@ merge-all` will help you resolve any differences. If you chose to edit files in the source state and you're using VIM then [`github.com/alker0/chezmoi.vim`](https://github.com/alker0/chezmoi.vim) gives -you syntax highlighting, however you edit your files. +you syntax highlighting, however you edit your files. Besides using the +plugin, you can use modeline to tell VIM the correct filetype. For example, +put `# vim: filetype=zsh` at the top of `dot_zshrc`, and VIM will treat +`dot_zshrc` as zsh file. ## Why doesn't chezmoi use symlinks like GNU Stow?