将图像插入文本缓冲区 [英] insert image into text buffer
本文介绍了将图像插入文本缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我放置
(插入图像(create-image/tmp/test.png))
,则缓冲区中将显示图像
$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
$ b $/tmp/test.png
整洁。但是,
- 我不得不将最后一个括号放在一行,所以图像
靠近左边一边的缓冲区。有没有办法隐藏
(插入图像...)
文本?
- 文本文件包含
(插入图像...)
仅文本,而不是
图像。我很高兴,但有一种方法来告诉emacs
自动替换
$($)$ c $($) b他们对应的图像(文件打开后),而不需要在
之后输入Cx Ce
解决方案看看
iimage-mode
,内联图像小模式。它包含自Emacs-23,IIRC。
Mx
iimage-mode
p>If I place
(insert-image (create-image "/tmp/test.png"))
in a buffer, place the cursor after the last parenthesis and evaluate it with
C-x C-e
, then the image/tmp/test.png
is displayed in the buffer:Pretty neat. But,
- I had to put the final parenthesis on a separate line, so the image is close to the left-hand side of the buffer. Is there a way to hide the
(insert-image ...)
text altogether?- The text file contains the
(insert-image ...)
text only, not the image. I'm happy with that, but is there a way to tell emacs to automatically replace all the(insert-image ...)
expressions by their corresponding images (after the file is opened) without me having to typeC-x C-e
after each one?
解决方案Take a look at
iimage-mode
, the inline image minor mode. It's included since Emacs-23, IIRC.M-x
iimage-mode
这篇关于将图像插入文本缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文