1" reStructuredText filetype plugin file
2" Language: reStructuredText documentation format
3" Maintainer: Marshall Ward <marshall.ward@gmail.com>
4" Original Maintainer: Nikolai Weibull <now@bitwi.se>
5" Website: https://github.com/marshallward/vim-restructuredtext
6" Latest Revision: 2020-03-31
7" 2025 Oct 13 by Vim project: update b:undo_ftplugin #18566
8" 2026 Jan 11 by Vim project: set suffixesadd #19149
9
10if exists("b:did_ftplugin")
11 finish
12endif
13let b:did_ftplugin = 1
14
15let s:cpo_save = &cpo
16set cpo&vim
17
18"Disable folding
19if !exists('g:rst_fold_enabled')
20 let g:rst_fold_enabled = 0
21endif
22
23let b:undo_ftplugin = "setlocal comments< commentstring< expandtab< formatoptions< suffixesadd<"
24
25setlocal comments=fb:.. commentstring=..\ %s expandtab
26setlocal formatoptions+=tcroql
27setlocal suffixesadd=.rst
28
29" reStructuredText standard recommends that tabs be expanded to 8 spaces
30" The choice of 3-space indentation is to provide slightly better support for
31" directives (..) and ordered lists (1.), although it can cause problems for
32" many other cases.
33"
…lines 34–53 unchanged (20 lines)