2023-02-28 02:27:44 +00:00
|
|
|
local vimp = require('vimp')
|
|
|
|
|
|
|
|
-- Map leader
|
|
|
|
vim.g.mapleader = " "
|
|
|
|
|
|
|
|
-- tabs and stuff
|
2023-03-03 06:53:59 +00:00
|
|
|
vimp.vnoremap("<C-b>", [[<C-a>]])
|
2023-02-28 02:27:44 +00:00
|
|
|
vimp.noremap("<Tab>", [[>gv]])
|
|
|
|
vimp.noremap("<S-Tab>", [[<gv]])
|
|
|
|
|
|
|
|
-- Remove search highlight on Enter
|
|
|
|
vimp.nnoremap("<CR>", [[:nohlsearch<CR><CR>]])
|
|
|
|
|
|
|
|
-- Don't lose selection on < or >
|
|
|
|
vimp.xnoremap("<", [[<gv]])
|
|
|
|
vimp.xnoremap(">", [[>gv]])
|
|
|
|
|
2023-03-03 06:48:47 +00:00
|
|
|
-- Toggle Lines
|
|
|
|
vimp.nnoremap({ 'silent' }, '<leader>l', function()
|
|
|
|
if vim.b.lnstatus == nil then
|
|
|
|
vim.b.lnstatus = "number"
|
|
|
|
end
|
|
|
|
if vim.b.lnstatus == "number" then
|
|
|
|
vim.o.number = false
|
|
|
|
vim.o.relativenumber = false
|
|
|
|
vim.b.lnstatus = "nonumber"
|
|
|
|
else
|
|
|
|
vim.o.number = true
|
|
|
|
vim.o.relativenumber = true
|
|
|
|
vim.b.lnstatus = "number"
|
|
|
|
end
|
|
|
|
end)
|