UltraEdit支持python语法高亮

http://wangtao.name/2009/12/20/ultraedit_python.html 

在官网上找到python的扩展下载点:

http://www.ultraedit.com/downloads/extras.html

有各种语言的扩展,便可以支持语法高亮。

python 2.5:http://www.ultraedit.com/files/wf/python25.uew

python 2.6&3.0:http://www.ultraedit.com/files/wf/python26.uew

下载后安装方法如下:

将下载的uew文件复制在“文档的完整目录名称:”中的文件夹里。如下图:

如果这样做了,但在“语言选择”却没有找到新加的语言。就可能是新下载的uew文件的问题了。

我们用UltraEdit打开uew文件。如“python25.uew”,在第一行你会看到这一句:

/L14″Python” PYTHON_LANG Line Comment = # Escape Char = \ String Literal Prefix = r File Extensions = PY PYW

其中开头的”/L14″就是语言在UltraEdit的语言列表号,可能被其它语言占用了,打开C:\Users\Administrator\AppData\Roaming\IDMComp\UltraEdit\wordfiles(windows 7下),查看其中文件是否也使用了14。

我里面刚好有14个uew文件,所以改成了15。如果改了还是不行,可能要一个一个打开查看了。。。。

http://www.bobinair.com/ultraedit%E4%B8%8B%E8%AE%BE%E7%BD%AE-python 

 整理下早上学到的东西,要实现:

1:Highlight syntax of Python file
2:execute Python file in UltraEdit and output showed in the output window

解决方法:
1.UltraEdit官方网站下载个Python wordfile, 并打开,全选,copy
2.UltraEdit里,Advanced->Edit->syntax highlighting,里面有个路径写出了wordfile.uew的位置,open,查找到末尾处,paste the contents of Python.uew file
3.看一下wordfile.uew /L到几了,也就是language index,比如我的到13(总共支持到20).
于是把刚才paste的第一行的/L10改成/L14
4.Save, 现在打开一个python file,看一下syntax highlight了吧
5.Advanced->Tool configuration->insert

Menu item name:Python
Command line: “C:\Python26\python.exe” %F (python.exe的路径根据自己不同改变一下)
Directory: C:\
然后Options: Dos Program
然后 Output: 选择output to Listbox capture output

Ok
现在在用UltraEdit 打开的Python file里选Advanced->python, 运行结果于是就出来了吧。

Reference:
http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/add_a_wordfile_pre_v15.html

 
分类: Linux脚本语言
标签: PythonUltraEdit
原文地址:https://www.cnblogs.com/Leo_wl/p/2548298.html