【已解决】请教:Vim 显示 法语 字母难看

Vim、Emacs配置和使用
头像
shellex
帖子: 2180
注册时间: 2007-02-18 19:33
系统: OSX
来自: lyric.im
联系:

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

#16

帖子 shellex » 2009-06-06 19:50

roylez 写了:恩,不用vimperator食指会断的。
是呢。
既然你诚心诚意地问了
我就大慈大悲地告诉你
为了防止世界被破坏
为了维护世界的和平
贯彻爱与真实的罪恶
可爱而又迷人的反派角色
武藏,小次郎
我们是穿越银河的火箭队,白洞白色的明天在等着我们。就是这样!!喵~~
sarrow
帖子: 403
注册时间: 2007-10-27 1:04

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

#17

帖子 sarrow » 2009-06-06 20:10

恩,不用vimperator食指会断的。
请问这位仁兄,翻页到底/到头的时候,如何让屏幕不闪?

Vimperator 用起来还是不如vim方便,哎。
头像
shellex
帖子: 2180
注册时间: 2007-02-18 19:33
系统: OSX
来自: lyric.im
联系:

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

#18

帖子 shellex » 2009-06-06 20:14

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

Vimperator 用起来还是不如vim方便,哎。
我的...不闪。你的...也许是显卡问题
既然你诚心诚意地问了
我就大慈大悲地告诉你
为了防止世界被破坏
为了维护世界的和平
贯彻爱与真实的罪恶
可爱而又迷人的反派角色
武藏,小次郎
我们是穿越银河的火箭队,白洞白色的明天在等着我们。就是这样!!喵~~
头像
roylez
帖子: 1928
注册时间: 2005-10-04 10:59
来自: 上海

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

#19

帖子 roylez » 2009-06-06 20:26

代码: 全选

set novisualbell
弄个dropbox空间来备份文件或者做私人代码服务器
配置:[url]git://github.com/roylez/dotfiles.git[/url]
主页:http://roylez.heroku.com
各种稀奇玩意儿:http://dooloo.info
头像
nickleeh
帖子: 130
注册时间: 2008-08-06 13:24

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

#20

帖子 nickleeh » 2009-06-06 22:01

终于解决了,原来是这个:

代码: 全选

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).
头像
lilydjwg
论坛版主
帖子: 4258
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

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

#21

帖子 lilydjwg » 2009-06-07 0:32

nickleeh 写了: 太感谢 lilydjwg 和 roylez 了。
不用感谢我了。得感谢 xbeta(http://xbeta.info),不然我也不会知道还有这样的选项。
不过,ambw设置成single后,会有些中文标点显示不正常的。
头像
nickleeh
帖子: 130
注册时间: 2008-08-06 13:24

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

#22

帖子 nickleeh » 2009-06-09 9:47

roylez 写了:图片

请教roylez:

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

( Previous sentence
) Next sentence

请问有什么办法吗?
头像
roylez
帖子: 1928
注册时间: 2005-10-04 10:59
来自: 上海

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

#23

帖子 roylez » 2009-06-09 9:59

nickleeh 写了:
roylez 写了:图片

请教roylez:

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

( Previous sentence
) Next sentence

请问有什么办法吗?
这两个我基本不用呢。帮不上你。
弄个dropbox空间来备份文件或者做私人代码服务器
配置:[url]git://github.com/roylez/dotfiles.git[/url]
主页:http://roylez.heroku.com
各种稀奇玩意儿:http://dooloo.info
头像
lilydjwg
论坛版主
帖子: 4258
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

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

#24

帖子 lilydjwg » 2009-06-09 19:25

nickleeh 写了:
roylez 写了:图片

请教roylez:

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

( Previous sentence
) Next sentence

请问有什么办法吗?
我也基本不用这两个。可以用b和e代替,因为它们(貌似)认识中文标点。
或者,有兴趣的话可以自己写个script搞定。
头像
nickleeh
帖子: 130
注册时间: 2008-08-06 13:24

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

#25

帖子 nickleeh » 2009-06-09 23:42

lilydjwg 写了:
nickleeh 写了:
roylez 写了:图片

请教roylez:

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

( Previous sentence
) Next sentence

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

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

代码: 全选

nmap ( ?[。?!.?!]<CR>
不过这样标点符号就被高亮显示了。不过没关系,不求完美,因为有相对来说比较好的方案:你说的用b和e真的提醒了我。w,b,e 这种移动已经可以满足中文移动了!十分感谢!
头像
lilydjwg
论坛版主
帖子: 4258
注册时间: 2009-04-11 23:46
系统: Arch Linux
联系:

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

#26

帖子 lilydjwg » 2009-06-10 2:13

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

代码: 全选

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

代码: 全选

:nohls<CR>
完整的也就是

代码: 全选

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