Because GitHub’s render is inconsistent with real emacs experience, it is recommended that you download this file and open it in Emacs. Another HTML version of this org file, made with org-html-themes, is also available here. This render, too, doesn’t offer what you experience with Emacs.
C- “Control” keyM- “M” or “option/alt” keys- “Command” keySPC- “Space” key
SPC f sfor saving the current fileSPC :for entering a commandSPC q qto close EmacsSPC f Dto delete this file
SPC p pto open a projectSPC SPCto open a file in a projectSPC o pto open the file explorerSPC o eto open the shell in fullscreenSPC o Eto open the shell in a popup windowSPC f rrecently visited filesSPC f Rrecently visited files in a projectM-x projectile-discover-projects-in-directoryto find projects within given folder using ProjectileM-x projectile-discover-projects-in-search-pathto find projects in the folder defined by theprojectile-project-search-pathvariable using Projectile
- Dired (Directory Editor) is how you interfaces with a directory
- Press
C-x dto open dired. - Use
RETto go to a folder or open a file. - Use
-for going one folder back - Use
+for creating a new directory - Use
dto mark the files for deletion, pressxto delete. - Use
Mto change permissions - Use
oto sort by modes. - Use
Oto change the owner. - Use
mto mark anduto unmark files or directories. Uto unselect all- Use
tto invert the selection. tto switch between files and directories- Use
Cto copy. - Use
Rto move. - Move with
h,j,k,l - Toggle
(for simple view SPC .to create or find a file*to select all directories.Ccopy to another windowRmove to another windowdired-do-what-i-mean-targetset to trueito edit file/dir name
- Buffers are a special concept in emacs they can be terminals, files, directories, etc
SPC b bto open another buffer- workspace buffer
SPC b Byou can see all the bufferSPC ,to switch buffers (its an alias)SPC SHIFT ,to switch to all buffersSPC b XYou can create a scratch bufferSPC b sto save and name itCTRL w vwindow split verticallyCTRL w swindow split horizonalCTRL w wto switch windows- You can use the vim motion keys to navigate between open windows
- Windows are panes in your screen
CTLR + =to make the windows equal size
SPC f pto open the config.- To add a package, add the package to
.doom.d/package.el - Then close and
doom refresh - Then go to
.doom.d/config.elto configure the package def-package!is a macro you can use to configure packagesspace h helpyou can look up method man pages:initis used for setting the package up:configto set configuration after the package has been initialized:afterlets you set which package it should load after
- You can use
:after!to configure packages that are already there
fand then the letter you want to navigate to.,will go backward;will go forward after that “find”
tto find and move cursor to the charachter before what you’ve searched.vputs you in visual mode. You can select text by withv t some-char-you-navigate-toorv f some-char-you-navigate-to;to jump to the next find,to jump to the previous onesto snipe
- Evil-snipe lets you go to all the occuranses in your document
g s SPCto use avy and going to a certain word in file.tis the same thing except for a character you want to jump to before the one you insertsto do a double character search- Evil-snipe will remember your last search so
,and;will navigate ForTto go backwardsg s SPCand then select the letter that avy gives you to navigate to that spot- These letters are on your home row so they are easy to click
SPC h vfor variable, to set the avy variable to search all open windowsavy-all-windowslets you search in all windows open.
- You can remove a word with
g s SPC select-one-letter x select-the-removal-spot- You can use
Xto stay in your original spot of search
- You can use
- You can go
g s space select-one-letter i select-the-correction-spotto correct the spelling of the search- Install ispell on your OS first
- You can
yanka word from one place to another withg s SPC select-one-letter y select-the-correction-spot-to-paste - Use
tto “teleport” the word from one place to anotherg s SPC select-one-letter t select-the-correction-spot-to-teleport
- Make selections and then edit those selections interactively
M dwill select the current word, and again will find another occuranceM Dwill find the occurence upward- You can use a visual selection to select multiple words.
Rwill select all occurancesCTRL nfor next selectionCTRL pfor previous- Exclude matches with
RET - You can make an edit and the changes will be reflected in all the selection
- Org mode gives you structure to your document
*for a h1**for an h2 and so on- You can
TABa section to fold a subtree (hide it) - You can use
SHIFT TABto cycle through folded states CTRL returnto create a headline of the same typeM arrow uplets you shift the position of the sectionM hpromotes a headline to the next levelM ldemotes- You can create lists
- onw
- 2
- wooo
- 3
SPC m lto add a link to an org page- You can add
::to specify a heading or a line number - You can paste http links as well
- You can “link” some text with specific code
SPC m lelisp: (+ 2 2) when you click the link, emacs will evaluate the expression - Show My Agenda
- List Files in directory
SPC n lstores a link to a particular headline
SPC i sfor inserting code snippets- Example:
(+ 2 3 4 5)
- Example:
C-c C-cto execute the code.SPC m 'to edit inside the babel in another buffer.- Results will show up in a
##+RESULTSheader - This feature is called Babel
- One snippet can consume the output of another snippet
- You can create your own snippets in the following directory:
~/.doom.d/snippets/
- Create a task by prefixing any heading with
TODO DONEmeans the task is done- You can create your custom key words by changing this variable:
org-todo-keywords- remember you can get to your variables through
SPC h v(M-x counsel-describe-variable) - These values are already set in Doom:
((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "KILL(k)") (sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)"))
- remember you can get to your variables through
SPC m tto change a status of a todoSHIFT leftandSHIFT rightcan be used to change the status of a todo as well.- If you finish a task with a command, org mode will add a date that you “closed” the task.
SPC o a tto open the agenda -> todo listqto quitorg-agenda-filesis a variable you can set to filter which files agenda searches for todos in.
SHIFT upandSHIFT downwill toggle the priority of tasksorg-fancy-prioritiesgives you fancy looking priorities
- Tags can be attached to any headlines
SPC m qto tag a headline- Example:
- TODO play more games :fun:
- Tags are hierarchical so nested headings will be tagged with the parent header tag
org-tag-sparce-treewill search for headings that only have a specific tag
SPC m ois used for setting a property.
- You can use categories to change the label in agenda view.
- If you want to keep track of your habits using org mode, you can set the
STYLEproperty to habit.- If you want to set a category (for chani
- Two types of lists, ordered and unordered lists
SHIFT rightandSHIFT leftcan be used to change the type of lists.
- You can also change an unorded list by changing the first item to 1. and then typing
C-c C-cand vice verca.
- [ ] This is still todo
- [-] This is in progress
- [X] This is a done task
- [-] Task 1
- [X] Task 2
- You can do this by adding [/] to the heading and pressing
C-c C-c - You can’t assign a tag or a priority
- magit is configured for you
SPC g gto show Magit status Page- most commands are done from the status page
- press
?to see what you can do git add -plets you stage in hunks- Open and close with the
TAB - Open diff view for a file with
TAB sto stage a changeuto undo a changecto commitb sfor branch and spinoff to create another branch, rewinding the commits you made to masterb bto switch branches
t tto create a tag, default place is the commit you are currently selectingVto select a change in a diff andxto discard that change.sto stagecto commit, you canqto quit the commit screenPto push and thenpto your remote oruto a another remote
- Forge is installed in emacs doom
@for forge- Set up forge with
M x forge-pull- the first time you will get a token from github
@ c pto create a pull request with forge- select the base branch
- then select the target branch
- then provide a short description
CTRL c CTRL cto finish the pull request
- Now there will be a
pull requeststab
- Set up vterm in your init.el file.
SPC o Tfor opening vterm
- Set up neotree in your init.el file.
SPC o pfor neotree
C-c C-zto insert a note for a heading in org mode.
- Note taken on [2020-12-18 Fri 21:52]
Like this!
C-c C-cto insert a tag for a heading in org mode.
SPC Xto capture (the new thing gets caputured to a single file but that’s fine since we can easily refile it.)SPC m r rto refile
SPC m m tto put roam tags on an org file.
- Link to youtube video series
- This org file is mostly from the notes taken from the series above by ianjones.us
- [ ] Org-journal
- [ ] Org Roam
- [ ] abbrev-mode
- [ ] Org-super-agenda