blob: a191bb7ee1d7613f7037c5657dd2b8de586bca1f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
## vis-autocmd
This plugin provides a declarative interface for setting vis
options depending on filetype.
It expects a global variable called `settings` to be defined:
```lua
settings = {
markdown = {"expandtab on", "tabwidth 4"}
}
```
In this variable, filetypes are mapped to sets of settings that are
to be executed when a window containing the specified filetype is
opened.
If you want to do more than setting simple options, you can specify a function instead:
```lua
settings = {
bash = function(win)
-- do things for shell scripts
end
}
```
Be sure not to run commands that open another window with the same
filetype, leading to an infinite loop.
|