Update spelling inconsistencies

This commit is contained in:
Igor Irianto 2020-12-03 08:52:41 -06:00
parent e0fd3ea38e
commit 41d5db240c

View file

@ -54,11 +54,7 @@ au BufNewFile,BufRead *.chocodonut set filetype=chocodonut
This should look familiar. `BufNewFile` and `BufRead` are triggered whenever you create a new buffer or open a new buffer. `*.chocodonut` means that this event will only be triggered if the opened buffer has a `.chocodonut` filename extension. Finally, `set filetype=chocodonut` command sets the file type to be a chocodonut type.
Restart Vim. Now open `hello.chocodonut` file and run `:set filetype?`. It returns:
```
filetype=chocodonut
```
Restart Vim. Now open `hello.chocodonut` file and run `:set filetype?`. It returns `filetype=chocodonut`
Scrumptious! You can put as many files as you want inside `ftdetect/`. In the future, you can maybe add `ftdetect/strawberrydonut.vim`, `ftdetect/plaindonut.vim`, etc., if you ever decide to expand your donut file types.
@ -130,7 +126,7 @@ if getline(1) =~ '^\\<donutify\\>'
endif
```
The function `did_filetype()` is a Vim built-in function. It will return true when a filetype-related event is triggered at least once. It is used as a guard to stop re-running filetype event.
The function `did_filetype()` is a Vim built-in function. It will return true when a file type related event is triggered at least once. It is used as a guard to stop re-running file type event.
Open the `sugardonut` file and run `:set filetype?`, Vim now returns `filetype=donut`.