summaryrefslogtreecommitdiff
path: root/runtime/syntax/netrc.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-06-29 22:40:58 +0000
committerBram Moolenaar <Bram@vim.org>2005-06-29 22:40:58 +0000
commit42eeac3552c5a5ea10f24373f76b93633b6c8604 (patch)
tree902f3158470a3e9c53850708cf982c85c6338796 /runtime/syntax/netrc.vim
parent24bbcfe8fe62ea43b1cea86243be4fdc8794140b (diff)
downloadvim-git-42eeac3552c5a5ea10f24373f76b93633b6c8604.tar.gz
updated for version 7.0097v7.0097
Diffstat (limited to 'runtime/syntax/netrc.vim')
-rw-r--r--runtime/syntax/netrc.vim86
1 files changed, 41 insertions, 45 deletions
diff --git a/runtime/syntax/netrc.vim b/runtime/syntax/netrc.vim
index 83940eb9d..9d5d3ae53 100644
--- a/runtime/syntax/netrc.vim
+++ b/runtime/syntax/netrc.vim
@@ -1,55 +1,51 @@
" Vim syntax file
-" Maintainer: Nikolai Weibull <source@pcppopper.org>
-" URL: http://www.pcppopper.org/
-" Latest Revision: 2004-12-16
-" arch-tag: 4f6ecb37-d10c-4eca-add0-77991559414a
-
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
+" Language: netrc(5) configuration file
+" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
+" Latest Revision: 2005-06-27
+
+if exists("b:current_syntax")
finish
endif
-" Keywords
-syn keyword netrcKeyword machine password nextgroup=netrcName skipwhite skipnl
-syn keyword netrcKeyword login nextgroup=netrcName,netrcSpecial skipwhite skipnl
-syn keyword netrcKeyword default
-syn keyword netrcKeyword macdef nextgroup=netrcInit,netrcMacroName skipwhite skipnl
-syn region netrcMacro contained start='.' end='^$'
-
-" Names
-syn match netrcName contained display '\S\+'
-syn match netrcName contained display '"[^\\"]*\(\\.[^\\"]*\)*'
-syn match netrcMacroName contained display '\S\+' nextgroup=netrcMacro skipwhite skipnl
-syn match netrcMacroName contained display '"[^\\"]*\(\\.[^\\"]*\)*' nextgroup=netrcMacro skipwhite skipnl
-
-" Special
-syn keyword netrcSpecial contained anonymous
-syn match netrcInit contained '\<init$' nextgroup=netrcMacro skipwhite skipnl
+let s:cpo_save = &cpo
+set cpo&vim
+
+syn keyword netrcKeyword machine nextgroup=netrcMachine skipwhite skipnl
+syn keyword netrcKeyword login nextgroup=netrcLogin,netrcSpecial
+ \ skipwhite skipnl
+syn keyword netrcKeyword password nextgroup=netrcPassword skipwhite skipnl
+syn keyword netrcKeyword default
+syn keyword netrcKeyword macdef nextgroup=netrcInit,netrcMacroName
+ \ skipwhite skipnl
+syn region netrcMacro contained start='.' end='^$'
+
+syn match netrcMachine contained display '\S\+'
+syn match netrcMachine contained display '"[^\\"]*\(\\.[^\\"]*\)*"'
+syn match netrcLogin contained display '\S\+'
+syn match netrcLogin contained display '"[^\\"]*\(\\.[^\\"]*\)*"'
+syn match netrcPassword contained display '\S\+'
+syn match netrcPassword contained display '"[^\\"]*\(\\.[^\\"]*\)*"'
+syn match netrcMacroName contained display '\S\+' nextgroup=netrcMacro
+ \ skipwhite skipnl
+syn match netrcMacroName contained display '"[^\\"]*\(\\.[^\\"]*\)*"'
+ \ nextgroup=netrcMacro skipwhite skipnl
+
+syn keyword netrcSpecial contained anonymous
+syn match netrcInit contained '\<init$' nextgroup=netrcMacro
+ \ skipwhite skipnl
syn sync fromstart
-" Define the default highlighting.
-" For version 5.7 and earlier: only when not done already
-" For version 5.8 and later: only when an item doesn't have highlighting yet
-if version >= 508 || !exists("did_netrc_syn_inits")
- if version < 508
- let did_netrc_syn_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
-
- HiLink netrcKeyword Keyword
- HiLink netrcMacro PreProc
- HiLink netrcName String
- HiLink netrcMacroName String
- HiLink netrcSpecial Special
- HiLink netrcInit Special
-
- delcommand HiLink
-endif
+hi def link netrcKeyword Keyword
+hi def link netrcMacro PreProc
+hi def link netrcMachine Identifier
+hi def link netrcLogin String
+hi def link netrcPassword String
+hi def link netrcMacroName String
+hi def link netrcSpecial Special
+hi def link netrcInit Special
let b:current_syntax = "netrc"
-" vim: set sts=2 sw=2:
+let &cpo = s:cpo_save
+unlet s:cpo_save