comparison runtime/indent/tcsh.vim @ 25973:3b34837f4538

Update runtime files Commit: https://github.com/vim/vim/commit/2286304cdbba53ceb52b3ba2ba4a521b0a2f8d0f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 16 15:23:36 2021 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Oct 2021 16:30:07 +0200
parents 9c221ad9634a
children
comparison
equal deleted inserted replaced
25972:3856b7d0d996 25973:3b34837f4538
1 " Vim indent file 1 " Vim indent file
2 " Language: C-shell (tcsh) 2 " Language: C-shell (tcsh)
3 " Maintainer: Doug Kearns <a@b.com> where a=dougkearns, b=gmail 3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
4 " Last Modified: Sun 26 Sep 2021 12:38:38 PM EDT 4 " Previous Maintainer: Gautam Iyer <gi1242+vim@NoSpam.com> where NoSpam=gmail (Original Author)
5 " Last Change: 2021 Oct 15
5 6
6 " Only load this indent file when no other was loaded. 7 " Only load this indent file when no other was loaded.
7 if exists("b:did_indent") 8 if exists("b:did_indent")
8 finish 9 finish
9 endif 10 endif
10 11
11 let b:did_indent = 1 12 let b:did_indent = 1
12 13
13 setlocal indentexpr=TcshGetIndent() 14 setlocal indentexpr=TcshGetIndent()
14 setlocal indentkeys+=e,0=end,0=endsw indentkeys-=0{,0},0),:,0# 15 setlocal indentkeys+=e,0=end
16 setlocal indentkeys-=0{,0},0),:,0#
17
15 let b:undo_indent = "setl inde< indk<" 18 let b:undo_indent = "setl inde< indk<"
16 19
17 " Only define the function once. 20 " Only define the function once.
18 if exists("*TcshGetIndent") 21 if exists("*TcshGetIndent")
19 finish 22 finish
38 41
39 if line =~ '\v^\s*breaksw>' 42 if line =~ '\v^\s*breaksw>'
40 let ind = ind - shiftwidth() 43 let ind = ind - shiftwidth()
41 endif 44 endif
42 45
43 " Subtract indent if current line has on end, endif, case commands 46 " Subtract indent if current line has on end, endif, endsw, case commands
44 let line = getline(v:lnum) 47 let line = getline(v:lnum)
45 if line =~ '\v^\s*%(else|end|endif)\s*$' 48 if line =~ '\v^\s*%(else|end|endif|endsw)\s*$'
46 let ind = ind - shiftwidth() 49 let ind = ind - shiftwidth()
47 endif 50 endif
48 51
49 return ind 52 return ind
50 endfunction 53 endfunction