annotate runtime/ftplugin/rst.vim @ 18540:f7bb0e413fe1 v8.1.2264

patch 8.1.2264: there are two test files for :let Commit: https://github.com/vim/vim/commit/fcf8a8743bdecc0ba28037b79b7cb2962de70b1d Author: Bram Moolenaar <Bram@vim.org> Date: Wed Nov 6 15:22:00 2019 +0100 patch 8.1.2264: there are two test files for :let Problem: There are two test files for :let. Solution: Merge the two files.
author Bram Moolenaar <Bram@vim.org>
date Wed, 06 Nov 2019 15:30:04 +0100
parents 314694a2e74a
children 1908e92b02fd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
1 " reStructuredText filetype plugin file
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
2 " Language: reStructuredText documentation format
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
3 " Maintainer: Marshall Ward <marshall.ward@gmail.com>
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
4 " Original Maintainer: Nikolai Weibull <now@bitwi.se>
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
5 " Website: https://github.com/marshallward/vim-restructuredtext
15334
9d3d7b0f4861 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
6 " Latest Revision: 2018-12-29
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if exists("b:did_ftplugin")
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
9 finish
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 839
diff changeset
13 let s:cpo_save = &cpo
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 839
diff changeset
14 set cpo&vim
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 839
diff changeset
15
15334
9d3d7b0f4861 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
16 "Disable folding
9d3d7b0f4861 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
17 if !exists('g:rst_fold_enabled')
9d3d7b0f4861 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
18 let g:rst_fold_enabled = 0
9d3d7b0f4861 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
19 endif
9d3d7b0f4861 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
20
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents: 375
diff changeset
21 let b:undo_ftplugin = "setl com< cms< et< fo<"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
23 setlocal comments=fb:.. commentstring=..\ %s expandtab
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents: 375
diff changeset
24 setlocal formatoptions+=tcroql
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 839
diff changeset
25
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
26 " reStructuredText standard recommends that tabs be expanded to 8 spaces
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
27 " The choice of 3-space indentation is to provide slightly better support for
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
28 " directives (..) and ordered lists (1.), although it can cause problems for
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
29 " many other cases.
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
30 "
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
31 " More sophisticated indentation rules should be revisted in the future.
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
32
15878
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15334
diff changeset
33 if exists("g:rst_style") && g:rst_style != 0
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
34 setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
35 endif
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
36
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
37 if has('patch-7.3.867') " Introduced the TextChanged event.
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
38 setlocal foldmethod=expr
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
39 setlocal foldexpr=RstFold#GetRstFold()
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
40 setlocal foldtext=RstFold#GetRstFoldText()
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
41 augroup RstFold
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
42 autocmd TextChanged,InsertLeave <buffer> unlet! b:RstFoldCache
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
43 augroup END
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
44 endif
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
45
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 839
diff changeset
46 let &cpo = s:cpo_save
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 839
diff changeset
47 unlet s:cpo_save