nvim mapping
This commit is contained in:
@@ -30,7 +30,7 @@ vim.call('plug#end')
|
||||
|
||||
-- move config and plugin config to alternate files
|
||||
require("config.theme")
|
||||
--require("config.mappings")
|
||||
require("config.mappings")
|
||||
require("config.options")
|
||||
--require("config.autocmd")
|
||||
|
||||
|
||||
33
private_dot_config/nvim/lua/config/mappings.lua
Normal file
33
private_dot_config/nvim/lua/config/mappings.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
-- mappings, including plugins
|
||||
|
||||
local function map(m, k, v)
|
||||
vim.keymap.set(m, k, v, { noremap = true, silent = true })
|
||||
end
|
||||
|
||||
-- buffers
|
||||
map("n", "<S-l>", ":bnext<CR>")
|
||||
map("n", "<S-h>", ":bprevious<CR>")
|
||||
map("n", "<leader>q", ":BufferClose<CR>")
|
||||
map("n", "<leader>Q", ":BufferClose!<CR>")
|
||||
map("n", "<leader>U", "::bufdo bd<CR>") --close all
|
||||
map("n", "<leader>vs", ":vsplit<CR>:bnext<CR>") --ver split + open next buffer
|
||||
|
||||
-- buffer position nav + reorder
|
||||
map("n", "<AS-h>", "<Cmd>BufferMovePrevious<CR>")
|
||||
map("n", "<AS-l>", "<Cmd>BufferMoveNext<CR>")
|
||||
map("n", "<A-1>", "<Cmd>BufferGoto 1<CR>")
|
||||
map("n", "<A-2>", "<Cmd>BufferGoto 2<CR>")
|
||||
map("n", "<A-3>", "<Cmd>BufferGoto 3<CR>")
|
||||
map("n", "<A-4>", "<Cmd>BufferGoto 4<CR>")
|
||||
map("n", "<A-5>", "<Cmd>BufferGoto 5<CR>")
|
||||
map("n", "<A-6>", "<Cmd>BufferGoto 6<CR>")
|
||||
map("n", "<A-7>", "<Cmd>BufferGoto 7<CR>")
|
||||
map("n", "<A-8>", "<Cmd>BufferGoto 8<CR>")
|
||||
map("n", "<A-9>", "<Cmd>BufferGoto 9<CR>")
|
||||
map("n", "<A-0>", "<Cmd>BufferLast<CR>")
|
||||
map("n", "<A-p>", "<Cmd>BufferPin<CR>")
|
||||
|
||||
-- misc
|
||||
--map("n", "<leader>s", ":%s//g<Left><Left>") --replace all
|
||||
map("n", "<leader>t", ":NvimTreeToggle<CR>") --open file explorer
|
||||
map("n", "<leader>l", ":Twilight<CR>") --surrounding dim
|
||||
Reference in New Issue
Block a user