背景:
似乎某些文本编辑器和IDE的功能已开始变得更加“类似于浏览器”。具体而言,这样的功能之一就是能够将打开的文本缓冲区中的普通文本视为与另一个文件,资源甚至是可运行命令的超链接。
将此编程为编辑器插件或宏
因为这似乎是个好主意,所以我已经开始编写一些脚本和编辑器插件来完成这种事情,以便文本编辑器的用户可以打开或操作以下样式的链接:
href="c:/files/foobar.txt" (click to open file)
href="c:/files/foobar.txt" jumpto="34" (jump to a line number)
href="c:/files/foobar.txt" find="Lorem" (jump to 1st line containing word)
href="find_in_files://c:/files" find="Lorem" (show all matching lines)
[[find_in_files://find=Lorem;exten=*.htm*]] (alternate syntax option)
href="redir://c:/files/feebar.txt" (replace current edit buffer)
href="run://c:/files/foobar.jpg" (open in default image editor)
[[run://c:/files/foobar.jpg;runwith=foo.exe]] (alternate syntax option)
问题:
更新:
看来问题可能已经澄清,但事实证明,Emacs Org模式是我正在寻找的东西的一个具体示例,它回答了我所有的问题。
最佳答案
Emacs的Org-Mode支持各种Hyperlinks。
关于vim - 文本编辑器和基于文本文件的超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2060020/