Difference between revisions of "Elscreen"

From WikEmacs
Jump to navigation Jump to search
m (added category Convenience)
(→‎Configuration: how to hide elscreen tabs)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
 
{{Package
 
{{Package
|name=elcreen.el
+
|name=elscreen.el
 
|description=Emacs window session manager
 
|description=Emacs window session manager
 
|author=
 
|author=
 
|maintainer=NaotoMorishima
 
|maintainer=NaotoMorishima
|source=http://www.morishima.net/~naoto/elscreen-en/?lang=en
+
|source=https://github.com/shosti/elscreen
 
}}
 
}}
  
Line 61: Line 61:
  
  
== Use C-prior and C-next to change tabs ==
+
== Change keys to change tabs ==
  
Add into your ~/.emacs :
+
Add into your <code>~/.emacs</code> :
 
<source lang="lisp">
 
<source lang="lisp">
 
(global-set-key (kbd "<C-prior>") 'elscreen-previous)
 
(global-set-key (kbd "<C-prior>") 'elscreen-previous)
 
(global-set-key (kbd "<C-next>") 'elscreen-next)
 
(global-set-key (kbd "<C-next>") 'elscreen-next)
 +
</source>
 +
 +
if you want to use <code>Ctrl-tab</code> and <code>Ctrl-shift-tab</code>:
 +
 +
<source lang="emacs-lisp">
 +
(global-set-key (kbd "<C-tab>") 'elscreen-next) ;; except in org
 +
(global-set-key (kbd "<C-iso-lefttab>") 'elscreen-previous)
 
</source>
 
</source>
  
Line 75: Line 82:
 
You can install it with [[el-get]].
 
You can install it with [[el-get]].
  
 +
== Persistent screens accross sessions ==
 +
 +
This is easily achievable with the [http://melpa.org/#/elscreen-persist elscreen-persist] package on MELPA. To use it, you can either enable a mode, which will do the job automatically, either manually  call a function to store and restore your current screens.
 +
 +
== Hide the tabs ==
 +
 +
You can actually use elscreen without the tabs that appear at the top:
 +
 +
<source lang="lisp>
 +
(setf elscreen-display-tab nil)
 +
</source>
 +
 +
== Use a hydra ==
 +
 +
Here's an example [https://github.com/abo-abo/hydra/wiki hydra] to manipulate elscreens:
 +
 +
<source lang="lisp">
 +
(defhydra hydra-elscreen (:color red :hint nil)
 +
        "
 +
elscreen
 +
_c_reate    _n_ext    _s_tore
 +
_k_ill      _p_revious _r_estore
 +
_C_lone    _g_oto"
 +
        ("c" elscreen-create)
 +
        ("C" elscreen-clone)
 +
        ("k" elscreen-kill)
 +
        ("n" elscreen-next)
 +
        ("p" elscreen-previous)
 +
        ("s" elscreen-store)
 +
        ("r" elscreen-restore)
 +
        ("g" elscreen-goto)
 +
        )
 +
</source>
  
 
= See also =
 
= See also =
[[escreen]]
+
 
 +
== Eyebrowse ==
 +
 
 +
[https://github.com/wasamasa/eyebrowse Eyebrowse] aims to be more feature complete and bug free. By the prolific Wasamasa.
 +
 
 +
== Centaur tabs ==
 +
 
 +
[https://github.com/ema2159/centaur-tabs centaur-tabs] is an aesthetic, functional and efficient tabs plugin for Emacs with a lot of customization options.
 +
 
 +
== Escreen, an alternative ==
 +
 
 +
See [https://github.com/emacsmirror/escreen its github mirror].
  
 
http://www.emacswiki.org/emacs/EmacsLispScreen
 
http://www.emacswiki.org/emacs/EmacsLispScreen
 +
 +
== Separate buffers per projects ==
 +
 +
with [https://github.com/nex3/perspective-el perspective-el].
 +
 +
== elscreen-multi-term: manage a term per screen ==
 +
 +
See [http://wikemacs.org/wiki/Shell#elscreen-multi-term this wiki entry].
 +
  
 
<!------------------------------------------------------------------------->
 
<!------------------------------------------------------------------------->

Latest revision as of 12:43, 1 December 2022


elscreen.el
Description Emacs window session manager
Maintainer NaotoMorishima
Source https://github.com/shosti/elscreen

Emacs Lisp screen is a tabbed window session manager modeled after GNU screen.

GNU Emacs is more of an “environment” than just an editor, since it has the strong configuration language, emacs-lisp. There are a lot of applications written in emacs-lisp, and you may run many applications on your Emacs at the same time, i.e. e-mail reader, news reader, IRC client, a kind of IDE, etc. These applications likely consist of two or more windows, so when you switch among applications, you may want to save or restore how windows are located (this is called as “window-configuration”). Note that for managing multiple buffers, you may want to use something else, like ido.


Installation

With el-get

With el-get : M-x el-get-install RET elscreen, and done.

From sources

Download it at http://www.morishima.net/~naoto/elscreen-en/?lang=en


Basic usage

Click on the menu or type [ C-z ?] (or M-x elscreen-help) to see full help. The prefix key of elscreen is C-z.

Screen creation

[C-z C-c] (or M-x elscreen-create)
create a new screen and switch to it.
[C-z C] (or M-x elscreen-clone &optional SCREEN)
create a new screen with the window-configuration of SCREEN. If SCREEN is omitted, current screen is used.

Navigation

[C-z p] (or M-x elscreen-previous)
switch to the previous screen. 'n' will go to next.

Suspend emacs

C-z is the prefix key, but you still can iconify emacs with C-x C-z. (see C-h w iconify-or-deiconify)


Configuration

Change prefix key

This variable must be set before elscreen is loaded :

(setq elscreen-prefix-key \C-z)

alternatively, you can change it when elscreen is loaded :

 (elscreen-set-prefix-key "\C-t")


Change keys to change tabs

Add into your ~/.emacs :

(global-set-key (kbd "<C-prior>") 'elscreen-previous)
(global-set-key (kbd "<C-next>") 'elscreen-next)

if you want to use Ctrl-tab and Ctrl-shift-tab:

(global-set-key (kbd "<C-tab>") 'elscreen-next) ;; except in org
(global-set-key (kbd "<C-iso-lefttab>") 'elscreen-previous)

Give each screen its own buffer-list

You may want to have each screen its own independent buffer list (i.e. most recently used buffer orders). Give a try to elscreen-buffer-list. You can install it with el-get.

Persistent screens accross sessions

This is easily achievable with the elscreen-persist package on MELPA. To use it, you can either enable a mode, which will do the job automatically, either manually call a function to store and restore your current screens.

Hide the tabs

You can actually use elscreen without the tabs that appear at the top:

(setf elscreen-display-tab nil)

Use a hydra

Here's an example hydra to manipulate elscreens:

(defhydra hydra-elscreen (:color red :hint nil)
         "
elscreen
_c_reate    _n_ext     _s_tore
_k_ill      _p_revious _r_estore
_C_lone     _g_oto"
         ("c" elscreen-create)
         ("C" elscreen-clone)
         ("k" elscreen-kill)
         ("n" elscreen-next)
         ("p" elscreen-previous)
         ("s" elscreen-store)
         ("r" elscreen-restore)
         ("g" elscreen-goto)
         )

See also

Eyebrowse

Eyebrowse aims to be more feature complete and bug free. By the prolific Wasamasa.

Centaur tabs

centaur-tabs is an aesthetic, functional and efficient tabs plugin for Emacs with a lot of customization options.

Escreen, an alternative

See its github mirror.

http://www.emacswiki.org/emacs/EmacsLispScreen

Separate buffers per projects

with perspective-el.

elscreen-multi-term: manage a term per screen

See this wiki entry.