2022-06-25 11:39:40 +02:00
|
|
|
---
|
2023-02-23 14:48:51 +01:00
|
|
|
title: "Doom Emacs"
|
2022-11-19 15:25:20 +01:00
|
|
|
visible: true
|
2022-06-25 11:39:40 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
[toc]
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
## Keybindings
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
### Minimap
|
2023-02-23 14:48:51 +01:00
|
|
|
|
|
|
|
`SPC t m`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### Dired
|
2023-02-23 14:48:51 +01:00
|
|
|
|
|
|
|
Provides directory view
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Create new directory within the current directory
|
2023-02-23 14:48:51 +01:00
|
|
|
`Shift +`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Create new file in current directory
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC . <enter new file name>`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Delete files or directories
|
2023-02-23 14:48:51 +01:00
|
|
|
`d`, `x`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Unselect
|
2023-02-23 14:48:51 +01:00
|
|
|
`u`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### Treemacs
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
Toggle view of directory structure of the current project on the side.
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC o p`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### Term
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
Open terminal
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC o t`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### Window management
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
Open window right of current window
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC w v`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Open window below current window
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC w s`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Move to other windows
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC h/j/k/l`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### Buffers
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
Open recent within the same project buffers
|
|
|
|
`SPC b b`
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC ,`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Remove buffers
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC b k`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Open new empty buffer
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC b N`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Save buffer
|
2023-02-23 14:48:51 +01:00
|
|
|
`SPC b s`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### Quickly move to start/end of a document
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
Start of document
|
2023-02-23 14:48:51 +01:00
|
|
|
`gg`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
End of document
|
2023-02-23 14:48:51 +01:00
|
|
|
`G`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### Evil Snipe
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
Move to next occurence of one letter
|
2023-02-23 14:48:51 +01:00
|
|
|
`f (letter)`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
Move to previous occurence of one letter
|
2023-02-23 14:48:51 +01:00
|
|
|
`F (letter)`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
`;` continue in that direction
|
2023-02-23 14:48:51 +01:00
|
|
|
`,` go in the opposite direction
|
2022-06-25 11:39:40 +02:00
|
|
|
|
2023-02-23 14:48:51 +01:00
|
|
|
`s (letter)` or `S (letter)` for occurences of two letters
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### Indent selection
|
2023-02-23 14:48:51 +01:00
|
|
|
|
|
|
|
Press `CTRL x` followed by `TAB` and use h/l to indent text
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### SSH Editing
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
`SPC f f`
|
|
|
|
Enter `/ssh:`
|
|
|
|
Press `TAB` to show available options
|
2023-02-23 14:48:51 +01:00
|
|
|
Enter new options with the following syntax: `/ssh:root@albedo.realstickman.net:/`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
#### Privilege elevation
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
Execute sudo after establishing the connection
|
2023-02-23 14:48:51 +01:00
|
|
|
`/ssh:nonroot@albedo.realstickman.net|sudo:nonroot@albedo.realstickman.net:/`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
## Windows installation
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
### git
|
2023-02-23 14:48:51 +01:00
|
|
|
|
|
|
|
Go to the [git homepage](https://git-scm.com/) and install it.
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### emacs
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
Go to the [emacs homepage](https://www.gnu.org/software/emacs/) and install it.
|
2023-02-23 14:48:51 +01:00
|
|
|
Add the `(location)\emacs\x86_84\bin` directory to your PATH in the environment variables.
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
#### Shortcut
|
2023-02-23 14:48:51 +01:00
|
|
|
|
2022-06-25 11:39:40 +02:00
|
|
|
Create a shortcut to `(location)\emacs\x86_64\bin\runemacs.exe`
|
2023-02-23 14:48:51 +01:00
|
|
|
Edit the shortcut to execute in your home directory `C:\Users\(user)`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### HOME
|
|
|
|
|
2023-02-23 14:48:51 +01:00
|
|
|
Add the path to your home to the environment variables.
|
|
|
|
|
|
|
|
New variable -> HOME -> `C:\Users\(user)`
|
2022-06-25 11:39:40 +02:00
|
|
|
|
|
|
|
### doom-emacs
|
2023-02-23 14:48:51 +01:00
|
|
|
|
|
|
|
Open git bash
|
|
|
|
|
|
|
|
```sh
|
2022-06-25 11:39:40 +02:00
|
|
|
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
|
|
|
|
~/.emacs.d/bin/doom install
|
|
|
|
```
|
|
|
|
|
2023-02-23 14:48:51 +01:00
|
|
|
Add `C:\Users\(user)\.emacs.d\bin` to your PATH.
|
2022-06-25 11:39:40 +02:00
|
|
|
|
2023-02-23 14:48:51 +01:00
|
|
|
_Currently doesn't show emotes_
|
|
|
|
_Missing ripgrep and fd_
|