有没有人知道如何使
vim将数学符号的html实体转换成数学角色?
@H_502_65@
你想要Vim所说的“digraphs”:阅读:help digraphs来看看它们是如何被使用的,以及:在图形列表里面定义一些.
例如:
&安培; NE;变得≠
&安培; there4;成为∴
这里是一个带有html实体的符号表
http://barzilai.org/math_sym.htm
使用:Vim的有向图功能.用Unicode的字符编码,
请参阅“:help digraphs”以获得文档
我仍在寻找一个等宽的Unicode字体,所以它完全渲染,但额外的空间,它的工作原理很好.
为了看数学角色UTF-8必须是编码和将显示这些字符的字体.
" set the encoding to be utf-8,requires gVim or a terminal capable of " unicode see ':help Unicode' for details set encoding=utf-8 " requires a font that has characters for the higher uniocode symbols set guifont=MS\ Gothic
我添加到filetype为我自己的自定义扩展名.txtmt设置这个
au BufNewFile,BufRead *.txtmt setf mathdoc
:set ft=mathdoc
图形工作很好,因为下面指定的bignose是如何工作的
在插入模式下:
按控制k,后跟:
∴是S *
≠is!=
Σ是Z
≡is = 3
⇐是< = ⇒is =>
⇔是==
∀是FA
∃是TE
∋是 – )
请参阅:digraphs作为完整列表
*注意,如果你只看到半屏幕值得你的字符编码不是unicode,unicode字符覆盖几个屏幕,键入:set encoding = utf-8切换到utf-8.
摘要:在插入模式下,按Ctrl K(使Vim显示突出显示,等待进一步输入),然后定义两个图形的两个字符. Vim然后替换您使用定义的结果字符键入的内容.例如. Ctrl K,!,=产生’≠’.