mirror of
https://github.com/DingDean/wgsl.vim
synced 2024-09-16 13:34:04 +02:00
define the indent function once
This commit is contained in:
parent
0a43c54160
commit
b3c02ec936
1 changed files with 8 additions and 3 deletions
|
@ -3,14 +3,19 @@ if exists("b:did_indent")
|
|||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal autoindent
|
||||
setlocal nolisp
|
||||
setlocal nosmartindent
|
||||
setlocal indentexpr=WgslIndent(v:lnum)
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*WgslIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! WgslIndent(lnum)
|
||||
if a:lnum == 1
|
||||
return 0
|
||||
|
|
Loading…
Reference in a new issue