From 9d1d188315d421813c653a249bca8478d956758c Mon Sep 17 00:00:00 2001 From: shaoying Date: Sat, 10 Nov 2018 18:11:05 +0800 Subject: [PATCH] try --- etc/dotsfile/.vimrc | 11 ++--------- etc/dotsfile/git_hooks/post-commit | 2 ++ etc/dotsfile/shy.vim | 1 + 3 files changed, 5 insertions(+), 9 deletions(-) create mode 100755 etc/dotsfile/git_hooks/post-commit diff --git a/etc/dotsfile/.vimrc b/etc/dotsfile/.vimrc index 743a2136..45683921 100644 --- a/etc/dotsfile/.vimrc +++ b/etc/dotsfile/.vimrc @@ -166,16 +166,9 @@ endfunction call ColorNext() command! NN call ColorNext() -" function! NCount(filename) -" let l:filename = expand(a:filename) -" call writefile([exists(l:filename) ? 1: readfile(l:filename)[0]+1], l:filename) -" endfunction -" autocmd BufReadPost * call NCount("~/.nread") -" autocmd BufReadPost * call NCount("~/.nwrite") -" - function! BenchCode(cmd, arg) - exe "silent !bench web.code." . a:cmd . " " . join(a:arg, " ") + let l:line = "web.code." . a:cmd . " " . join(a:arg, " ") + exe "silent !bench " l:line endfunction autocmd BufReadPost * call BenchCode("counter", ["nopen", 1]) diff --git a/etc/dotsfile/git_hooks/post-commit b/etc/dotsfile/git_hooks/post-commit new file mode 100755 index 00000000..7ae21a4d --- /dev/null +++ b/etc/dotsfile/git_hooks/post-commit @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +echo $* diff --git a/etc/dotsfile/shy.vim b/etc/dotsfile/shy.vim index be63cf12..8510623a 100644 --- a/etc/dotsfile/shy.vim +++ b/etc/dotsfile/shy.vim @@ -23,6 +23,7 @@ syn match shCommand "\(^\|\t\| \|$(\)command" syn match shStatement "\(^\|\t\| \|$(\)let" syn match shStatement "\(^\|\t\| \|$(\)var" syn match shStatement "\(^\|\t\| \|$(\)return" +syn match shStatement "\(^\|\t\| \|$(\)arguments" syn match shStatement "\(^\|\t\| \|$(\)source" syn match shCommand "\(^\|\t\| \|$(\)alias"