0

In emacs I'm already using iswitchbuffer, but I would still like to be more productive with my buffer switching.

One common case which arises a lot is that I have 6 or 7 identical or near-identical file names. For example:

server.py<proj1> server.py<proj2> server.py<proj3>... foo_server.py<proj4>

The problem is that I have to type out most of the directory context when I'm switching buffers.

An existing alternative to typing the directory context is a completion window which pops up saying:e

Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
... ....

but this is unsatisfactory as well since I have to the switch to the window and use the mouse to pick one.

What I'd prefer is to use tab or some other key to highlight alternative buffer selections, then enter to select one. Is there a way to do this?

4

2 回答 2

1

在 iswitchb-mode(及其后继1 ido-mode)中,循环候选对象的默认绑定是Ctrl+sCtrl+ r

您应该能够通过键入文件名的公共位来限制候选者,然后使用这些绑定循环遍历这些候选者。

1iswitchb.el请参见和中的标题文本ido.el

于 2015-09-16T07:07:48.847 回答
0

如果您使用icomplete-mode(这有点像iswitchb-mode,但适用于所有完成,而不是仅适用于缓冲区),您可以循环到下一个/上一个匹配候选者C-,and C-.

如果您使用默认补全系统(带或不带 ),另一种选择icomplete-mode是键入serv*1(例如)选择server.py<proj1>

于 2015-09-17T01:00:30.690 回答