This is where I will maintain all the useful keybindings that I find along the way. It is also a first attempt at using org Mode
Not really keybindings but how to configure any repository with a token based system. As this org file itself will go into the repository it feels like an OK place to put it. Maybe it will be moved later.
Github can be accessed using a global cache app, we will use gh at GitHub - cli/cli: GitHub’s official command line tool
gh auth login
- [ ] After running this you will be asked if you are committing to Github.com or enterprise. Select Github.com doh.
- [ ] Now select HTTPS.
- [ ] Say yes to authenticate Git with your GitHub credentials.
- [ ] For the moment select ‘Paste an authentication token’.
- [ ] For this log into github click on your profile then goto to Settings->Developer Settings->Personal access tokens->Generate a personal accesstoken.
- [ ] Enter your password.
- [ ] When you are asked what the token is for put something that makes sense to you like ‘github access’
- [ ] Select an expiration period you are happy with, typically a year for me.
- [ ] Checkmark repo scope
- [ ] Checkmark workflow scope
- [ ] Checkmark read:org scope
- [ ] Checkmark delete repo scope
Make sure to copy this token wisely and paste into the gh command from above as you will not see it again
Will switch to this Connecting to GitHub with SSH - GitHub Docs
Some VSCodium stuff
3 Easy Steps to Folding Docstrings in VSCode | by Graham Harrison | Towards D…
VSCode Productivity tips: committing code with the Magit plugin - YouTube
Some vim stuff
u - undo C-R (:redo) - redo
Alt-x whitespace-mode - toggle for buffer, does nothing in org mode
C-x C-+ - Increase font size C-x C– - Decrease font size
“How can I try Emacs Lisp code?”
SP-n-d - *n*otes *d*eft
TODO: Looks like you can search across multiple org files super quick and maybe split them for blogs etc, that way.
Setting Up Deft Mode in Emacs with Org-Mode · jonathanchu.is
Getting started It’s Magit! A Git Porcelain inside Emacs
Magit introduction and Demonstration Magit Introduction and Demonstration - YouTube
Good use within emacs Productive Emacs: Magit - YouTube Which also references Git - Book How to use Magit to manage Git projects | Opensource.com
Any of the git options can be toggled an option greyed out is an option that is not being sent to git
SP-g-g (C-x-g) - Git status equivalent SP-g-G - Git status here
TAB - View diff
Hitting commit brings up a popup where we can define how we want to commit, for example
-a - commit –all
Once the options are selected we need to perform an action which is c for Commit
After writing our commit message we hit C-c C-c to do the actual comit
It is possible to hit C-t to save the options we have made as the default
P - will give options for push
If a push fails, simply hit the $ sign to see what it was
When you do a status and there is not git folder Magit will ask if one should be created, so you can say yes
SH-f - fetch any outstanding changes not local
? - will show help
g - refresh current buffer if you change something outside Emacs G - refresh all Magit buffers
like org mode TAB will collapse sections within magit
Outline, note taking, todo list utilty
Emacs for Distraction-Free Writing
If you cannot remember a keybinding you can hit Alt-x org-toggle-item for example and you will see binding.
Lists are unordered with - or + and ordered with number
C-<return> gives you whatever you are doing on this line on the next
Eventually will use one of these Blogs and Wikis with Org A
This is in the running ox-hugo - Org to Hugo exporter I do like this for generating Gatsby site also GitHub - orgapp/orgajs: parse org-mode content into AST
C-c C-, - hitting s for source
This is equivalent to snippets for code
SPC-i-s - *i*insert *s*nippet
For example if we chose bang we would get first line of typical bash file as below
#!/usr/bin/env bash
other useful licence - MIT etc licencing time - current time pi - insert pi
Alt-x org-schedule to read about it
SP-m-d-s - *m*ode *d*ate *s*chedule see Org Mode Basics In Doom Emacs - YouTube
Typing TODO will create a todo item in a heading
remember to use C-<Return> for another todo
SH-LA - remove todo SH-RA - make todo SPC-m-t - *m*ode *t*oggle (allows switching to TODO, IDEA, KILL, etc) see Org Mode Basics In Doom Emacs - YouTube
[ ] Creates a checkbox. In a list remember to use C-<Enter> so that it repeats the checkbox on next line
- [ ] Eggs
- [ ] Cash
- [ ] Beer
You can create a running total with [/] or [%] as below
[0/3]
- [ ] One
- [ ] Two
- [ ] Three
/Hitting RET will toggle checkbox, you could also use emacs C-c C-c /
[33%]
- [X] One
- [ ] Two
- [ ] Three
/Hitting RET will toggle checkbox, you could also use emacs C-c C-c /
SPC-o-A - *o*pen *A*genda see Org Mode Basics In Doom Emacs - YouTube
need to put the document we are working on in the agenda
C-c-[ - put file at the front of the agenda
Start typing using | to separate columns
Name | Phone | Age |
Johnathan | 0102345 | 29 |
C-Return will create another row
SPC-m-b– - *m*ode *b*anner in the row you want to make banner, as below
Name | Phone | Age |
---|---|---|
Johnathan | 0102345 | 29 |
SH-RET - duplicate a column
Name | Phone | Age |
---|---|---|
Johnathan | 0102345 | 29 |
Johnathan |
Alt-[j,k] - moves rows around Alt-[h,l] - moves columns around Alt-SH-j - create new row above current Alt-SH-k - delete row Alt-SH-l - create column to left of current Alt-SH-h - delete column
v-a-e - *v*isual *a*round *e*lement v-a-R - *v*isual *a*round *r*egion d-a-e - *d*elete *a*round *e*lement d-a-R - *d*elete *a*round *r*egion y-i-R - *y*ank *i*nner *r*egion
h, j, k, l - navigate
g-[j,k] - goto next/previous fold at same level
g-h - go out one level
g-[h,l] - goto next/previous child at same level
TAB - fold line SH-TAB - fold entire doco z-c - Fold*z* c*lose z-o - Fold*z o*pen z-M - Fold*z m*imimise z-R - Fold*z *r*eopen
Alt-x ord-info : General help
SP-m-h - *m*odulate a *h*eading Alt-h - Move heading left Alt-l - Move heading right Alt-j - Move heading down Alt-k - Move heading up Alt-SH-[h,j,k,l] - Move without pulling the rest of the tree
SP-m-i - [m]odulate an [i]tem C-RET - will continue list
Org Mode Basics In Doom Emacs - YouTube
Getting Started With Org Mode - YouTube
If you make changes to config.el then you do not need to do a “doom sync” but if you change package.el or init.el you do need to.
FAQs - doom-emacs/faq.org at develop · hlissner/doom-emacs · GitHub
SP : - Emacs M-x You can start typing and you will see a list such as link
SP-h - Bring up help SP-h-d-s - Help search documentation SP-h-p - help Doom packages
SP-w-v - Split vertical (emacs equivalent :vs) SP-w-s - Horizontal split SP-w-c - Close SP-w-q - Quit, same as close I think SP-w-w - Switch between windows toggling SP-w-[h,j,k,l] - Switch using arrow VIM keys SP-w = - Make all windows equal size SP-w > - Move window right edge right SP-w < - Move window right edge left SP-w + - Move window bottom down SP-w - - Move window bottom up
SP-p-p - Switch to project SP-p-o - Open through tree
SP-. - Open up a file (usually not in a project) SP-o-p - Open in sidebar (treemacs at the moment)
SP-m-l-c - *m*ode *l*ink from *c*lipboard SP-m-l-i - *m*ode *l*ink *i*ndex ( index/store a link in file so it can be later linked ) SP-m-l-l - *m*ode *l*ink *l*ink ( link the link )
SP-RET - Goto or create bookmarks
These are placeholders for things. Everytime you open a file it has a buffer or special place. Not just files have buffers, the sidebar side viewer has a buffer, a scratchpad, email client, a shell
SP-b-b (SP ,) - List buffers I have dealt with in the workspace we’ve been working on SP-b-B (SP <) - show all buffers when you look at all buffers you will see some with asterisks they are things like scratch - somewhere to doodle Messages - stuff about what has happened within doom emacs
A single SP now will reveal even more buffers. Things like neo tree SP-b-n - Next buffer SP-b-N - New buffer when we have a new buffer we need to put something in it so we copuld use SP . to select a file SP-b-s - save buffer SP-b-k - kill buffer
- [ ] Magit
- [ ] Org Mode
- [ ] MU4e (email client)
- [ ] eww (web browser)
- [ ] Haskell
* Bookmarks, Buffers and Windows in Doom Emacs - YouTube
- [ ] Neotree