diff options
author | justanothercatgirl <sotov2070@gmail.com> | 2023-12-04 19:49:07 +0300 |
---|---|---|
committer | justanothercatgirl <sotov2070@gmail.com> | 2023-12-04 19:49:07 +0300 |
commit | ff61e763b12badbf73f4e78b462c626ab206be1c (patch) | |
tree | b1f0c91ac8d4396a4e7f3081ea249afd2727a44d /.config/nvim/lua/user/remaps.lua | |
parent | 0397b0626dae6ae863b6d68b4a7970687eb39509 (diff) |
Changed some of lua & i3 seggings
* window navigation added to nvim
* i3 startup changes
* added sakura config
* added zerotierone scripts
co-authored-by: who-is-this-guy sotov2071@gmail.com
Diffstat (limited to '.config/nvim/lua/user/remaps.lua')
-rw-r--r-- | .config/nvim/lua/user/remaps.lua | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/.config/nvim/lua/user/remaps.lua b/.config/nvim/lua/user/remaps.lua index 742e967..a047392 100644 --- a/.config/nvim/lua/user/remaps.lua +++ b/.config/nvim/lua/user/remaps.lua @@ -7,34 +7,45 @@ local map = vim.api.nvim_set_keymap map("", "\\", "<Nop>", opt) vim.g.mapleader = "\\" --- some minor commands -map("c", "w!!", "w !sudo tee % > /dev/null", opt) -- remap j and k --- i refuse to elaborate +-- I refuse to elaborate map("n", "j", "<Up>", opt) map("n", "k", "<Down>", opt) +map("n", "dj", "d<Up>", opt) +map("n", "dk", "d<Down>", opt) -- window navigation -map("n", "<C-l>", "<C-w>l", opt) map("n", "<C-j>", "<C-w>k", opt) -- SWITCHED K AND J map("n", "<C-k>", "<C-w>j", opt) -- SWITCHED K AND J +map("n", "<C-l>", "<C-w>l", opt) map("n", "<C-h>", "<C-w>h", opt) +-- buffer navigation +map("n", "gn", ":bn<Cr>", opt) +map("n", "gp", ":bp<Cr>", opt) + -- Insert mode navigation map("i", "<C-h>", "<Left>", opt) map("i", "<C-j>", "<Up>", opt) -- SWITCHED K AND J map("i", "<C-k>", "<Down>", opt) -- SWITCHED K AND J map("i", "<C-l>", "<Right>", opt) +map("i", "<C-w>", "<C-Right>", opt) +map("i", "<C-W>", "<Esc>Wi", opt) +map("i", "<C-b>", "<C-Left>", opt) +map("i", "<C-B>", "<Esc>Bi", opt) + +-- Terminal mode +map("t", "<Esc>", "<C-\\><C-n>" , opt) -- lexer options..? -map("n", "<leader>e", ":Lex 49<cr>", opt) +map("n", "<leader>e", ":NERDTreeToggle<CR>", opt) -- resizing options -map("n", "<C-Left>", ":vertical resize -5<cr>", opt) -map("n", "<C-Up>", ":resize +5<cr>", opt) -map("n", "<C-Right>", ":vertical resize +5<cr>", opt) -map("n", "<C-Down>", ":resize -5<cr>", opt) +map("n", "<C-Left>", ":vertical resize -4<cr>", opt) +map("n", "<C-Up>", ":resize +1<cr>", opt) +map("n", "<C-Right>", ":vertical resize +4<cr>", opt) +map("n", "<C-Down>", ":resize -1<cr>", opt) -- better indentation map("v", "<", "<gv", opt) @@ -45,14 +56,19 @@ map("n", "<A-j>", ":m .-2<CR>==", opt) -- SWITCHED K AND J map("n", "<A-k>", ":m .+1<CR>==", opt) -- SWITCHED K AND J -- duplicating lines -map("n", "<C-Up>", ":.,.t.-1<CR>==", opt) -map("n", "<C-Down>", ":.,.t.<CR>==", opt) +map("n", "<C-A-Up>", ":.,.t.-1<CR>==", opt) +map("n", "<C-A-Down>", ":.,.t.<CR>==", opt) -- leader remaps -map("n", "<leader>/", ":nohlsearch<CR>", opt) -- discard search highlighting -map("n", "<leader>T", ":term<CR>", opt) -- open terminal fullscreen with \T -map("n", "<leader>t", ":vsplit term <CR>", opt) -- split to terminal with \t -map("n", "<leader>pl", ":Lazy<CR>", opt) -- open plugin manager +map("n", "<leader>/", ":nohlsearch<CR>", opt) -- discard search highlighting +map("n", "<leader>t", ":split<CR>:terminal<CR>:resize 4<CR>", opt) -- open terminal fullscreen with \T +map("n", "<leader>T", ":vsplit<CR>:terminal<CR>", opt) -- split to terminal with \t +map("n", "<leader>pl", ":Lazy<CR>", opt) -- open plugin manager -- miscellaneous -map("n", "<leader>relaod", ":luafile ~/.config/nvim/lua/init.lua", {noremap = false}) +map("c", "w!!", "w !sudo tee % > /dev/null", opt) + +-- better G and gg +map("n", "G", "G$", opt) +map("n", "gg", "gg0", opt) + |