Configure better the desktop environment

进入Linux下新的Emacs桌面系统

KeysDescription
Sys-1Switch to workspace 1
Sys-2Switch to workspace 2
Sys-3Switch to workspace 3
Sys-4Switch to workspace 4
Sys-SPCApp Launcher
Syc-RReload session

Dive in the font of emacs

  • What’s the font?
  • What’s the font face ?
  • What’s the font set ?
  • What’s the font family?

New tab functions

21.17 Tab Bars

标签是一个命名的持久化窗口配置,包括多个缓冲区和窗口。

M-x tab-bar-mode.

This command applies to all frames, including frames yet to be created. To control the use of tab bars at startup, customize the variable tab-bar-mode.

打开新标签。

C-x t 2

Add a new tab (tab-new). You can control the choice of the buffer displayed in a new tab by customizing the variable tab-bar-new-tab-choice.

选择一个缓冲区,新开标签

C-x t b bufname RET

Select buffer bufname in another tab. This runs switch-to-buffer-other-tab.

搜索文件,新开标签

C-x t f filename RET

Visit file filename and select its buffer in another tab. This runs find-file-other-tab. See Visiting.

选择目录,新开标签

C-x t d directory RET

Select a Dired buffer for directory directory in another tab. This runs dired-other-tab. See Dired.

By default, a new tab starts with the buffer that was current before calling the command that adds a new tab. To start a new tab with other buffers, customize the variable tab-bar-new-tab-choice.

The variable tab-bar-new-tab-to defines where to place a new tab. By default, a new tab is added on the right side of the current tab.

The following commands can be used to delete tabs:

关闭标签

C-x t 0

Close the selected tab (tab-close). It has no effect if there is only one tab, unless the variable tab-bar-close-last-tab-choice is customized to a non-default value.

关闭全部其他标签

C-x t 1

Close all tabs on the selected frame, except the selected one.

The variable tab-bar-close-tab-select defines what tab to select after closing the current tab. By default, it selects a recently used tab.

The command tab-undo restores the last closed tab.

The following commands can be used to switch between tabs:

下一个标签

C-x t o

C-TAB

Switch to the next tab. If you repeat this command, it cycles through all the tabs on the selected frame. With a positive numeric argument n, it switches to the next nth tab; with a negative argument -n, it switches back to the previous nth tab.

上一个标签

S-C-TAB

Switch to the previous tab. With a positive numeric argument n, it switches to the previous nth tab; with a negative argument -n, it switches back to the next nth tab.

按名字切换标签

C-x t RET tabname RET

Switch to the tab by its name, with completion on all tab names. Default values are tab names sorted by recency, so you can use M-n (next-history-element) to get the name of the last visited tab, the second last, and so on.

modifier-tabnumber

Switch to the tab by its number. After customizing the variable tab-bar-select-tab-modifiers to specify a modifier key, you can select a tab by its ordinal number using the specified modifier in combination with the tab number to select. To display the tab number alongside the tab name, you can customize another variable tab-bar-tab-hints. This will help you to decide what key to press to select the tab by its number.

modifier-0

Switch to the recent tab. The key combination is the modifier key defined by tab-bar-select-tab-modifiers and the key 0. With a numeric argument n, switch to the nth recent tab.

The following commands can be used to operate on tabs:

标签重命名

C-x t r tabname RET

Rename the current tab to tabname. You can control the programmatic name given to a tab by default by customizing the variable tab-bar-tab-name-function.

标签后移m位

C-x t m

Move the current tab n positions to the right with a positive numeric argument n. With a negative argument -n, move the current tab n positions to the left.

You can enable tab-bar-history-mode to remember window configurations used in every tab, and restore them.

tab-bar-history-back

Restore a previous window configuration used in the current tab. This navigates back in the history of window configurations.

tab-bar-history-forward

Cancel restoration of the previous window configuration. This navigates forward in the history of window configurations.