Dear list, I have an update for the sshconfig.vim syntax file, which has been suggested by Tom Ryder.
The output of hg diff is as follows: diff -r 25b3106f17bd runtime/syntax/sshconfig.vim --- a/runtime/syntax/sshconfig.vim Sun Feb 19 18:19:30 2012 +0100 +++ b/runtime/syntax/sshconfig.vim Sun Feb 19 22:20:27 2012 +0000 @@ -4,7 +4,7 @@ " Maintainer: Leonard Ehrenfried <[email protected]> " Modified By: Thilo Six " Originally: 2009-07-09 -" Last Change: 2011 Oct 31 +" Last Change: 2012 Feb 19 " SSH Version: 5.9p1 " @@ -92,7 +92,8 @@ syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>" - +syn match sshconfigHostPort "\(Host \)\@<=.\+" +syn match sshconfigHostPort "\(HostName \)\@<=.\+" " case off syn case ignore I have attached an updated version of the file. Thanks, Leonard On 18 February 2012 15:50, Tom Ryder <[email protected]> wrote: > Hello; > > I have a suggestion for the sshconfig Vim syntax file you maintain. > > Because everything that follows a Host pragma must by definition be > intended as a host, and not necessarily one that actually resolves via DNS > (e.g. it could be an abbreviation for an actual host specified in the > section by a HostName command), both this and the HostName option I think > should always fall into the sshconfigHostPort group. > > Here's a suggested patch if you agree. It uses zero-width lookbehind > assertions. > > --- sshconfig.vim 2012-02-19 03:47:47.000000000 +1300 > +++ sshconfig.fix.vim 2012-02-19 03:47:38.000000000 +1300 > @@ -92,6 +92,8 @@ > syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" > syn match sshconfigHostPort > "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" > syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>" > +syn match sshconfigHostPort "\(Host \)\@<=.\+" > +syn match sshconfigHostPort "\(HostName \)\@<=.\+" > > > " case off > > And an example of a config file stanza for which this fixes the > highlighting for the word "webserver": > > Host webserver webserver.example.com > ProxyCommand ssh proxy.example.com nc %h %p > > --Tom@Sanctum > > -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
sshconfig.vim
Description: Binary data
