打开dired并选择与前一个缓冲区关联的文件? [英] Open dired and select the file associated with the previous buffer?
本文介绍了打开dired并选择与前一个缓冲区关联的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
blah.txt
,我决定使用打开dired来重命名文件 blah.txt。当我按 Cx d RET
(或 Cx Cf RET
)时,将显示一个可靠的缓冲区,以显示内容该目录包含 blah.txt
,但光标不会在 blah.txt
上。所以我需要首先搜索我的文件( Cs blah.txt
)放置我的光标,然后我可以重命名它( R
)。 如何自动化或删除步骤 Cs blah.txt
?
解决方案
dired-jump
正是你想要的。
(autoload'dired-jumpdired-xJump to dired对应的当前缓冲区)
(autoload'dired-jump-其他窗口dired-x在其他窗口中跳转到)
然后调用:
Mx dired-jump
或
Mx dired-jump-other-window
Let's say I am editing blah.txt
with Emacs and I decide to open dired to rename the file blah.txt. When I press C-x d RET
(or C-x C-f RET
), a dired buffer will show up to display the content of the directory containing blah.txt
, but the cursor will not be on blah.txt
. So I need to search my file first (C-s blah.txt
) to place my cursor on it and then I can rename it (R
).
How do I automate or remove the step C-s blah.txt
?
解决方案
dired-jump
is exactly what you want.
(autoload 'dired-jump "dired-x" "Jump to dired corresponding current buffer.")
(autoload 'dired-jump-other-window "dired-x" "jump to dired in other window.")
Then call:
M-x dired-jump
or
M-x dired-jump-other-window
这篇关于打开dired并选择与前一个缓冲区关联的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文