我如何在没有弹出界面的gnome终端中运行emacs?


Answers:


30

要在没有GUI的情况下在终端中运行emacs(即,如果没有为自身创建图形窗口),请使用:

emacs -nw

-nw标志代表“没有窗口”。


6

命令行emacs与GUI一起安装。要运行它,请使用-nw选项。来自man emacs的解释:

-nw, --no-window-system
Tell Emacs not to use its special interface to X. If you use
this switch when invoking Emacs from an xterm(1) window, display
is done in that window.

因此,从命令行运行以下命令以使用emacs:

emacs -nw

如果您不想键入emacs -nw,则可以创建一个别名。将以下行放入您的~/.bashrc或中~/.bash_aliases

alias emacs="emacs -nw"

您可以使用I / O重定向在一行中添加此别名:

echo alias emacs="emacs -nw" >> ~/.bashrc
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.