bash – 在Emacs中的脚本中着色/缩进脚本
发布时间:2020-12-15 22:36:28 所属栏目:安全 来源:网络整理
导读:我经常有 shell脚本调用其他脚本语言,如下所示: #!/bin/bashcat somefile|awk 'BEGIN{ #This line is not auto-indented and is colored as a string constant. ...}{ #Same with this line. ...}'echo "More Bash code here."... 有没有办法让Emacs将awk字
我经常有
shell脚本调用其他脚本语言,如下所示:
#!/bin/bash cat somefile|awk ' BEGIN { #This line is not auto-indented and is colored as a string constant. ... } { #Same with this line. ... }' echo "More Bash code here." ... 有没有办法让Emacs将awk字符串识别为awk程序而不仅仅是字符串常量? 解决方法
您需要对现有的emacs lisp文件进行自己的扩展.这是一个学习emacs lisp的有用教程:
http://www.gnu.org/software/emacs/emacs-lisp-intro/ 这是一个为html着色的.el文件的示例: 完成后,将其发布在线,以便其他人可以受益! (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |