昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期五, 九月 25, 2009

vim 设置BOM 头

原来如此简单

set fenc=utf-8 bomb

只是在设置FENC 的时候, 后面要加个BOMB, 告诉VIM 要加BOM 头

--
Feng

星期日, 九月 20, 2009

vbs get shell output

Option Explicit

Dim oShell, oExec, sLine

dim url
url = "http://www.tek-tips.com/viewthread.cfm?qid=1520693&page=20"
Set oShell = CreateObject("WScript.Shell")
'Set oExec = oShell.Exec("%COMSPEC% /c md5 ""-d" & url & """")
Set oExec = oShell.Exec("md5 ""-d" & url & """")

Do While oExec.Status = 1
WScript.Sleep 50
Loop

Do Until oExec.StdOut.AtEndOfStream
sLine = oExec.StdOut.ReadLine
Loop
WScript.Echo sLine


--
Feng

MD5 Message Digest Utility

http://www.fourmilab.ch/md5/

support encoding string.

--
Feng

星期六, 九月 12, 2009

东西与物事

东西为什么叫东西?

A:我和她已经各分东西了。
B:哦?那你分到了什么东西?
A:一幢房子,一千万美元,还有一个女儿。

看来,东西,不仅可以是物事,更可以是钱,甚至可以是人。

--
feng
this is a mail posted via mutt+msmstp.
Sat Sep 12 12:58:35 NZST 2009

星期四, 九月 10, 2009

vim silent run

Don't ask me to press any key!!!


:silent !dir & pause
--
Feng

Re: redirect vim command output

...or fixed it...
On 9/10/09, feng <fengnz@gmail.com> wrote:
> :redir > log.txt
> :ls
> :redir end
> :e log.txt
> --
>
> Feng
>


--
Feng

redirect vim command output

:redir log.txt
:ls
:redir end
:e log.txt
--
Feng

http header vim syntax

syntax match header /^\p\{-}:.*/ contains=header_name contains=header_value
syntax match header_name /^\p\{-}:/ contained
syntax match header_value /:\@<=.*/ contained
syntax match method /\c^get.*\|^post.*/
syntax match direction /^+++.*/
syntax match status /\c^http.*/

"syntax match num /\d*/ contained

highlight link header_name Statement
highlight link header function
highlight link method include
highlight link direction type
highlight link status lcursor
"highlight link deep_link underlined

--
Feng

星期五, 九月 04, 2009

C# window location

Before setting Form.Location, you have to set the Property StartPostion to Manual.

--
Feng

星期二, 九月 01, 2009

VIM syntax

syntax match wine_name /^[^|]\+/ 
syntax match add_desc /\(^[^|]*|\)\@<=[^|]\+/ contains=num
syntax match vintage /\(^[^|]*|[^|]*|\)\@<=[^|]\+/ 
syntax match bottle_size /\(^[^|]*|[^|]*|[^|]*|\)\@<=[^|]\+/ 
syntax match price /\(^[^|]*|[^|]*|[^|]*|[^|]*|\)\@<=[^|]\+/ 
syntax match deep_link /\(^[^|]*|[^|]*|[^|]*|[^|]*|[^|]*|\)\@<=[^|]\+/ 

syntax match num /\d*/ contained

highlight link wine_name cursor 
highlight link add_desc Statement
highlight link vintage include
highlight link bottle_size function
highlight link price lcursor
highlight link deep_link underlined
存为 dat.vim 放在vimfiles\syntax目录下. 在vimrc里加入 autocmd BufRead *.dat :set ft=dat






--
Feng

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.