]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(rst): set suffixesadd for rst
authorAnakin Childerhose <anakin@childerhose.ca>
Sun, 11 Jan 2026 18:48:13 +0000 (18:48 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 11 Jan 2026 18:50:13 +0000 (18:50 +0000)
Add .rst to suffixesadd. This allows gf and similar commands to work for
rst documentation such as in the linux kernel Documentation.

closes: #19149

Signed-off-by: Anakin Childerhose <anakin@childerhose.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/ftplugin/rst.vim

index 887f64bb4c4f0f811d11f873d92524b7cad606b3..1d31462d7ff793e3abb58971d0a1d36990676f46 100644 (file)
@@ -5,6 +5,7 @@
 " Website: https://github.com/marshallward/vim-restructuredtext
 " Latest Revision: 2020-03-31
 " 2025 Oct 13 by Vim project: update b:undo_ftplugin #18566
+" 2026 Jan 11 by Vim project: set suffixesadd #19149
 
 if exists("b:did_ftplugin")
     finish
@@ -19,10 +20,11 @@ if !exists('g:rst_fold_enabled')
   let g:rst_fold_enabled = 0
 endif
 
-let b:undo_ftplugin = "setlocal comments< commentstring< expandtab< formatoptions<"
+let b:undo_ftplugin = "setlocal comments< commentstring< expandtab< formatoptions< suffixesadd<"
 
 setlocal comments=fb:.. commentstring=..\ %s expandtab
 setlocal formatoptions+=tcroql
+setlocal suffixesadd=.rst
 
 " reStructuredText standard recommends that tabs be expanded to 8 spaces
 " The choice of 3-space indentation is to provide slightly better support for