-
Notifications
You must be signed in to change notification settings - Fork 43
Tutorial
To start off, add a few workgroups. Hit <prefix> c
to issue the command
wg-create-workgroup
, give it a name, hit RET
, and a new workgroup is
created. Maybe split the screen a few times with C-x 2
and C-x 3
, and
switch to different buffers in some of the windows to make it unique. Repeat
this process a few times to create some different workgroups.
Every workgroup must have a unique name. You can rename workgroups after
they've been created with <prefix> A
(wg-rename-workgroup
).
Saving and loading was the original motivation for writing Workgroups. You can
save your workgroups to a file with <prefix> C-s
(wg-save-session
)
and you can load workgroups from a file with (wg-find-session-file wg-file)
.
Once you have a file of saved workgroups, it's convenient to load it on
Emacs startup. To do so you can add a line like this to your.emacs
:
(wg-find-session-file "~/.emacs_files/workgroups")
You can kill workgroups with <prefix> k
(wg-kill-workgroup
). Killing a
workgroup deletes it from the list of workgroups, and copies its working config
to the kill ring. You can yank killed wconfigs into the current frame with
<prefix> y
(wg-yank-config
). If the last command was wg-yank-config
,
calling it again will yank the next wconfig in the kill ring, and so on, much
like Emacs' own kill ring.
You can save a wconfig to the kill ring without killing its workgroup with the
kill-ring-save commands. <prefix> M-w
(wg-kill-ring-save-working-config
)
saves the working config to the kill ring, and <prefix> M-W
(wg-kill-ring-save-base-config
) saves the base config to the kill ring.
<prefix> M-k
(wg-kill-workgroup-and-buffers
) kills a workgroup, and all the
buffers visible in it, and <prefix> K
(wg-delete-other-workgroups
) deletes
all but the current workgroup.
Cloning a workgroup creates a new workgroup under a different name with the a
copy of the current workgroup's base and working configs. <prefix> C
(wg-clone-workgroup
) will clone the current workgroup.
You can move a workgroup leftward or rightward in the workgroups list with
<prefix> ,
(wg-offset-left
) and <prefix> .
(wg-offset-right
)
respectively. These commands work cyclically, so when you offset a workgroup
leftward or rightward when it's already on the far left or right of the list, it
will wrap around to the other side.
<prefix> x
(wg-swap-workgroups
) will swap the position in the workgroups
list of the previously selected workgroup with that of the current workgroup.