Skip to content

Instantly share code, notes, and snippets.

@Inom-Turdikulov
Last active February 26, 2024 04:41
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Inom-Turdikulov/edcef97cf8621bfbb43ba118fc5cc912 to your computer and use it in GitHub Desktop.
Save Inom-Turdikulov/edcef97cf8621bfbb43ba118fc5cc912 to your computer and use it in GitHub Desktop.
Doom emacs with evil keybdindings workflow

Doom Emacs Workflow

Here I collect, various EMACS/evil/org… tips, shortcuts, keybindings, etc. Also, here some information how I handle daily usage of text editing.

This not absolute beginner cheat sheet, just some short basic commands/tips.

Recommendation - just use it & check it every day (training mode).

What I handle by Emacs:

Basics

My main Emacs (with doom emacs) keybindings & workflow. Items marked with * are often used by me.

Command abbreviations

“Escape” keyESC
“Alt” or “Option” keyM
“Control” keyC
“Shift” keyS
“Super” or “Command” key (not shift!)s
“Space” keySPC
“BackSpace” keyBSPC

Vim base commands

select somethingv[motion]
copy somethingy[motion]
delete something (can be used with black hole register)d[motion]
change something (can be used with black hole register)c[motion]

Vim Text objects (motions)

outera
inneri
wordw
sentences
paragraphp
argument (require plugin, works inside brackets)a
single and double quote
back quote`
a parenthesized blocks) }
a tagt
a single tag>
entire contente

Vim Modes

normal, for navigation and manipulation of textESC
insert, for inserting new text.iIaAoO
visual, for navigation and manipulation of text selectionsv
command-line, for entering editor commands:
replace mode, replace existing text by directly typing over it.R
similar to visual, but with a more MS Windows-like behaviourselect
similar to the command-line mode but optimized for batch processingex-mode

Vim registers

It’s sort of space in memory to store text. Every register can be accessed using double quote . For example r register, copy/paste will be like this “ry / “rp. You can access register in insert/command mode by C-r[register name]. You can use the :reg[a|b|c] command to see all the registers and their content. If you use qw to record a macro, the register “w will have all actions which you have done.

More info - https://www.brianstorti.com/vim-registers/

The unnamed register (yank, delete)““
10 numbered registers (latest yank, newest, …, oldest)“0 to “9
The last entered text (read only)“.
Current file path (read only)“%
Most recently used command (read only)“:
The alternate file register (sort of last edited file)“#
The black hole register“_
The selection (system clipboard)“*, “+
Last search pattern register“/
26 Named registers “a to “z (or “A to”Z), sort of clipboards[a-z]
The small delete register“-
The expression register, useful for calculation C-r =...“=

how to change macro registers in evil, how to execute them?

drop register?

Command line usage examples

emacsclient -nw   # Run client in terminal
emacs -q          # Run emacs and do not load an init file (init.el)
emacs -Q          # Dont load site-wide startup file (global init file)

# Open specific workspace from command line
emacsclient --alternate-editor='' --no-wait --eval '(persp-switch "TERM")' --display $DISPLAY

Base Emacs keybindings, useful in M-x extend command menu, mini buffers, etc

scroll DownC-n
scroll UpC-p
scroll LeftC-b
scroll RightC-f
scroll to topM-<
scroll to bottomM->
kill next charC-d
kill wordC-w
kill whole lineC-S-BSPC
kill to end of sentence (kill-sentence)M-k
Delete spaces and tabs around pointM-\
History (also work in evil command input)C-s
(evil) Go to previous candidateC-k
(evil) Go to next candidateC-j
(evil) Go to previous groupC-S-k
Go to next groupC-S-j
Open an embark-act menu to chose a useful actionC-;, SPC a

Files

Evil files

edit a file in a new buffer:e [filename]
show buffer whose filename begins with “vimrc”:b vimrc
edit the file whose name is under or after the cursorgf
write current file, if modified, and exitZZ
quit current file and exit, ignoring changesZQ, :q!
quit without saving and exit with error code:cq
exit:q
save without exiting:w
save and exit:x
write the current file and exit:wq [file]
write/force write and exit:wq! [file]
same as above, but only write the lines in [range]:[range]wq[!]

Emacs files

for saving the current file [customized command]C-s
open project sidebarSPC o p
find file in project sidebar (locate) *SPC o P
to open a project (also FAST switch to project) *SPC p p
to open a file in a projectSPC SPC
search or create new file *SPC . [file]
find file from hereSPC f F
to delete this fileSPC f D
recently visited filesSPC f r
rename fileSPC f R
Save file *C-s
save file asSPC f S
recently visited files in a projectSPC p r
find file in other projectSPC p f
locate fileSPC f l
projectile discover commandsM-x projectile-disco*

Treemacs

Project KeybindsC-c C-p
Collapse project at point.TAB
Collapse all projects.S-TAB
Remove project at point from the workspaceC-c C-p r
Select a new project to add to the workspaceC-c C-p a
Collapse menuC-c C-p c
Collapse projectC-c C-p c c
Workspaces KeybindsC-c C-w
Open current file or tag in vertical splitov
Open current file or tag in horizontal splitoh
Open current itemRET
Open current file or tag and close treemacs (no split)oc
Open current file or tag, using ace-windowoaa
Open current file or tag in horizontal split (ace-window)oah
Open current file or tag in vertical split, (ace-window)oav
Open current file or tag in most recent windowor
Open current file externallyox
Toggle the hiding and displaying of dotfilesth
Toggle the hiding and displaying gitignored filesti
Toggle whether the treemacs window should have a fixed width.tw
Toggle treemacs-follow-mode.tf
Toggle treemacs-filewatch-mode.ta
Toggle treemacs-fringe-indicator-mode.tv
Toggle treemacs-git-commit-diff-mode.td
Copy the absolute path of the node at point.ya
Copy the path of the node at point relative to the project root.yr
Copy the absolute path of the project root for the node at point.yp
Copy the file at point.yf
Hydra to show you treemacs’ most commonly used keybindings?
Hydra to show you treemacs’ rarely used, advanced keybindingsC-?
Go to the next same-level neighbour of the current node.M-j
Go to the previous same-level neighbour of the current node.M-k
Go to parent of node at point, if possible.u
Switch positions of project at point and the one above it.<M-Up>
Switch positions of project at point and the one below it.<M-Down>
page upC-b
page downC-f
back up 1/2 screenC-u
page down 1/2 screenC-d
Set a new value for the width of the treemacs window.w
Decrease the width of the treemacs window.<
Increase the width of the treemacs window.>
Refresh the project at point. *r
new filecf
new dircd
Delete node at point. *d
Rename node at point.R
Create a filecf
Create a directory.cd
Hide the treemacs window.q
Delete the treemacs buffer.Q
Peek at the files at point without fully opening them (peek mode).P
Copy the absolute path of the node at pointya
Copy the relative to the project root.yr
Copy the absolute path of the project root at point.yp
Copy the file at point.yf
Move the file at point.m
Set a new value for treemacs-sorting.s
Bookmark the currently selected files’s, dir’s or tag’s location.b
Run the action defined in treemacs-COLLAPSE-actions-config (usually close).M-h
Run the action defined in treemacs-RET-actions-config (usually open content).M-l
Move treemacs’ root one level upward, into the directory at point.M-H
Move treemacs’ root one level downwards, into the directory at point.M-L
Collapse the parent of the node at point.H
Run an asynchronous shell command on the current node.\!
Run an asynchronous shell command in the root of the current project.M-!
Close all directories matching any of treemacs-litter-directories.C
Adjust the width of the treemacs window to that of the longsest line.=
Toggle between normal and extra wide display for the treemacs window.W

Dired

Dired (directory), alternative is C-x d or SPC .SPC f d
going one folder back-
creating a new directory+
mark the files for deletion, press x to delete.d
change permissionsM
sort by modes.o
change the owner.O
mark files or directories.m
unmark files or directoriesu
unmark allU
invert the selection, to switch between files and directoriest
copyC
move (and rename)R
simple view(
to invoke mark dialog\*
to select all directories\* /
to select all files\* ?
copy to another windowC
move to another windowR
to edit file/dir namei

Windows

Evil windows

to close the current window.C-x 0
to close every other window.C-x 1
split open file:sp f
vertical split open file:vsp f
split windows horizontalC-w s
split windows verticallyC-w v
switch between windowsC-w C-w
quit a windowC-w q
close other windowsC-w o
swap windowsC-w x
jumps to the last window you used *C-w C-p
left, down, up, right windowC-w hjkl
increase window heightC-w +
decrease window heightC-w -
increase window widthC-w <
decrease window widthC-w >
equal windowC-w =
next/previous tabgt gT

Emacs windows

You can use vim motion keys to navigate between open windows, kill windows, resize windows for example SPC w H moves the window to the left.

Workspaces

create a new workspaceC-t
Switch to workspaceSPC TAB .
new workspaceSPC TAB n
new named workspaceSPC TAB N
Previous workspaceSPC TAB [
Next workspaceSPC TAB ]
Previous workspace as alternative[w
Next workspace as alternative]w
Remove workspaceSPC TAB d
Restore last sessionSPC TAB R
Switch to workspace 1M-1
Switch to workspace 2 and so forth.M-2
go to #N tabSPC Tab [num]
Move Tab Forward/BackwardM-x workspace/swap-left[right]

Buffers

switch to another buffer (alternative is SPC b b)=SPC ,=
switch to all buffers (alternative is SPC b B)SPC <
pop up scratch buffer (alternative is SPC b x)SPC x
pop up scratch buffer (alternative is SPC b X)SPC X
to save and name itSPC b s
kill buffer (^w alternative)SPC b k
kill all buffer (^+w alternative)SPC b K
list all buffersSPC b i
go to next buffer (alternative is ]b)SPC b n
go to previous buffer (alternative is [b)SPC b p
delete a buffer (close a file)SPC b d
last bufferSPC b l
maximize bufferSPC w m
maximize verticallySPC w m v
maximize horizontallySPC w m s

Navigation (movement)

Evil navigation

zt  puts the current line at the top
zz  puts the current line at the middle
zb  puts the current line at the bottom

ctrl+y|ctrl+e Scrolling through screen with the cursor staying on the same line/present line

Cursor Movements

C-'              move to char (avy)
g s SPC             closure (avy)
gss                 go to character 2 (avy)
gs/                 go to char timer

h|j|k|l             move left, down, up, right

w|W                 jump by start of words (punctuation considered words), by words (spaces separate words)
e|E                 jump to enD of words (punctuation considered words), to end of words (no punctuation)
b|B                 jump backward by words (punctuation considered words), backward by words (no punctuation)
ge                  jump backward to end of words

0                   (zero) start of line
^                   first non-blank character of line
$                   end of line
g_                  jump to the last non-blank character of the line
_                   move to the current line (useful for making commands line-based)

-                   move line upwards, on the first non blank character
+                   move line downwards, on the first non blank character

gg                  go to first line
G                   go to last line
ngg                 go to line n
nG                  go To line n
:n                  go To line n

)|(                 move the cursor forward to the next sentence (or table cell), backward by a sentence (or table cell)
{|}                 move the cursor a paragraph backwards, a paragraph forwards
]]|[[               move the cursor a section forwards or to the next {, backwards or the previous {
H|M|L               move the cursor to the top, middle, bottom of the screen.

%                   show matching brace, bracket, or parenthese
''                  return to the line where the cursor was before the latest jump
gi                  start typing on the last inserting point you can type
gv                  reselect and jump to the last visual selection with, use =o= to jump the selection edges
gd                  jump to function/variable definition
g ;                 goes to the older cursor position on the changlist
g,                  goes to the newer cursor postion on the change list

C-o              jump to previous position you were at
C-i              jump to more recent position you were a
C-f|C-b       move the cursor forward by a screen of text, backward by a screen of text
C-u|C-d       move the cursor up by half a screen, down by half a screen

Bookmarks

:marks              list all the current marks
m[a]                make a bookmark named a at the current cursor position
`[a]                go to position of bookmark a
'[a]                go to the line with bookmark a
`.                  go to the line that you last edited

Emacs navigation

bookmarks

SPC s r  jump to mark

Search & Replace

Evil search & replace

s|S             evil snipe (2 letter where you want to navigate)
f[x]|Fx         search line forward for 'x', backward for 'x'
t[x]|Tx         search line forward before 'x', backward before 'x'
  all this 3 modes, has addditional keybindings:
  ,|;           backward, forward after that "finds", works for s, f and t
                you can also just press f/t/F/T again to continue search

ESC             clear selection

/pattern        search for pattern, use \C escape charater for case sensitive
?pattern        search backward for pattern
n|N             repeat search in same direction, in opposite direction
*|#             search forward word under cursor, search backward word under cursor. Clear selection with Esc
:%s/old/new/g      replace all old with new throughout file
:%s/old/new/gc     replace all old with new throughout file with confirmation
:'<,'>s/old/new/g  replace all old with new throughout visual selection
&               repeat substitute, equal to :s//~/

:s/\[foo\]//g              Escape the square brackets with a backslash, to replace [foo]

:%s/\(^ *\)\@<! \{2,}/ /g  Replace multiple spaces with one, This says "find 2 or more spaces (' \{2,}') that are NOT preceded by 'the start of the line followed by zero or more spaces'.

Emacs search & replace

M-%        query replace
C-M-%      query replace regex

SPC s b|B  search buffer, all buffers (go to line)
SPC s s|S  search buffer, search for thing at cursor positon *
SPC s d|D  search in current directory, other directory
SPC s f    locate file
SPC s i    jump to symbol *
SPC s j    jump list
SPC s l|L  jump to visible links, all links
SPC s r    jump to mark

SPC s p|P  search in project, other project *

Project-wide Search & Replace (vertico, details https://hungyi.net/posts/doom-emacs-search-replace-project/)
SPC s p foo C-; E C-c C-p :%s/foo/bar/g RET Z Z

SPC ?      commands help *
SPC h b    show help bindings help menu *
SPC s e    search in .emacs.d
SPC s t|T  dictonary, thesaurus
SPC s k|K  lookup in local docsets, all docsets
SPC s o|O  lookup online, online with prompt
C-c z      Zeal Documentation

Changing Text (editing)

Evil changing text

C-o[motion]         run command in insert mode

C-q                 read input character and insert it (useful to insert TAB for example)
r                   replace a single character (does not use insert mode)
R                   enter Insert mode, but replacing characters rather than inserting
J                   join line below to the current one
cc                  change (replace) an entire line
cw                   (replace) to the end of word
C                   change (replace) to the end of line
ct'                 ' character (can change ' for any character)
s                   delete character at cursor and substitute text
S                   delete line at cursor and substitute text (same as cc)
xp|Xp               ranspose two letters (delete and paste, technically)
u                   undo changes
C-r                 redo changes
C-rr                insert content of register r (in insert mode!)
.                   repeat last command

~                   switch case
g~iw                switch case of current word
gUiw                make current word uppercase
guiw                make current word lowercase
gU$                 make uppercase until end of line
gu$                 make lowercase until end of line
gUU                 change line to UPPER

ddp                 swap current line with next (line down)
ddkP                swap current line with previous (line up)
yyP                 duplicate line

:%retab             fix spaces / tabs issues in whole file
:r !{cmd}           execute {cmd} and insert its standard output below the cursor.

Evil deleting text

x|X                 delete current character, previous character
dw                  delete the current word
dd                  delete (cut) a line
dt'                 delete until the next ' character on the line (replace ' by any character)
D                   delete from cursor to end of line
:[range]d           delete [range] lines
ds[char or t]             deletes the surrounding char or html element
cs[char][char or <tag>]   change the surrounding char to char or <tag>
ysiw[char]                chage the surrounding of inner word

ysWf ysWF                 functions example, wrap text/word

S[text object] in visual  state will surround a text object

Evil exchange

`cx[motion]` … `cx[motion]` Exchange motion `cxx` Like `cx`, but use the current line. `X` Like `cx`, but for Visual mode. `cxc` Clear any `{motion}` pending for exchange. If you’re using the same motion again (e.g. exchanging two words using `cxiw`), you can use `.` the second time. If one region is fully contained within the other, it will replace the containing region.

Evil commenting

gcc                comment line
gc[motion_object]  comment motion (a...)

Emacs editing text

C-M-o      Split lines (join by J)
SPC i s    Insert snippet *
SPC i e|U  Insert Emoji, Unicode symbol *
SPC i f|F  Current filename, path
SPC i p    Evil ex path (insert output of $PATH for example)
SPC i r    Insert from evil register
SPC i y    Insert from clipboard

Formatting Text and Fold

Evil formatting

>>  indent line one column to right *
<<  indent line one column to left *
==  auto-indent current line *
=   indent text, works with visual selection
>   shift right in visual mode (v)
<   shift left in visual mode (v)

zf#j creates a fold from the cursor down # lines.
zf/  string creates a fold from the cursor to string.
zj   moves the cursor to the next fold.
zk   moves the cursor to the previous fold.
zo   opens a fold at the cursor.
zO   opens all folds at the cursor.
zm   increases the foldlevel by one.
zM   closes all open folds.
zr   decreases the foldlevel by one.
zR   decreases the foldlevel to zero — all folds will be open.
zd   deletes the fold at the cursor.
zE   deletes all folds.
[z   move to start of open fold.
]z   move to end of open fold.

za     toggle fold *
zo|zc  Fold/Unfold
zO|zC  open all nested folds, close all nested folds

Emacs formatting

SPC c f  format buffer/region
SPC c w  Delete trailing whitespace
SPC c W  Delete trailing new lines
SPC c l =  LSP formatting
M-s h   Higlight menu

Evil Visual Mode

v                   start visual mode, mark lines, then do command (such as y-yank)
V                   start linewise visual mode
o                   move to other end of marked area
O                   move to other corner of block
U                   upper case of marked area

C-v                 start visual block mode
aw                  mark a word
ab                  a () block (with braces)
ib                  inner () block
ggVG                Select All

vc                  change (replace) marked text
vy                  yank (copy) marked text
vd                  delete marked text
v~                  switch case

v%                  selects matching parenthesis
vi{                 selects matching curly brace
vi"                 selects text between double quotes
vi'                 selects text between single quotes

viW|vis|vip|viB     select word, sentence, paragraph, innermost brackets
vt|vT|vf|VF         select and search

Evil Record and playback

q[a]                start recording macro 'a'
q                   end recording macro
@a                  replay macro 'a'
@:                  replay last command

Refactor and Clean up

Evil refactor and clean up

]s                  next misspelled word
[s                  previous misspelled word
zg                  add word to wordlist
z=                  suggest word

Emacs refactor and clean up

C-,   flyspell next error
SPC t s  toggle flyspell

Emacs & Evil Commands

M-x   Find Any Action (execute extended command)
M-`   text-mode emulation of menubar *
C-c C-c  run... *
C-g      Quit popup/dialog or cancel operation *
C-[      Close popup or Escape key alternative (evil)
C-+ C--  Zoom plus Zoom minus
M-x      for entering a command *
SPC q q  Quit Emacs
SPC f p  to open the config
SPC h v  describe variable
SPC o t  for opening vterm in a popup window
SPC o T  for opening vterm in fullscreen
SPC t    varius commands (toggle)
SPC t l  toggle line numbers (useful on small screen)

C-SPC    company autocomplete (insert mode)
C-S-SPC  company autocomplete common (insert mode)

:jumps      list jumps
:![command] exec command in active window (generated new shell output buffer)

Emacs Build & Run

SPC  ;   eval
SPC c e  evaluate buffer or region
SPC c E  evaluate & replace region
SPC c s  Send to repl

SPC c    lsp code actions
SPC c c  compile
SPC c C  recompile
SPC c d  jump to defention *
SPC c D  jump to referencesg *
SPC c f  format buffer/region
SPC c i  find implementations *
SPC c j  jump to symbol in current workspace
SPC c J  jump to symbol in any workspace
SPC c k  jump to documentation

SPC c l =    LSP formatting
SPC c l a    LSP code actons (a - code actions, h - higlight symbol, l - lens)
SPC c l F    LSP fodlers (a - add, b - unblacklist, r - remove)
SPC c l g    LSP goto menu
SPC c l g d  LSP goto declaration (alternative - gd)
SPC c l G    LSP peek menu
SPC c l h    LSP help menu
SPC c l r    LSP refactor menu
SPC c l T    LSP toggle menu
SPC c l w    LSP workspaces menu

SPC c o  Organize Imports
SPC c r  LSP rename
SPC c t  Find type defention
SPC c x  List errors

unbinded
lsp-find-declaration

Emacs debug (dap-mode)

You need configure a keys: https://docs.doomemacs.org/latest/#/usage/keybindings

SPC o d open debug chooser

SPC d s  dap-debug
SPC d h  dap-hydra (q - quit)
SPC d n  dap-next
SPC d i  dap-step-in
SPC d o  dap-step-out
SPC d c  dap-continue
SPC d r  dap-debug-restart

SPC d r  dap-debug-recent
SPC d l  dap-debug-last

SPC  e   dap-eval
SPC  r   dap-eval-region
SPC  s   dap-eval-thing-at-point
SPC  a   dap-ui-expressions-add
SPC  d   dap-ui

SPC  b   dap-breakpoint-toggle
SPC  c   dap-breakpoint-condition
SPC  h   dap-breakpoint-hit-condition
SPC  l   dap-breakpoint-log-message

Clipboard

Evil clipboard

yw                  yank word
yy                  yank (copy) a line
2yy                 yank 2 lines
y$                  yank to end of line
p                   put (paste) the clipboard after cursor/current line
P                   put (paste) before cursor/current line
:set paste          avoid unexpected effects in pasting
:registers          display the contents of all registers
"xyw                yank word into register x
"xyy                yank line into register x
:[range]y x         yank [range] lines into register x
"xp                 put the text from register x after the cursor
"xP                 put the text from register x before the cursor
"xgp                just like "p", but leave the cursor just after the new text
"xgP                just like "P", but leave the cursor just after the new text
:[line]put x        put the text from register x after [line]

Emacs clipboard

SPC f y  yank file path
SPC f Y  yank file path from project
SPC i y  insert text from kill-ring (clipboard)
SPC n y  org export to clipboard
SPC n Y  org export to clipboard as rich text

Emacs Version Control (magit)

SPC g g   shows Magit status page, tab to expand/collapse headlines
SPC g     magit menu
SPC g l g list gists

Aviable in magit status:
?    list of available commands and help, q to close this help page

TAB  expand headlines in the status page
s    under “Unstaged changes” to stage a change
u    undo a stage
c    to commit, you can press q to quit the commit screen
b s  branch and spinoff to create another branch, rewinding the commits you made to master
b b  switch branches

t t  to create a tag, default place is the commit you are currently selecting
V    to select a change in a diff and x to discard that change (revert).
P    to push and then                 =p= to your remote or =u= to a another remote

@      for forge, configure it with M-x forge-pull
@ c p  to create a pull request with forge
  - select the base branch
  - then select the target branch
  - then provide a short description
  - C-c C-c to finish the pull request
  - now there will be a pull requests tab


C-x v    vc menu
C-x v =  vc diff

See also - https://magit.vc/manual/magit-refcard.pdf

Additional Emacs Packages

Org Mode

General

TAB          a section to fold a subtree (hide it)
S-TAB    to cycle through folded states

C-c C-z      to insert a note for a heading in org mode.
C-c C-c      to insert a tag for a heading in org mode.

SPC m        org menu
SPC X        to capture
SPC m r r    to refile

SPC m t      to change a status of a todo
SPC m o      setting a property.
SPC m q      add tag a headline

S-left|S-right   change the status of a todo as well (loop over statuses).

C-Return    to create a headline of the same type
M-up        lets you shift the position of the section
M-h|l       promotes, demotes a headline to the next level
S-up|down  will toggle the priority of tasks

SPC m x      org toggle checkbox
SPC o a      org agenda menu
    a - agenda, m - tag search, t - todo list

Links, Hyperlinks and more

SPC m l    add a link menu
SPC m l l  add a link to an org page, :: to specify a heading or a line number
SPC n l    stores a link to a particular headline (available when you add a link)

Examples: You can paste http links as well You can “link” some text with specific code SPC m l l elisp: (+ 2 2), when you click the link, emacs will evaluate the expression Show My Agenda List Files in directory

Defining custom Link Types - Whatch the video about custom links

These keybinding only work after installing org-roam. To install org roam edit your `init.el` file and add `(org +roam2)` in its designated place. Watch https://www.youtube.com/watch?v=AyhPmypHDEw to understand what org-roam is.

SPC n r f    Find an existing node or create a new one.
SPC n r i    Insert a link to another node.
SPC n r r    Toggle backlinks pane
SPC m m o t  Add a roam tag.
SPC m m o a  Add a roam alias.

Babel

SPC m '  edit inside the babel in another buffer.
SPC m k  org babel remove results

Python code with mathplotlib graph

import matplotlib
import matplotlib.pyplot as plt
fig=plt.figure(figsize=(3,2))
plt.plot([1,3,2])
fig.tight_layout()

fname = 'images/myfig.svg'
plt.savefig(fname)
fname # return this to org-mode

ob-spice

*Virtual Ground Test: opamp gain = 1000
vin in 0 dc 0V sin(0 0.1 100Hz)
r1 in inn 10k
r2 in inn 10k
EOpamp out 0 0 inn 1000
.tran 0.1ms 0.05s
.print tran v(in)
.meas tran vtest find v(in) at=0.04e-3
.end
.control
run
set gnuplot_terminal=png
gnuplot images/spice.png v(in) v(out) v(inn)
.endc

Evil Multiedit

Evil Lion

Evil Avy & Evil Snipe (not clear, maybe not working?)

  • You can remove a word with `g s SPC select-one-letter x select-the-removal-spot`
    • You can use `X` to stay in your original spot of search
  • You can go `g s space select-one-letter i select-the-correction-spot` to correct the spelling of the search
    • Install ispell on your OS first
  • You can `yank` a word from one place to another with `g s SPC select-one-letter y select-the-correction-spot-to-paste`
  • Use `t` to “teleport” the word from one place to another `g s SPC select-one-letter t select-the-correction-spot-to-teleport`

Notmuch

SPC o m  open notmuch

# notmuch workspace
SPC m c  compose email
SPC m d  mark as deleted
SPC m s  mark as spam
SPC m u  notmuch update
q        quick

Elfeed

Abbrev-mode

Ropemacs

tree-sitter

TRAMP

ReBuilder

Special Thanks

- need check

vim move inside camelCased words (pascal?)

unknown functional

`C-r+0` - in insert mode inserts the last yanked text, working in command mode `C-r+”` - in insert mode inserts clipboard, working in command mode

`gr[motion] grr` replace with register (yanked) motion / line

`_d` - ShowErrorDescription `[s ]s` - MoveStatementUp MoveStatementDown `_T` Refactor This Menu `_rg` Generate `_b` Bookmarks

Goto Test FindUsages SelectIn GotoFile GotoClass FileStructurePopup JumpToLastWindow `_yp _yl` QuickListPopupAction / Log `_yd _ya` Compare.LastVersion / Annotate `[q ]q` PreviousOccurence / NextOccurence `[m ]m` MethodUp / MethodDown `[c ]c` PrevChangeMarker / NextChangeMarker `,c ,r` - CompileDirty / Run `,R ,b` - RunAnything Debug `,c ,d` - RunClass / DebugClass `,t ,T` - RerunTests / RerunFailedTests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment