dre*_*mac 6 vim emacs text-editor editor hyperlink
背景:
似乎一些文本编辑器和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)
Run Code Online (Sandbox Code Playgroud)
问题:
更新:
看起来这个问题本来可以澄清,但事实证明,Emacs Org模式是我所寻找的一个具体例子,可以解答我的所有问题.