Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

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
9if exists("b:did_ftplugin")
10 finish
11endif
12let b:did_ftplugin = 1
13
14let s:cpo_save = &cpo
15set cpo&vim
16
17"Disable folding
18if !exists('g:rst_fold_enabled')
19 let g:rst_fold_enabled = 0
20endif
21
22let b:undo_ftplugin = "setlocal comments< commentstring< expandtab< formatoptions<"
23
24setlocal comments=fb:.. commentstring=..\ %s expandtab
25setlocal formatoptions+=tcroql
26
27" reStructuredText standard recommends that tabs be expanded to 8 spaces
28" The choice of 3-space indentation is to provide slightly better support for
29" directives (..) and ordered lists (1.), although it can cause problems for
30" many other cases.
31"
32" More sophisticated indentation rules should be revisited in the future.
…lines 33–51 unchanged (19 lines)

After

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)

Before

script_file
comment "\" reStructuredText filetype plugin file"
comment "\" Language: reStructuredText documentation format"
comment "\" Maintainer: Marshall Ward <marshall.ward@gmail.com>"
comment "\" Original Maintainer: Nikolai Weibull <now@bitwi.se>"
comment "\" Website: https://github.com/marshallward/vim-restructuredt"...
comment "\" Latest Revision: 2020-03-31"
comment "\" 2025 Oct 13 by Vim project: update b:undo_ftplugin #18566"
if_statement
if "if"
call_expression
identifier "exists"
( "("
string_literal "\"b:did_ftplugin\""
) ")"
body
unknown_builtin_statement
unknown_command_name "finish"
endif "endif"
let_statement
let "let"
scoped_identifier
scope "b:"
identifier "did_ftplugin"
= "="
integer_literal "1"
let_statement
let "let"
scoped_identifier
scope "s:"
identifier "cpo_save"
= "="
option
& "&"
option_name "cpo"
set_statement
set "set"
set_item
default_option
option_name "cpo"
& "&"
vim "vim"
comment "\"Disable folding"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:rst_fold_enabled'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "rst_fold_enabled"
= "="
integer_literal "0"
endif "endif"
let_statement
let "let"
scoped_identifier
scope "b:"
identifier "undo_ftplugin"
= "="
string_literal "\"setlocal comments< commentstring< expandtab< formatoptions<"...
setlocal_statement
setlocal "setlocal"
set_item
option_name "comments"
= "="
set_value "fb:.."
" "
set_item
option_name "commentstring"
= "="
set_value "..\\ %s"
" "
set_item
option_name "expandtab"
setlocal_statement
setlocal "setlocal"
set_item
option_name "formatoptions"
+= "+="
set_value "tcroql"
comment "\" reStructuredText standard recommends that tabs be expanded"...
comment "\" The choice of 3-space indentation is to provide slightly b"...
comment "\" directives (..) and ordered lists (1.), although it can ca"...
comment "\" many other cases."
comment "\""
comment "\" More sophisticated indentation rules should be revisited i"...
if_statement (+43 nodes collapsed)
if_statement (+55 nodes collapsed)
let_statement
let "let"
option
& "&"
option_name "cpo"
= "="
scoped_identifier
scope "s:"
identifier "cpo_save"
unlet_statement
unlet "unlet"
scoped_identifier
scope "s:"
identifier "cpo_save"

After

script_file
comment "\" reStructuredText filetype plugin file"
comment "\" Language: reStructuredText documentation format"
comment "\" Maintainer: Marshall Ward <marshall.ward@gmail.com>"
comment "\" Original Maintainer: Nikolai Weibull <now@bitwi.se>"
comment "\" Website: https://github.com/marshallward/vim-restructuredt"...
comment "\" Latest Revision: 2020-03-31"
comment "\" 2025 Oct 13 by Vim project: update b:undo_ftplugin #18566"
comment "\" 2026 Jan 11 by Vim project: set suffixesadd #19149"
if_statement
if "if"
call_expression
identifier "exists"
( "("
string_literal "\"b:did_ftplugin\""
) ")"
body
unknown_builtin_statement
unknown_command_name "finish"
endif "endif"
let_statement
let "let"
scoped_identifier
scope "b:"
identifier "did_ftplugin"
= "="
integer_literal "1"
let_statement
let "let"
scoped_identifier
scope "s:"
identifier "cpo_save"
= "="
option
& "&"
option_name "cpo"
set_statement
set "set"
set_item
default_option
option_name "cpo"
& "&"
vim "vim"
comment "\"Disable folding"
if_statement
if "if"
unary_operation
! "!"
call_expression
identifier "exists"
( "("
string_literal "'g:rst_fold_enabled'"
) ")"
body
let_statement
let "let"
scoped_identifier
scope "g:"
identifier "rst_fold_enabled"
= "="
integer_literal "0"
endif "endif"
let_statement
let "let"
scoped_identifier
scope "b:"
identifier "undo_ftplugin"
= "="
string_literal "\"setlocal comments< commentstring< expandtab< formatoptions<"...
setlocal_statement
setlocal "setlocal"
set_item
option_name "comments"
= "="
set_value "fb:.."
" "
set_item
option_name "commentstring"
= "="
set_value "..\\ %s"
" "
set_item
option_name "expandtab"
setlocal_statement
setlocal "setlocal"
set_item
option_name "formatoptions"
+= "+="
set_value "tcroql"
setlocal_statement
setlocal "setlocal"
set_item
option_name "suffixesadd"
= "="
set_value ".rst"
comment "\" reStructuredText standard recommends that tabs be expanded"...
comment "\" The choice of 3-space indentation is to provide slightly b"...
comment "\" directives (..) and ordered lists (1.), although it can ca"...
comment "\" many other cases."
comment "\""
comment "\" More sophisticated indentation rules should be revisited i"...
if_statement (+43 nodes collapsed)
if_statement (+55 nodes collapsed)
let_statement
let "let"
option
& "&"
option_name "cpo"
= "="
scoped_identifier
scope "s:"
identifier "cpo_save"
unlet_statement
unlet "unlet"
scoped_identifier
scope "s:"
identifier "cpo_save"