feat: vimux
This commit is contained in:
parent
3b0950e88b
commit
68f807ecf2
11 changed files with 118 additions and 65 deletions
dotfiles/neovim/lua/my
|
@ -1,20 +1,21 @@
|
|||
local helpers = require("my.helpers")
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.map(mode, lhs, rhs, opts)
|
||||
local options = {noremap = true}
|
||||
if opts then options = vim.tbl_extend('force', options, opts) end
|
||||
local options = helpers.mergeTables(opts, {noremap = true})
|
||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||
end
|
||||
|
||||
function M.mapSilent(mode, lhs, rhs, opts)
|
||||
local options = {silent = true}
|
||||
if opts then options = vim.tbl_extend('force', options, opts) end
|
||||
M.map(mode, lhs, rhs, opts)
|
||||
local options = helpers.mergeTables(opts, {silent = true})
|
||||
M.map(mode, lhs, rhs, options)
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
M.map("i", "jj", "<Esc>") -- Remap Esc to jj
|
||||
M.map("n", "<Space><Space>", ":w<cr>") -- Double space to sace
|
||||
M.map("n", "vv", "<C-w>v") -- Create vertical split
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue