vim-patch:388a5d4f20b4

Update runtime files
388a5d4f20

Omit vim9.
This commit is contained in:
Jan Edmund Lazo
2021-04-28 01:55:06 -04:00
parent 0185625c04
commit 65821cc1b9
15 changed files with 220 additions and 31 deletions

View File

@@ -0,0 +1,34 @@
" Vim indent file
" Language: ssh config file
" Maintainer: JasonKim <git@jasonk.me>
" Last Change: 2020 May 16
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal autoindent
setlocal indentexpr=GetSshconfigIndent(v:lnum)
setlocal indentkeys=o,O,*<Return>,0=~host\ ,0=~match\ ,0#,!^F
let b:undo_indent = "setlocal autoindent< indentexpr< indentkeys<"
if exists("*GetSshconfigIndent")
finish
endif
function GetSshconfigIndent(lnum)
let sw = shiftwidth()
let prev_lnum = prevnonblank(a:lnum - 1)
let curr_lnum = a:lnum
let prev_line = getline(prev_lnum)
let curr_line = getline(curr_lnum)
if curr_line =~? '^\s*\(host\|match\)\s'
return 0
elseif prev_line =~? '^\s*\(host\|match\)\s'
return sw
else
return indent(prev_lnum)
endif
endfunction

View File

@@ -0,0 +1,53 @@
# vim: set filetype=sshconfig shiftwidth=4 expandtab :
# START_INDENT
Host myhost
User myuser
PasswordAuthentication no
# END_INDENT
# START_INDENT
Host aaa
User bbb
Host ccc
Host ddd
# END_INDENT
# START_INDENT
host aaa
HOST bbb
hoSt ccc
match ddd
MATCH eee
MatCH fff
# END_INDENT
# START_INDENT
Host aaa
User host
PasswordAuthentication no
Host *
User user
PasswordAuthentication no
Host match
User bbb
# END_INDENT
# START_INDENT
Host tab
User myuser
# END_INDENT
# START_INDENT
Host mix
User myuser
# END_INDENT
# START_INDENT
Host aaa
User bbb
Match ccc
User ddd
HostKeyAlgorithms ssh-ed25519
Match eee
# END_INDENT

View File

@@ -0,0 +1,53 @@
# vim: set filetype=sshconfig shiftwidth=4 expandtab :
# START_INDENT
Host myhost
User myuser
PasswordAuthentication no
# END_INDENT
# START_INDENT
Host aaa
User bbb
Host ccc
Host ddd
# END_INDENT
# START_INDENT
host aaa
HOST bbb
hoSt ccc
match ddd
MATCH eee
MatCH fff
# END_INDENT
# START_INDENT
Host aaa
User host
PasswordAuthentication no
Host *
User user
PasswordAuthentication no
Host match
User bbb
# END_INDENT
# START_INDENT
Host tab
User myuser
# END_INDENT
# START_INDENT
Host mix
User myuser
# END_INDENT
# START_INDENT
Host aaa
User bbb
Match ccc
User ddd
HostKeyAlgorithms ssh-ed25519
Match eee
# END_INDENT