神奇,一旦沉下心来,竟然解决了SciTE中文自动换行问题
2011-03-02 09:52
1246 查看
今天早上刚刚决心仔细阅读Scintilla源码,终于沉下心仔细看了一下SciTE的文档。此前,在网上从未找到过解决方案,竟然给自己解决了。原来,只要设置正确,Scintilla(SciTE)中文自动换行问题就能解决。
步骤如下:
1、按照网上有关处理中文的设置进行
(1)打开Global.properties,并将其内容复制到空白的User.properties中,以下操作都是对User.properties进行,以保护Global.properties。
(2)修改“Internationalisation中的配置,配置清单源码如下:
# Internationalisation
# Japanese input code page 932 and ShiftJIS character set 128
code.page=936
character.set=134
output.code.page=936
character.set=134
Unicode
code.page=65001
code.page=936
character.set=134
# Required for Unicode to work on GTK+:
#LC_CTYPE=en_US.UTF-8
if PLAT_GTK
output.code.page=65001
(以上这一步,都是根据网上有关资料,以解决SciTE中文显示和处理的基本问题)
2、解决中文自动换行的问题,修改相应部分为如下内容(注意,这种设置是根据中文写作的纯文字处理用,不是针对程序员):
# Indentation
tabsize=4
indent.size=4
use.tabs=0
indent.auto=1
#indent.automatic=1
#indent.opening=0
#indent.closing=0
tab.indents=1
#backspace.unindents=0
# Wrapping of long lines
wrap=1
wrap.style=2
cache.layout=3
output.wrap=1
output.cache.layout=3
#wrap.visual.flags=3
#wrap.visual.flags.location=3
#wrap.indent.mode=1
#wrap.visual.startindent=4
中文自动换行问题的关键之处在于:cache.layout=3。根据作者提供的文档,涉及到缓冲的范围,设置为3,在修改后会刷新整个文档,内存耗费达到文档的7倍,但同时动态缩进也将加速25倍!进行文字处理,哪怕是万把字的文档,耗费这点内存对于我们来说实在不算什么啊,速度和效果才是关键!!
英文文档如下,不难懂的(可恨我之前一直没沉下心看英文,只顾在网上找中文资料,白白浪费很多时间,气死!!)
There are four levels of caching. 0 is no caching, 1 caches the line that the caret is on, 2 caches the visible page as well as the caret, and 3 caches the whole document. The more that is cached, the greater the amount of memory used, with 3 using large amounts of memory, 7 times the size of the text in the document. However, level 3 dramatically speeds up dynamic wrapping by around 25 times on large source files so is a very good option to use when wrapping is turned on and memory is plentiful.
至此,保存设置,重新启动SciTE即可。
测试了一下,在WindowsXP中,打开一个100多K的纯中文资料,没有任何中文处理的问题了,自动换行非常漂亮!!
爽!!
步骤如下:
1、按照网上有关处理中文的设置进行
(1)打开Global.properties,并将其内容复制到空白的User.properties中,以下操作都是对User.properties进行,以保护Global.properties。
(2)修改“Internationalisation中的配置,配置清单源码如下:
# Internationalisation
# Japanese input code page 932 and ShiftJIS character set 128
code.page=936
character.set=134
output.code.page=936
character.set=134
Unicode
code.page=65001
code.page=936
character.set=134
# Required for Unicode to work on GTK+:
#LC_CTYPE=en_US.UTF-8
if PLAT_GTK
output.code.page=65001
(以上这一步,都是根据网上有关资料,以解决SciTE中文显示和处理的基本问题)
2、解决中文自动换行的问题,修改相应部分为如下内容(注意,这种设置是根据中文写作的纯文字处理用,不是针对程序员):
# Indentation
tabsize=4
indent.size=4
use.tabs=0
indent.auto=1
#indent.automatic=1
#indent.opening=0
#indent.closing=0
tab.indents=1
#backspace.unindents=0
# Wrapping of long lines
wrap=1
wrap.style=2
cache.layout=3
output.wrap=1
output.cache.layout=3
#wrap.visual.flags=3
#wrap.visual.flags.location=3
#wrap.indent.mode=1
#wrap.visual.startindent=4
中文自动换行问题的关键之处在于:cache.layout=3。根据作者提供的文档,涉及到缓冲的范围,设置为3,在修改后会刷新整个文档,内存耗费达到文档的7倍,但同时动态缩进也将加速25倍!进行文字处理,哪怕是万把字的文档,耗费这点内存对于我们来说实在不算什么啊,速度和效果才是关键!!
英文文档如下,不难懂的(可恨我之前一直没沉下心看英文,只顾在网上找中文资料,白白浪费很多时间,气死!!)
There are four levels of caching. 0 is no caching, 1 caches the line that the caret is on, 2 caches the visible page as well as the caret, and 3 caches the whole document. The more that is cached, the greater the amount of memory used, with 3 using large amounts of memory, 7 times the size of the text in the document. However, level 3 dramatically speeds up dynamic wrapping by around 25 times on large source files so is a very good option to use when wrapping is turned on and memory is plentiful.
至此,保存设置,重新启动SciTE即可。
测试了一下,在WindowsXP中,打开一个100多K的纯中文资料,没有任何中文处理的问题了,自动换行非常漂亮!!
爽!!
相关文章推荐
- ios pdf自动换行方法(解决中文乱码问题)
- DevExpress cxSpreadSheet 自动换行时中文乱码问题的解决【转】
- xhtmlrenderer进行HTML转PDF【解决中文、数字、英文过长自动换行问题】
- 解决Atom中文无法自动换行问题
- 彻底解决android中Textview控件文本自动换行问题
- 解决TextView排版自动换行问题
- IE中文字自动换行问题
- 解决eclipse的自动换行问题 【安装wordWrap插件】
- CSS解决无空格太长的字母,数字不会自动换行的问题
- 用百度编辑器发布文章代码/英文字符无法自动换行问题解决方法
- 用序列化解决DOM输出XML文件自动换行问题
- iText+Flying Saucer生成pdf文档,中文不显示和不自动换行问题
- SciTE中解决ROR的中文显示问题
- 如何解决在IE6下不自动换行的问题
- 精彩PuTTY 中文教程(解决乱码、X窗口、自动登陆等问题)
- 使用itext将html生成pdf中文换行问题解决方案2
- CSS解决无空格的字母、数字过长不自动换行的问题
- 解决textview遇到标点自动换行的问题
- 解决表格自动换行问题:让表格宽度根据内容长度自动伸展