sciTE设置自动换行
2012-03-09 10:11
323 查看
今天早上刚刚决心仔细阅读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的纯中文资料,没有任何中文处理的问题了,自动换行非常漂亮!!
爽!!
2011-11-2
步骤如下:
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的纯中文资料,没有任何中文处理的问题了,自动换行非常漂亮!!
爽!!
2011-11-2
相关文章推荐
- 如何设置MFC中EditBox为自动换行
- Myeclipse 一行设置显示的字符数(防止格式化自动换行)
- 在Linux系统中设置vim的属性(自动换行、显示行号、高亮度显示、自动缩进)
- 神奇,一旦沉下心来,竟然解决了SciTE中文自动换行问题
- 设置td中的值自动换行
- 英文字符和汉字自动换行和不换行的设置
- VC中EDIT自动换行的设置方法
- [水晶报表]如何设置水晶报表(crystal reports)的字段自动换行
- HBuilder设置代码自动换行的方法
- 设置div中文字超出时自动换行
- Visual Studio 2013英文版 设置大括号不换行 代码长自动换行 显示行号
- css——如何让一段文字自动换行,并且左对齐,设置背景透明
- flex设置DataGrid文本按内容自动换行
- VC中EDIT自动换行的设置方法
- Zend Studio 自动换行设置方法
- [水晶报表]如何设置水晶报表(crystal reports)的字段自动换行
- Ext设置显示的girdz值自动换行
- td 内容自动换行 table表格td设置宽度后文字太多自动换行
- mfc richedit 自动换行设置
- Flex DataGrid设置不同行高度和自动换行