[go: up one dir, main page]

Skip to content

etu/0blayout-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 

Repository files navigation

https://melpa.org/packages/0blayout-badge.svg https://stable.melpa.org/packages/0blayout-badge.svg

0blayout-mode – Small Layout Management mode

This mode provides the ability to have several layouts saved and then you can easily switch between your saved layouts. When you first load the mode, you will get a “default” layout named “default”.

Default Prefix

Default keyboard prefix is C-c C-l, and you can modify that by putting this in your init-file (with your own prefix of course):

(0blayout-add-keybindings-with-prefix "C-c C-l")

Usage

You have the ability to create new layouts using PREFIX C-c and name them. There you can set up your layout as you want it, open buffers, edit files.

And when you have more than one layout, you can switch between the layouts you have active with PREFIX C-b.

You can also kill the layout that you’re currently visiting with PREFIX C-k

Install

The lazy way (Using use-package)

This requires that you have use-package set up. But it’s in my opinion the easiest way to set up packages.

(use-package 0blayout
  :ensure t

  ;; Optionally set default layout name
  :init (setq-default 0blayout-default "my-default-layout-name")

  ;; Load the mode
  :config (0blayout-mode t))

Using MELPA

You could also have a clause like this to automaticly install it:

(unless (package-installed-p '0blayout)
  (progn
    (package-refresh-contents)
    (package-install '0blayout)))

To activate 0blayout-mode you just put (0blayout-mode 1) somewhere after you loaded it.

Manual install

  • Download 0blayout.el
  • Put the file in some folder like $HOME/.emacs.d/lisp/

Then you can include like this:

(add-to-list 'load-path
             (expand-file-name "lisp" user-emacs-directory))

(require '0blayout)

(0blayout-mode 1)                       ; Activate 0blayout-mode

Name

0b is just a prefix I use for things because I have the domain 0b.se, that’s it.