]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime: Set b:undo_indent where missing (#12944)
authordkearns <dougkearns@gmail.com>
Mon, 28 Aug 2023 19:32:59 +0000 (05:32 +1000)
committerGitHub <noreply@github.com>
Mon, 28 Aug 2023 19:32:59 +0000 (21:32 +0200)
Signed-off-by: Christian Brabandt <cb@256bit.org>
18 files changed:
runtime/indent/ch.vim
runtime/indent/dune.vim
runtime/indent/fish.vim
runtime/indent/go.vim
runtime/indent/hare.vim
runtime/indent/jsonc.vim
runtime/indent/julia.vim
runtime/indent/logtalk.vim
runtime/indent/ocaml.vim
runtime/indent/php.vim
runtime/indent/raku.vim
runtime/indent/rst.vim
runtime/indent/rust.vim
runtime/indent/scala.vim
runtime/indent/tex.vim
runtime/indent/typescript.vim
runtime/indent/verilog.vim
runtime/indent/vhdl.vim

index e1bd8a356c2d118fab097ddbd9132b35f7fcaf37..11b1f67790038203d355edbd48217c1841b0ae1d 100644 (file)
@@ -3,6 +3,7 @@
 " Maintainer:  SoftIntegration, Inc. <info@softintegration.com>
 " URL:         http://www.softintegration.com/download/vim/indent/ch.vim
 " Last change: 2006 Apr 30
+"              2023 Aug 28 by Vim Project (undo_indent)
 "              Created based on cpp.vim
 "
 " Ch is a C/C++ interpreter with many high level extensions
@@ -16,3 +17,5 @@ let b:did_indent = 1
 
 " Ch indenting is built-in, thus this is very simple
 setlocal cindent
+
+let b:undo_indent = "setlocal cindent<"
index 0590d66d131076c613d281489f70a943cebc16e9..a9349e4e04f7c7e121582752841f0a1156c0bab5 100644 (file)
@@ -3,6 +3,7 @@
 " Maintainers:  Markus Mottl         <markus.mottl@gmail.com>
 " URL:          https://github.com/ocaml/vim-ocaml
 " Last Change:  2021 Jan 01
+"               2023 Aug 28 by Vim Project (undo_indent)
 
 if exists("b:did_indent")
  finish
@@ -11,3 +12,5 @@ let b:did_indent = 1
 
 " dune format-dune-file uses 1 space to indent
 setlocal softtabstop=1 shiftwidth=1 expandtab
+
+let b:undo_indent = "setl et< sts< sw<"
index 7455287ec0214b3757d2a24f7e975db68f724623..e7678cb7c8e064ac84fc243b14e8b858aac7d1cf 100644 (file)
@@ -3,6 +3,7 @@
 " Maintainer:   Nicholas Boyle (github.com/nickeb96)
 " Repository:   https://github.com/nickeb96/fish.vim
 " Last Change:  February 4, 2023
+"               2023 Aug 28 by Vim Project (undo_indent)
 
 if exists("b:did_indent")
     finish
@@ -12,6 +13,8 @@ let b:did_indent = 1
 setlocal indentexpr=GetFishIndent(v:lnum)
 setlocal indentkeys+==end,=else,=case
 
+let b:undo_indent = "setlocal indentexpr< indentkeys<"
+
 function s:PrevCmdStart(linenum)
     let l:linenum = a:linenum
     " look for the first line that isn't a line continuation
index bf9ff75e6c6ca6eb7efd6016390a13db298f6b9e..a9b1d8d19b9d684d4178dd34f16ba921d4c021bf 100644 (file)
@@ -2,6 +2,7 @@
 " Language:    Go
 " Maintainer:  David Barnett (https://github.com/google/vim-ft-go)
 " Last Change: 2017 Jun 13
+"              2023 Aug 28 by Vim Project (undo_indent)
 "
 " TODO:
 " - function invocations split across lines
@@ -19,6 +20,8 @@ setlocal autoindent
 setlocal indentexpr=GoIndent(v:lnum)
 setlocal indentkeys+=<:>,0=},0=)
 
+let b:undo_indent = "setl ai< inde< indk< lisp<"
+
 if exists('*GoIndent')
   finish
 endif
index bc4fea4e61f012ad888242f04d0f9f9541ede308..0a9d8dafd88c6f780dcc97a79a82fb296fd6d766 100644 (file)
@@ -2,6 +2,7 @@
 " Language: Hare
 " Maintainer: Amelia Clarke <me@rsaihe.dev>
 " Last Change: 2022 Sep 22
+"              2023 Aug 28 by Vim Project (undo_indent)
 
 if exists("b:did_indent")
   finish
@@ -40,6 +41,8 @@ setlocal cinwords=if,else,for,switch,match
 
 setlocal indentexpr=GetHareIndent()
 
+let b:undo_indent = "setl cin< cino< cinw< inde< indk<"
+
 function! FloorCindent(lnum)
   return cindent(a:lnum) / shiftwidth() * shiftwidth()
 endfunction
index bf8e501dd5c6a666128d3ae161fa7d1a9c7bd887..058634a6d2ff9b760609a9da22683bff8e3c8585 100644 (file)
@@ -4,6 +4,7 @@
 " Acknowledgement:  Based off of vim-json maintained by Eli Parra <eli@elzr.com>
 "                   https://github.com/elzr/vim-json
 " Last Change:      2021-07-01
+"                   2023 Aug 28 by Vim Project (undo_indent)
 
 " 0. Initialization {{{1
 " =================
@@ -20,6 +21,8 @@ setlocal nosmartindent
 setlocal indentexpr=GetJSONCIndent()
 setlocal indentkeys=0{,0},0),0[,0],!^F,o,O,e
 
+let b:undo_indent = "setlocal indentexpr< indentkeys< smartindent<"
+
 " Only define the function once.
 if exists("*GetJSONCIndent")
   finish
index 8e4c60322eb0ba17cbd154a6d1647676f4c2f082..36f39f665280a4c490364ab30472bf0235cdd359 100644 (file)
@@ -3,7 +3,8 @@
 " Maintainer:  Carlo Baldassi <carlobaldassi@gmail.com>
 " Homepage:    https://github.com/JuliaEditorSupport/julia-vim
 " Last Change: 2022 Jun 14
-" Notes:        originally based on Bram Molenaar's indent file for vim
+"              2023 Aug 28 by Vim Project (undo_indent)
+" Notes:        originally based on Bram Moolenaar's indent file for vim
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
@@ -21,6 +22,8 @@ setlocal indentkeys-=0{
 setlocal indentkeys-=0}
 setlocal nosmartindent
 
+let b:undo_indent = "setl ai< inde< indk< si<"
+
 " Only define the function once.
 if exists("*GetJuliaIndent")
   finish
index 8e36f8611595bac5c416c6ec56e09c0fe3a47bbe..f7a8b0387ca95c828c93909fba3af28964a0533c 100644 (file)
@@ -1,5 +1,6 @@
 "  Maintainer: Paulo Moura <pmoura@logtalk.org>
 "  Revised on: 2018.08.04
+"              2023 Aug 28 by Vim Project (undo_indent)
 "  Language:   Logtalk
 
 " This Logtalk indent file is a modified version of the Prolog
@@ -16,6 +17,8 @@ setlocal indentexpr=GetLogtalkIndent()
 setlocal indentkeys-=:,0#
 setlocal indentkeys+=0%,-,0;,>,0)
 
+let b:undo_indent = "setlocal indentexpr< indentkeys<"
+
 " Only define the function once.
 if exists("*GetLogtalkIndent")
        finish
index 19c81f49c4b3809f97712f8aaef706a9d494accb..c9beb8be0b379621f1e9726977e36ecd558d150a 100644 (file)
@@ -4,7 +4,8 @@
 "               Mike Leary           <leary@nwlink.com>
 "               Markus Mottl         <markus.mottl@gmail.com>
 " URL:          https://github.com/ocaml/vim-ocaml
-" Last Change:  2017 Jun 13
+" Last Change:  2023 Aug 28 - Add undo_indent (Vim Project)
+"               2017 Jun 13
 "               2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working
 "               2005 May 09 - Added an option to not indent OCaml-indents specially (MM)
 "               2013 June   - commented textwidth (Marc Weber)
@@ -24,6 +25,8 @@ setlocal indentkeys+=0=and,0=class,0=constraint,0=done,0=else,0=end,0=exception,
 setlocal nolisp
 setlocal nosmartindent
 
+let b:undo_indent = "setl et< inde< indk< lisp< si<"
+
 " At least Marc Weber and Markus Mottl do not like this:
 " setlocal textwidth=80
 
index 6b3d70005948b8ba40ae579536814ef0c0f7ed1a..350accaa111df51117ec5c69e7f84790c3df924d 100644 (file)
@@ -4,6 +4,7 @@
 " URL:         https://www.2072productions.com/vim/indent/php.vim
 " Home:                https://github.com/2072/PHP-Indenting-for-VIm
 " Last Change: 2020 Mar 05
+"              2023 Aug 28 by Vim Project (undo_indent)
 " Version:     1.70
 "
 "
@@ -128,7 +129,7 @@ setlocal nolisp
 setlocal indentexpr=GetPhpIndent()
 setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
 
-
+let b:undo_indent = "setl ai< cin< inde< indk< lisp< si<"
 
 let s:searchpairflags = 'bWr'
 
index 3f9b49ec7723a5df15cd3626c0eadd1291a2ee35..753a2b04be6fccd6adb21c342a03c7f11d3acb4d 100644 (file)
@@ -4,6 +4,7 @@
 " Homepage:      https://github.com/vim-perl/vim-perl
 " Bugs/requests: https://github.com/vim-perl/vim-perl/issues
 " Last Change:   2020 Apr 15
+"                2023 Aug 28 by Vim Project (undo_indent)
 " Contributors:  Andy Lester <andy@petdance.com>
 "                Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
 "
@@ -47,6 +48,8 @@ if !b:indent_use_syntax
     setlocal indentkeys+=0=EO
 endif
 
+let b:undo_indent = "setlocal indentexpr< indentkeys<"
+
 let s:cpo_save = &cpo
 set cpo-=C
 
index a31ad8e0809797908d0f188d5e773b12aba9713e..e3c10865a680f90e2d5cb4392d1792f84114be90 100644 (file)
@@ -4,6 +4,7 @@
 " Maintainer: Marshall Ward <marshall.ward@gmail.com>
 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
 " Latest Revision: 2020-03-31
+"                  2023 Aug 28 by Vim Project (undo_indent)
 
 if exists("b:did_indent")
   finish
@@ -14,6 +15,8 @@ setlocal indentexpr=GetRSTIndent()
 setlocal indentkeys=!^F,o,O
 setlocal nosmartindent
 
+let b:undo_indent = "setlocal indentexpr< indentkeys< smartindent<"
+
 if exists("*GetRSTIndent")
   finish
 endif
index 2b544f4a67718fbb1d8219eeb70ae2ae8717798f..b27d93c3a23d654b42dfe92ded2c177ceb14cb66 100644 (file)
@@ -2,6 +2,7 @@
 " Language:         Rust
 " Author:           Chris Morgan <me@chrismorgan.info>
 " Last Change:      2017 Jun 13
+"                   2023 Aug 28 by Vim Project (undo_indent)
 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim
 
 " Only load this indent file when no other was loaded.
@@ -24,6 +25,8 @@ setlocal indentkeys=0{,0},!^F,o,O,0[,0]
 
 setlocal indentexpr=GetRustIndent(v:lnum)
 
+let b:undo_indent = "setlocal cindent< cinoptions< cinkeys< cinwords< lisp< autoindent< indentkeys< indentexpr<"
+
 " Only define the function once.
 if exists("*GetRustIndent")
        finish
index b5eba295430a829bc40865d0a1972259dbe0c2eb..c6aba4e388062ee803adbfd96346d613b417e8c7 100644 (file)
@@ -4,6 +4,7 @@
 " Modifications By:     Derek Wyatt
 " URL:                  https://github.com/derekwyatt/vim-scala
 " Last Change:          2016 Aug 26
+"                       2023 Aug 28 by Vim Project (undo_indent)
 
 if exists("b:did_indent")
   finish
@@ -14,6 +15,8 @@ setlocal autoindent
 setlocal indentexpr=GetScalaIndent()
 setlocal indentkeys=0{,0},0),!^F,<>>,o,O,e,=case,<CR>
 
+let b:undo_indent = "setl ai< inde< indk<"
+
 if exists("*GetScalaIndent")
   finish
 endif
index d356ba905bc14e22759742e3d446059ebec25c36..68d13fb116117ae2256dd3d35ff4b99684dad05d 100644 (file)
@@ -67,7 +67,8 @@
 "               2020/04/26 by Yichao Zhou <broken.zhou AT gmail.com>
 "               (*) Fix a bug related to \[ & \].  Thanks Manuel Boni for
 "               reporting.
-"
+"               2023/08/28 by Vim Project
+"               (*) Set b:undo_indent.
 " }}}
 
 " Document: {{{
@@ -167,6 +168,7 @@ setlocal indentexpr=GetTeXIndent()
 setlocal indentkeys&
 exec 'setlocal indentkeys+=[,(,{,),},],\&' . substitute(g:tex_items, '^\|\(\\|\)', ',=', 'g')
 let g:tex_items = '^\s*' . substitute(g:tex_items, '^\(\^\\s\*\)*', '', '')
+let b:undo_indent = "setlocal autoindent< indentexpr< indentkeys< smartindent<"
 " }}}
 
 function! GetTeXIndent() " {{{
index e899f83d0f3a92bb9a0c13b02235766465158f44..e26750b8aacb122e1cf9868d5b2aad66d8ac8d33 100644 (file)
@@ -2,6 +2,7 @@
 " Language: TypeScript
 " Maintainer: See https://github.com/HerringtonDarkholme/yats.vim
 " Last Change: 2019 Oct 18
+"              2023 Aug 28 by Vim Project (undo_indent)
 " Acknowledgement: Based off of vim-ruby maintained by Nikolai Weibull http://vim-ruby.rubyforge.org
 
 " 0. Initialization {{{1
@@ -20,6 +21,8 @@ setlocal indentexpr=GetTypescriptIndent()
 setlocal formatexpr=Fixedgq(v:lnum,v:count)
 setlocal indentkeys=0{,0},0),0],0\,,!^F,o,O,e
 
+let b:undo_indent = "setlocal formatexpr< indentexpr< indentkeys< smartindent<"
+
 " Only define the function once.
 if exists("*GetTypescriptIndent")
   finish
index e81197c3b41e48a9603555d7843c0315951214d6..377615c34838d755e116df5a4e677f585c538f42 100644 (file)
@@ -1,6 +1,7 @@
 " Language:     Verilog HDL
 " Maintainer:  Chih-Tsun Huang <cthuang@cs.nthu.edu.tw>
 " Last Change: 2017 Aug 25 by Chih-Tsun Huang
+"              2023 Aug 28 by Vim Project (undo_indent)
 " URL:             http://www.cs.nthu.edu.tw/~cthuang/vim/indent/verilog.vim
 "
 " Credits:
@@ -28,6 +29,8 @@ setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify
 setlocal indentkeys+==endconfig,=endgenerate,=endprimitive,=endtable
 setlocal indentkeys+==`else,=`elsif,=`endif
 
+let b:undo_indent = "setlocal indentexpr< indentkeys<"
+
 " Only define the function once.
 if exists("*GetVerilogIndent")
   finish
index ad318066f44d4269cc6ce76fe4a647f65d665c41..b01d1156e9acb66ae8aff920f67d982840f73699 100644 (file)
@@ -3,6 +3,7 @@
 " Maintainer:  Gerald Lai <laigera+vim?gmail.com>
 " Version:     1.62
 " Last Change: 2017 Oct 17
+"              2023 Aug 28 by Vim Project (undo_indent)
 " URL:         http://www.vim.org/scripts/script.php?script_id=1450
 
 " only load this indent file when no other was loaded
@@ -19,6 +20,8 @@ setlocal indentkeys+==~if,=~then,=~elsif,=~else
 setlocal indentkeys+==~case,=~loop,=~for,=~generate,=~record,=~units,=~process,=~block,=~function,=~component,=~procedure
 setlocal indentkeys+==~architecture,=~configuration,=~entity,=~package
 
+let b:undo_indent = "setlocal indentexpr< indentkeys<"
+
 " constants
 " not a comment
 let s:NC = '\%(--.*\)\@<!'