分页: 2 / 2

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-06 19:50
shellex
roylez 写了:恩,不用vimperator食指会断的。
是呢。

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-06 20:10
sarrow
恩,不用vimperator食指会断的。
请问这位仁兄,翻页到底/到头的时候,如何让屏幕不闪?

Vimperator 用起来还是不如vim方便,哎。

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-06 20:14
shellex
sarrow 写了:
恩,不用vimperator食指会断的。
请问这位仁兄,翻页到底/到头的时候,如何让屏幕不闪?

Vimperator 用起来还是不如vim方便,哎。
我的...不闪。你的...也许是显卡问题

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-06 20:26
roylez

代码: 全选

set novisualbell

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-06 22:01
nickleeh
终于解决了,原来是这个:

代码: 全选

set ambiwidth=single
太感谢 lilydjwg 和 roylez 了。

下面是关于'ambiwidth'的hlep文件,贴出来以供大家参考:

代码: 全选

						*'ambiwidth'* *'ambw'*
'ambiwidth' 'ambw'	string (default: "single")
			global
			{not in Vi}
			{only available when compiled with the |+multi_byte|
			feature}
	Only effective when 'encoding' is "utf-8" or another Unicode encoding.
	Tells Vim what to do with characters with East Asian Width Class
	Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek
	letters, Cyrillic letters).

	There are currently two possible values:
	"single":	Use the same width as characters in US-ASCII.  This is
			expected by most users.
	"double":	Use twice the width of ASCII characters.

	There are a number of CJK fonts for which the width of glyphs for
	those characters are solely based on how many octets they take in
	legacy/traditional CJK encodings.  In those encodings, Euro,
	Registered sign, Greek/Cyrillic letters are represented by two octets,
	therefore those fonts have "wide" glyphs for them.  This is also
	true of some line drawing characters used to make tables in text
	file.  Therefore, when a CJK font is used for GUI Vim or
	Vim is running inside a terminal (emulators) that uses a CJK font
	(or Vim is run inside an xterm invoked with "-cjkwidth" option.),
	this option should be set to "double" to match the width perceived
	by Vim with the width of glyphs in the font.  Perhaps it also has
	to be set to "double" under CJK Windows 9x/ME or Windows 2k/XP
	when the system locale is set to one of CJK locales.  See Unicode
	Standard Annex #11 (http://www.unicode.org/reports/tr11).

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-07 0:32
lilydjwg
nickleeh 写了: 太感谢 lilydjwg 和 roylez 了。
不用感谢我了。得感谢 xbeta(http://xbeta.info),不然我也不会知道还有这样的选项。
不过,ambw设置成single后,会有些中文标点显示不正常的。

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-09 9:47
nickleeh
roylez 写了:图片

请教roylez:

我又有个问题:Vim不认中文的标点符号【。!?】,也就是说,没有办法用

( Previous sentence
) Next sentence

请问有什么办法吗?

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-09 9:59
roylez
nickleeh 写了:
roylez 写了:图片

请教roylez:

我又有个问题:Vim不认中文的标点符号【。!?】,也就是说,没有办法用

( Previous sentence
) Next sentence

请问有什么办法吗?
这两个我基本不用呢。帮不上你。

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-09 19:25
lilydjwg
nickleeh 写了:
roylez 写了:图片

请教roylez:

我又有个问题:Vim不认中文的标点符号【。!?】,也就是说,没有办法用

( Previous sentence
) Next sentence

请问有什么办法吗?
我也基本不用这两个。可以用b和e代替,因为它们(貌似)认识中文标点。
或者,有兴趣的话可以自己写个script搞定。

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-09 23:42
nickleeh
lilydjwg 写了:
nickleeh 写了:
roylez 写了:图片

请教roylez:

我又有个问题:Vim不认中文的标点符号【。!?】,也就是说,没有办法用

( Previous sentence
) Next sentence

请问有什么办法吗?
我也基本不用这两个。可以用b和e代替,因为它们(貌似)认识中文标点。
或者,有兴趣的话可以自己写个script搞定。

原来把正则表达式放在括号里管用:

代码: 全选

nmap ( ?[。?!.?!]<CR>
不过这样标点符号就被高亮显示了。不过没关系,不求完美,因为有相对来说比较好的方案:你说的用b和e真的提醒了我。w,b,e 这种移动已经可以满足中文移动了!十分感谢!

Re: 请教:Vim 显示 法语 字母难看

发表于 : 2009-06-10 2:13
lilydjwg
nickleeh 写了:原来把正则表达式放在括号里管用:

代码: 全选

nmap ( ?[。?!.?!]<CR>
不过这样标点符号就被高亮显示了。
要不高亮很简单:在最后加个

代码: 全选

:nohls<CR>
完整的也就是

代码: 全选

nmap ( ?[。?!.?!]<CR>:nohls<CR>
就可以把高亮清除(而且不会影响后续的搜索。