annotate runtime/indent.vim @ 20625:116c7bd5e980 v8.2.0866

patch 8.2.0866: not enough tests for buffer writing Commit: https://github.com/vim/vim/commit/494e9069cb32620f7688a7cb128a3feff827639e Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 31 21:28:02 2020 +0200 patch 8.2.0866: not enough tests for buffer writing Problem: Not enough tests for buffer writing. Solution: Add more tests. Use CheckRunVimInTerminal in more places. (Yegappan Lakshmanan, closes #6167)
author Bram Moolenaar <Bram@vim.org>
date Sun, 31 May 2020 21:30:03 +0200
parents 19ef2bbf569c
children f37561549ec2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim support file to switch on loading indent files for file types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
1549
19ef2bbf569c updated for version 7.1-263
vimboss
parents: 233
diff changeset
4 " Last Change: 2008 Feb 22
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 if exists("did_indent_on")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 let did_indent_on = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 augroup filetypeindent
233
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
12 au FileType * call s:LoadIndent()
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
13 func! s:LoadIndent()
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
14 if exists("b:undo_indent")
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
15 exe b:undo_indent
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
16 unlet! b:undo_indent b:did_indent
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
17 endif
1549
19ef2bbf569c updated for version 7.1-263
vimboss
parents: 233
diff changeset
18 let s = expand("<amatch>")
19ef2bbf569c updated for version 7.1-263
vimboss
parents: 233
diff changeset
19 if s != ""
233
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
20 if exists("b:did_indent")
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
21 unlet b:did_indent
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
22 endif
1549
19ef2bbf569c updated for version 7.1-263
vimboss
parents: 233
diff changeset
23
19ef2bbf569c updated for version 7.1-263
vimboss
parents: 233
diff changeset
24 " When there is a dot it is used to separate filetype names. Thus for
19ef2bbf569c updated for version 7.1-263
vimboss
parents: 233
diff changeset
25 " "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim".
19ef2bbf569c updated for version 7.1-263
vimboss
parents: 233
diff changeset
26 for name in split(s, '\.')
19ef2bbf569c updated for version 7.1-263
vimboss
parents: 233
diff changeset
27 exe 'runtime! indent/' . name . '.vim'
19ef2bbf569c updated for version 7.1-263
vimboss
parents: 233
diff changeset
28 endfor
233
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
29 endif
fca8a9b65afa updated for version 7.0065
vimboss
parents: 7
diff changeset
30 endfunc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 augroup END