nvim: Add function to disable line numbering.
This commit is contained in:
parent
6f0ac0e75e
commit
1bac8ab0ed
@ -4,9 +4,17 @@ vim.env.SHELL = "/bin/bash"
|
||||
-- disable mouse
|
||||
vim.opt.mouse = ""
|
||||
|
||||
-- line numbering
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.g.linenumbers = true
|
||||
vim.opt.number = vim.g.linenumbers
|
||||
vim.opt.relativenumber = vim.g.linenumbers
|
||||
|
||||
function toggle_line_numbering()
|
||||
vim.g.linenumbers = not vim.g.linenumbers
|
||||
vim.opt.number = vim.g.linenumbers
|
||||
vim.opt.relativenumber = vim.g.linenumbers
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "ä", ":lua toggle_line_numbering()<CR>")
|
||||
|
||||
vim.opt.encoding = "utf-8"
|
||||
vim.opt.fileencoding = "utf-8"
|
||||
|
Loading…
Reference in New Issue
Block a user