Homeexpand-all

12月 14, 2008

我的vim配色-jms

冰封 将文章归档于 vim

先看几张配色效果图吧

c

c

Read the rest of this entry »

11月 16, 2008

vim和emacs的bbs语法高亮

冰封 将文章归档于 emacs, vim

经常会在bbs下载一些文章和集合,不想下载成HTML格式,直接保存纯文本格式,但是这样看起来比较累,特别是看合集,所以自己写了vim和emacs的bbs语法高亮,我一般保存成bbs后缀,这样直接识别加亮。

vim的语法高亮


" Vim syntax file
" Language:    txt
" Maintainer:    Jimmy Wu <frozenthrone88@gmail.com>
" Last Change:    04 Feb 2008

scriptencoding utf-8

" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif

syntax case ignore

syn region BbsQmd start=/\v^--\s*$/ end=/※/me=s-1
syn match BbsHeader "\v^发信人.*$"
syn match BbsHeader "\v^标\s*题.*$"
syn match Bbsheader "\v^发信站.*$"
syn match AuthorExpr  "^【.*】$"
syn match AuthorExpr  "^:.*"
syn match BbsFrom "^\s*※.*$"
syn match BbsQuote "\v^\s*☆[━─]+☆\s*$"
syn match BbsQuote "^.*([^)]*)\s*于\s*([^)]*).*"
syn match BbsQuote "\v^.*在该主题下发言如下:\s*$"
syn match BbsQuote "^—*┤.*├—*"
syn match Bbsquote "\v^\s*标题:●.*$"
syn match BbsVoteTitle /^⊙.*$/

" Define the default highlighting.
hi link BbsHeader      PreProc
hi link BbsQmd         Comment
hi link AuthorExpr     Constant
hi link BbsFrom        Constant
hi link BbsQuote       Type
hi link BbsVoteTitle   PreProc

let b:current_syntax = "bbs"

" vim: ts=8 sw=2

保存成bbs.vim放到vimfiles\syntax\下

Read the rest of this entry »

10月 29, 2008

Learning the vi and Vim Editors 7th Edition

冰封 将文章归档于 vim

Learning the vi and Vim Editors, Seventh Edition (c) by O’Reilly Media,
Inc.

点击下载


The type of the release is: eBook
In the PDF format with ISBN: 059652983X and Pub Date: July 21, 2008
The size of the release is: 02 disks x 2.88mb
And released on: 08/26/2008

Read the rest of this entry »

08月 10, 2008

Vim version 7.2 released

冰封 将文章归档于 vim

出处

Hello Vim users,

Announcing:  Vim (Vi IMproved) version 7.2

This is a minor release of Vim.  In the 15 months since Vim 7.1 many
bugs were fixed and runtime files have been added and updated.  There
are also security improvements, therefore it’s a good idea to upgrade.

The main new feature since 7.1 is floating point support.  You can use
it in the Vim script language to add up a list of amounts, for example.

Once you have installed Vim 7.2 you can find details about the changes
since Vim 7.1 with “:help version-7.2″.

Notes
—–

Read the rest of this entry »

08月 4, 2008

一起来学vim-1

冰封 将文章归档于 vim

vim那是相当的强大,谁用谁知道,不过学习曲线比较陡峭,吓到了无数人,vim的作者本身是一个程序员,所以用vim来写程序那是相当的强,不过对于像我这样的非程序员,平时顶多也就写点xhtml,css,普通文本之类的,vim也给了我很多方便。vim强,到底强在哪里,这里先举一些很简单的例子,和程序有关的先不介绍。看看vim在处理普通文本方面的能力。
例子1
插入行号,比如你想在每一行的行首插入行号,注意不是显示行号,显示的行号并不是文本的一部分,我们需要的是真实的插入行号,那么执行命令
:%s/^/\=line(’.').’ ‘/
这样就在每一行的行首插入行号和一个空格

Read the rest of this entry »

 Page 1 of 1  1