From a67c7532cbfd40521c2e454febb7d1510f8c2ad9 Mon Sep 17 00:00:00 2001 From: shaoyu Date: Tue, 12 Nov 2024 18:06:31 -0500 Subject: [PATCH] Add keymaps --- init.lua | 2 +- lazy-lock.json | 1 + lua/core/keymaps.lua | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 lua/core/keymaps.lua diff --git a/init.lua b/init.lua index 3722c069..33974f04 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,4 @@ +require 'core.keymaps' --[[ ===================================================================== @@ -918,7 +919,6 @@ require('lazy').setup({ -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, - -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and -- place them in the correct locations. diff --git a/lazy-lock.json b/lazy-lock.json index 45b89367..bfe323ec 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -31,6 +31,7 @@ "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "themery.nvim": { "branch": "main", "commit": "15c29229e9a25655587462c8c64a62d9aadf0a92" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "tokyonight.nvim": { "branch": "main", "commit": "ce91ba480070c95f40753e4663e32b4632ac6db3" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, diff --git a/lua/core/keymaps.lua b/lua/core/keymaps.lua new file mode 100644 index 00000000..206050cf --- /dev/null +++ b/lua/core/keymaps.lua @@ -0,0 +1,11 @@ +local opts = { noremap = true, silent = true } + +--Resize with arrows +vim.keymap.set('n', '', ':resize +2', opts) +vim.keymap.set('n', '', ':resize -2', opts) +vim.keymap.set('n', '', ':vertical resize -2', opts) +vim.keymap.set('n', '', ':vertical resize +2', opts) + +--Stay in indent mode +vim.keymap.set('v', '<', '', '>gv', opts)