91

GitHub - seudut/perspeen: A emacs plugin for multi workspace

 6 years ago
source link: https://github.com/seudut/perspeen
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Perspeen

This is a package for GNU Emacs in order to make it much more convenient to work with multiple workspaces simultaneously.

The History

Before using Emacs, I am a vimer and my coding work flow is iTerms + Zsh + Tmux + Vim. I often open multiple tmux windows. Each window is an workspace, splitted with at least two panes; one pane runs macvim, and another pane below runs zsh. Each window has its own workspace. The work flow is very convenient and efficient for me. There is a video presentation for this if your'r interested iterm zsh tmux vim

When switch to Emacs, since I perfer the GUI Emacs, I have always been looking for a package which can replace these.

Why named perspeen

This package is inspired from perspective and elscreen. perspective is good, but it has not tab-persist. This package, perspeen, is intended to combine both perspective and elscreen. Make the workspace has the tab-persist feature. So the name is also combined from these two package names. persp-een. Compared with perspective, this package supports multile tab in each workspace. Each workspace has its own tab list. Compared with elscreen, this package support separate the buffers against the workspace.

Install and config

Install maunally

Now, perspeen is into melpa. Using package-install to install this package.

Using el-get

Using package management tool el-get

(el-get-bundle seudut/perspeen
  :features perspeen
  (setq perspeen-use-tab t)
  (perspeen-mode))

Using use-package

(use-package perspeen
  :ensure t
  :init
  (setq perspeen-use-tab t)
  :config
  (perspeen-mode))

How to use - Commands

The defult prefix key of perspeen-mode is C-z. It can be changed by set the variable perspeen-keymap-prefix. like this to change the prefix key as C-c C-'.

(setq perspeen-keymap-prefix (kbd "C-c C-'"))
  • perspeen-create-ws - default key binding C-z c create a new workspace.
  • perspeen-next-ws - C-z n switch next workspace.
  • perspeen-previous-ws - C-z p switch previous workspace.
  • perspeen-goto-last-ws - C-z ' switch to last workspace.
  • perspeen-goto-ws - switch workspace with a numeric prefix.
  • perspeen-ws-eshell - C-z e start a eshell in current workspace.
  • perspeen-delete-ws - C-z k kill current workspace.
  • perspeen-rename-ws - C-z r rename current workspace.
  • perspeen-change-root-dir -C-z d change the root directory of current workspace.
  • perspeen-ws-jump -C-z 1..9 switch to the specific workspace. You can also use prefix key C-u 1..9 for perspeen-go-ws command.

Below are the commands related to the tabs, set perspeen-use-tab to enable the tab

  • perspeen-tab-create - C-z t create a new tab in current workspace
  • perspeen-tab-del - delete current tab in current workspac
  • perspeen-tab-next - switch to nex tab of current workspace
  • perspeen-tab-prev - switch to previous tab of current workspace

See the screen shot below, like the perspective, the workspaces indicator are located on right of the mode line. Use perspeen-selected-face to change the face of the current selected workspace.

perspeen

Some Known Issues

  • When using perspeen-keymap-prefix to set a prefix key, and the prefix key you want to use is used by other plugins, you may not be able to use (setq perspeen-keymap-prefix (kbd "C-c C-'")), you may need to unbind the prefix first. see issue #8.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK