通过Emacs在代码注释中插入图片 [英] Insert a picture in code comment via Emacs
问题描述
由于我使用Emacs,到目前为止Emacs还有任何实现?
查看 iimage-mode
:它是在文本缓冲区中显示图像的标准解决方案。例如,给出以下文件:
/ *一个图像值得一千个字:
*< path / to / image.png>
* /
int main(int argc,char ** argv){
return 0;
}
然后运行 Mx 开启iimage模式
应显示 image.png
代替其路径。
但是,我同意@ user4815162342的评论,您需要与源文件一起分发图像,并记住在需要时更新它们(有时候很难更新代码注释)只是文字,它将更加难以更新图像评论)
An idea has just came to my mind. Is there any methods to insert a picture in code comment to help explain our code? After all, a picture is worth a thousand words.
Since I use Emacs, is there any implementations for Emacs so far?
Take a look at iimage-mode
: it is a standard solution to display an image in a text buffer.
For example, given the following file:
/* an image is worth a thousand words:
* <path/to/image.png>
*/
int main (int argc, char **argv) {
return 0;
}
then running M-xturn-on-iimage-mode
should display image.png
in place of its path.
However, I agree with @user4815162342's comment that you need to distribute images along with source files and to remember updating them when needed (it is sometimes hard to update code comments when they are text only; it will IMO be harder to update image comments)
这篇关于通过Emacs在代码注释中插入图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!