misc & cleanup
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
-- n, v, i, t = mode names
|
||||
|
||||
local function termcodes(str)
|
||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
||||
end
|
||||
|
||||
local M = {}
|
||||
|
||||
M.general = {
|
||||
@@ -20,8 +16,6 @@ M.general = {
|
||||
},
|
||||
|
||||
n = {
|
||||
["<ESC>"] = { "<cmd> noh <CR>", "no highlight" },
|
||||
|
||||
-- switch between windows
|
||||
["<C-h>"] = { "<C-w>h", "window left" },
|
||||
["<C-l>"] = { "<C-w>l", "window right" },
|
||||
@@ -38,16 +32,6 @@ M.general = {
|
||||
["<leader>n"] = { "<cmd> set nu! <CR>", "toggle line number" },
|
||||
["<leader>rn"] = { "<cmd> set rnu! <CR>", "toggle relative number" },
|
||||
|
||||
-- update nvchad
|
||||
["<leader>uu"] = { "<cmd> :NvChadUpdate <CR>", "update nvchad" },
|
||||
|
||||
["<leader>tt"] = {
|
||||
function()
|
||||
require("base46").toggle_theme()
|
||||
end,
|
||||
"toggle theme",
|
||||
},
|
||||
|
||||
-- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down>
|
||||
-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
|
||||
-- empty mode is same as using <cmd> :map
|
||||
@@ -61,7 +45,9 @@ M.general = {
|
||||
["<leader>b"] = { "<cmd> enew <CR>", "new buffer" },
|
||||
},
|
||||
|
||||
t = { ["<C-x>"] = { termcodes "<C-\\><C-N>", "escape terminal mode" } },
|
||||
t = {
|
||||
["<C-x>"] = { vim.api.nvim_replace_termcodes("<C-\\><C-N>", true, true, true), "escape terminal mode" },
|
||||
},
|
||||
|
||||
v = {
|
||||
["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "move up", opts = { expr = true } },
|
||||
@@ -96,9 +82,6 @@ M.tabufline = {
|
||||
"goto prev buffer",
|
||||
},
|
||||
|
||||
-- pick buffers via numbers
|
||||
["<Bslash>"] = { "<cmd> TbufPick <CR>", "Pick buffer" },
|
||||
|
||||
-- close buffer + hide terminal buffer
|
||||
["<leader>x"] = {
|
||||
function()
|
||||
|
||||
Reference in New Issue
Block a user