30/08/25 - NVIM Guide and LUKS¶
To Do:¶
- Make Markdown section a directory, it will likely get bigger like the other section was.
- I want to set up an automated system for my machine to create the new journal file every day something like,
if yymmdd.md does not exist, matching todays date, create it
and then get systemd to run it on boot.
Installing new plugins, enter the venv aand use pip install.
pip install mkdocs-macros-plugin
I'll make docs/markdown and change .pages
Opted for moving the markdown guide into 01-MkDocs, at least for now, as it would be in the only thing in a separate Markdown folder.
I've also created nvim.md to document how I use neovim.
Neovim Guide
# Editing Text Files
## NVIM
---
To edit my text files I use a program called neovim.
Neovim is an evolution of Vi, the better alternative to nano.
If I ever hear you talk about your Nano proficiency, then I am afraid that you are misinformed.
You should never use nano more than once, like for example to ***install neovim*** on Nix. <br>
Nano is a backup for when Vi does not work or is not installed.
Anyway, sorry if I offended you, you can do a lot of cool things with Neovim; it has plugins.
### NVChad
---
Currently I use the [NVChad](https://nvchad.com/docs/quickstart/install) setup, which you too can set up instantly with this command:
```
git clone https://github.com/NvChad/starter ~/.config/nvim && nvim
```
On some machines I have had issues with this command, usually because it relies on you having the same font installed as that guy. Or if you've already been messing with neovim on the machine before trying to install NVChad. <br>
But it usually works out of the box.
But it's nothing you can't overcome with a little googling.
With this, you will not just edit text, but be moving files, moving entire directories, renaming, deleting, everything you would have to leave nano to write a command, has a shortcut or a plugin on neovim. <br>
You seldom ever have to leave. And if you need to use the command-line, it still has you covered with the Alt-I keyboard shortcut, which will open a temporary miniature terminal in the centre of neovim.
---
### Usage
#### NerdTree
```
Ctrl+N
```
##### NerdTree Shortcuts
In the NerdTree window you can do multiple things:
- x: Cut
- c: Copy
- p: Paste
- o: Open
This makes it incredibly easy to re-organise repository structure and to change your current working file.
#### Terminal
```
Alt+I
```
#### Replace Text
```
:%s/searches/replaces
```
---
LUKS¶
```
Λ ~ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.8T 0 disk
└─sda1 8:1 0 1.8T 0 part /mnt/sda1
sdb 8:16 0 1.8T 0 disk
└─sdb1 8:17 0 1.8T 0 part /mnt/sdb1
sdc 8:32 0 931.5G 0 disk
zram0 253:0 0 4G 0 disk [SWAP]
nvme0n1 259:0 0 953.9G 0 disk
├─nvme0n1p1 259:1 0 1G 0 part /boot
└─nvme0n1p2 259:2 0 952.9G 0 part /
Λ ~ sudo mkdir /mnt/sdc 32 ↵
Λ ~ sudo mount /dev/sdc /mnt/sdc
mount: /mnt/sdc: unknown filesystem type 'crypto_LUKS'.
dmesg(1) may have more information after failed mount system call.
Λ ~
```
I encrypted these drives a few weeks ago with LUKS, but I don't encrypt things everyday, so I think a good idea to add to this site will be a guide on LUKS.
What I learned
That cryptsetup mounts the drive for you, you don't need to mount it after running the command.
sudo cryptsetup open /dev/sdc backupssd
[sudo] password for rory:
Enter passphrase for /dev/sdc:
Λ ~ sudo mount /dev/sdc /mnt/sdc
mount: /mnt/sdc: unknown filesystem type 'crypto_LUKS'.
dmesg(1) may have more information after failed mount system call.
Λ ~
Went through the last weeks notes and put help boxes to make it more readable and seperate what is mine.