diff options
| author | David Briscoe <idbrii@gmail.com> | 2022-05-10 12:36:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-10 21:36:43 +0200 |
| commit | bfd330a271933c3372fcfa8ce052970746c8e9dd (patch) | |
| tree | c43fad2f266e6dfed2907b4d365dfee9f7a9da05 /syntax | |
| parent | 28a6dfbcd96095226bee90985b7f12c5679dbbb6 (diff) | |
| download | vim-glsl-bfd330a271933c3372fcfa8ce052970746c8e9dd.tar.gz vim-glsl-bfd330a271933c3372fcfa8ce052970746c8e9dd.zip | |
Ensure cinoptions is set to a known value (#24)
Fix `set cinoptions=#1` causes incorrect define indenting.
To get correct glsl indentation, we want default 'cinoptions'. It's useful to
`set cinoptions=#1` (to allow most filetypes to use # comments), so we should
ensure we're using a known set of indent options and revert to the default.
The user can still customize cinoptions in ~/.vim/after/indent/glsl.vim.
## Test
```vim
:set cinoptions=#1
:edit test.glsl
gg=G
```
```glsl
// test.glsl
#define PI 4
#define TAU 8 // line gets 1 space indent
float f(float x) {
return x * 2;
}
```
Diffstat (limited to 'syntax')
0 files changed, 0 insertions, 0 deletions
