Add a tiny hg syntax file.
author |
Steve Losh <steve@stevelosh.com> |
date |
Sat, 08 Sep 2012 14:06:38 -0400 |
parents |
ad458d7e3e8d
|
children |
fc154fb9ff58
|
branches/tags |
(none) |
files |
clamsyntax/hg.vim clamsyntax/pacman.vim plugin/clam.vim |
Changes
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clamsyntax/hg.vim Sat Sep 08 14:06:38 2012 -0400
@@ -0,0 +1,3 @@
+syn match statusCode "^[MAR?] "
+
+hi def link statusCode Type
--- a/clamsyntax/pacman.vim Sat Sep 08 14:01:49 2012 -0400
+++ b/clamsyntax/pacman.vim Sat Sep 08 14:06:38 2012 -0400
@@ -1,6 +1,5 @@
" pacman program output syntax rules for Clam.vim
-" syn match outputItemLineFirst "\^\S\+/\.\+\>"
syn match packageName "/\S\+\>"
syn keyword packageGroupExtra extra
@@ -14,4 +13,3 @@
hi def link packageGroupMultilib Type
hi def link packageInstalledMark Error
hi def link packageName String
-" hi def link outputItemLineFirst Comment
--- a/plugin/clam.vim Sat Sep 08 14:01:49 2012 -0400
+++ b/plugin/clam.vim Sat Sep 08 14:06:38 2012 -0400
@@ -38,18 +38,18 @@
silent! execute winnr . 'wincmd w'
endif
endfunction " }}}
-function! s:ExtractBareCommanName(fullCommand)
+function! s:ExtractBareCommanName(fullCommand) " {{{
let j = stridx(a:fullCommand, " ")
if j > -1
return a:fullCommand[0:j-1]
endif
return a:fullCommand
-endfunction
-function! s:ApplySyntaxFileForCommand(command)
+endfunction " }}}
+function! s:ApplySyntaxFileForCommand(command) " {{{
let barecommand = s:ExtractBareCommanName(a:command)
let syntaxfile = "clamsyntax/" . barecommand . ".vim"
exe "runtime! " . syntaxfile
-endfunction
+endfunction " }}}
function! s:ConfigureCurrentClamBuffer(command) " {{{
" Set some basic options for the output window.
setlocal buftype=nowrite bufhidden=wipe nobuflisted noswapfile nowrap nonumber