Refactoring
- Added macos
This commit is contained in:
parent
03a7616e8c
commit
2c1ccaffd1
47 changed files with 76 additions and 33 deletions
59
global/.config/nvim/lua/core/keymaps.lua
Normal file
59
global/.config/nvim/lua/core/keymaps.lua
Normal file
|
@ -0,0 +1,59 @@
|
|||
local mapkey = require("utils.keymapper").mapvimkey
|
||||
|
||||
-- Buffer Navigation
|
||||
mapkey("<leader>bn", "bnext", "n") -- Next buffer
|
||||
mapkey("<leader>bp", "bprevious", "n") -- Prev buffer
|
||||
mapkey("<leader>bb", "e #", "n") -- Switch to Other Buffer
|
||||
mapkey("<leader>`", "e #", "n") -- Switch to Other Buffer
|
||||
mapkey("<leader>bc", "bd", "n") -- Close the buffer
|
||||
|
||||
-- Directory Navigatio}n
|
||||
mapkey("<leader>m", "NvimTreeFocus", "n")
|
||||
mapkey("<leader>e", "NvimTreeToggle", "n")
|
||||
|
||||
-- Pane and Window Navigation
|
||||
mapkey("<C-h>", "<C-w>h", "n") -- Navigate Left
|
||||
mapkey("<C-j>", "<C-w>j", "n") -- Navigate Down
|
||||
mapkey("<C-k>", "<C-w>k", "n") -- Navigate Up
|
||||
mapkey("<C-l>", "<C-w>l", "n") -- Navigate Right
|
||||
mapkey("<C-h>", "wincmd h", "t") -- Navigate Left
|
||||
mapkey("<C-j>", "wincmd j", "t") -- Navigate Down
|
||||
mapkey("<C-k>", "wincmd k", "t") -- Navigate Up
|
||||
mapkey("<C-l>", "wincmd l", "t") -- Navigate Right
|
||||
mapkey("<C-h>", "TmuxNavigateLeft", "n") -- Navigate Left
|
||||
mapkey("<C-j>", "TmuxNavigateDown", "n") -- Navigate Down
|
||||
mapkey("<C-k>", "TmuxNavigateUp", "n") -- Navigate Up
|
||||
mapkey("<C-l>", "TmuxNavigateRight", "n") -- Navigate Right
|
||||
|
||||
-- Window Management
|
||||
mapkey("<leader>sv", "vsplit", "n") -- Split Vertically
|
||||
mapkey("<leader>sh", "split", "n") -- Split Horizontally
|
||||
mapkey("<C-Up>", "resize +2", "n")
|
||||
mapkey("<C-Down>", "resize -2", "n")
|
||||
mapkey("<C-Left>", "vertical resize +2", "n")
|
||||
mapkey("<C-Right>", "vertical resize -2", "n")
|
||||
|
||||
-- Show Full File-Path
|
||||
mapkey("<leader>pa", "echo expand('%:p')", "n") -- Show Full File Path
|
||||
|
||||
-- Notes
|
||||
mapkey("<leader>ng", "Neorg workspace general", "n")
|
||||
mapkey("<leader>nw", "Neorg workspace work", "n")
|
||||
mapkey("<leader>ny", "Neorg workspace youtube", "n")
|
||||
|
||||
-- Indenting
|
||||
vim.keymap.set("v", "<", "<gv", { silent = true, noremap = true })
|
||||
vim.keymap.set("v", ">", ">gv", { silent = true, noremap = true })
|
||||
|
||||
local api = vim.api
|
||||
|
||||
-- Zen Mode
|
||||
api.nvim_set_keymap("n", "<leader>zn", ":TZNarrow<CR>", {})
|
||||
api.nvim_set_keymap("v", "<leader>zn", ":'<,'>TZNarrow<CR>", {})
|
||||
api.nvim_set_keymap("n", "<leader>sm", ":TZFocus<CR>", {})
|
||||
api.nvim_set_keymap("n", "<leader>zm", ":TZMinimalist<CR>", {})
|
||||
api.nvim_set_keymap("n", "<leader>za", ":TZAtaraxis<CR>", {})
|
||||
|
||||
-- Comments
|
||||
api.nvim_set_keymap("n", "<C-_>", "gtc", { noremap = false })
|
||||
api.nvim_set_keymap("v", "<C-_>", "goc", { noremap = false })
|
Loading…
Add table
Add a link
Reference in a new issue