Skip to content

Commit

Permalink
feat(nvim): add keymap for toggling buffer's modifiabilty
Browse files Browse the repository at this point in the history
  • Loading branch information
uyha committed Nov 1, 2023
1 parent 53d557c commit 919fa00
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nvim/lua/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", { silent = true })

vim.keymap.set("n", "D", "0d$", { silent = true })
vim.keymap.set("n", "C", "0c$", { silent = true })

vim.keymap.set("n", "<M-r>", function()
vim.bo.modifiable = not vim.bo.modifiable
vim.notify("Modifiable: " .. tostring(vim.bo.modifiable))
end)

0 comments on commit 919fa00

Please sign in to comment.