1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-07 17:18:02 +00:00

Add Coerce The Current Filetype as a vim til.

This commit is contained in:
jbranchaud
2015-06-06 11:17:02 -05:00
parent 2159b74b03
commit 8404cdead8
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# Coerce The Current Filetype
If Vim doesn't recognize the filetype of the currently edited file, I can
tell Vim what filetype to use. Consider, for instance, that I have a draft
of a markdown file with the name, `documentation.md.draft`. Vim will not
recognize this as a markdown file and will, thus, not apply markdown
syntax highlighting to that file. I can easily tell Vim to treat this as a
markdown file by setting its filetype:
```
:set filetype=markdown
```
Markdown syntax highlighting and other relevant options will now be applied
to the current buffer.
See `:h filetype` for more details.