开发者

Emacs Shell mode: how to make TAB character pass through?

Is there a way to make TAB pass through to the shell in Emacs "Shell-mode"? I'm starting interactive console inside Shell inside Emacs and it normally prints list of candidates in response to TAB

I tried M-x local-set-key RET C-z self-insert-co开发者_JAVA技巧mmand, but that just inserts TAB in the Shell buffer


C-qTAB

In general, C-q lets you "quote" the following character in Emacs (not just shell mode), bypassing whatever function might be bound to it.


Shell mode helps you to build commands in emacs and send them to some process when you press enter. Very helpful in older shells like the Bourne shell and in other interactive commands that don't allow line editing.

On the other hand, all the keypresses are being handled by emacs, so the command you're running only sees whole lines at a time. If you want to have the tab sent immediately, rather than when you press enter, I don't think shell-mode will do it.

Have you tried M-x ansi-term ?


So the problem is that you want tab-completion, but you're not getting it?

What does C-hkTAB tell you when you're in shell mode?

By default it should be bound to comint-dynamic-complete which ought to provide tab-completion, but something may be clobbering that binding.

You could also run emacs -Q to see what happens without any custom or site config files loaded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜