好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

UltraEdit支持python语法高亮

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 ,  脚本语言

标签:  Python ,  UltraEdit

作者: Leo_wl

    

出处: http://www.cnblogs.com/Leo_wl/

    

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

版权信息

查看更多关于UltraEdit支持python语法高亮的详细内容...

  阅读:43次