Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Neovim Save File Key Mapping

~/.config/nvim/after/plugin/save-file-key-mapping.lua

-- Save a file with `s` in normal mode
vim.keymap.set('n', 's', ':wa<cr>', { desc = "Save File" })

-- Save file with hotkey 
vim.keymap.set('n', '<M-S>', ':wa<cr>', {desc = "Save file" })
vim.keymap.set('i', '<M-S>', '<ESC>:wa<cr>', {desc = "Save file" })