From ea086c2bb5c9ccab0b295872292b0b30cb55fb2b Mon Sep 17 00:00:00 2001 From: Christoph Wagner Date: Tue, 26 Mar 2024 21:09:38 +0100 Subject: [PATCH] new keymaps: best of primeagen --- init.lua | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 162f618f..e28003b6 100644 --- a/init.lua +++ b/init.lua @@ -190,6 +190,27 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- Meine eigenen Keymaps und Options +-- +vim.opt.shiftwidth = 4 +vim.opt.softtabstop = 4 +vim.opt.expandtab = true +-- +vim.keymap.set("n", "v", "") +-- nach komma einen zeilenumruch einfuegen +vim.keymap.set('n', 'ii', 'f,a') +vim.keymap.set('n', 'o', 'o') +vim.keymap.set('n', 'O', 'O') +vim.keymap.set("n", "", "zz") +vim.keymap.set("n", "", "zz") +-- visual block +vim.keymap.set("n", "v", "") +-- +vim.keymap.set("n", "bn", ":bNext") +-- besten keymaps aller zeiten +vim.keymap.set("v", "J", ":m '>+1gv=gv") +vim.keymap.set("v", "K", ":m '<-2gv=gv") + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -644,12 +665,12 @@ require('lazy').setup({ -- `friendly-snippets` contains a variety of premade snippets. -- See the README about individual language/framework/plugin snippets: -- https://github.com/rafamadriz/friendly-snippets - -- { - -- 'rafamadriz/friendly-snippets', - -- config = function() - -- require('luasnip.loaders.from_vscode').lazy_load() - -- end, - -- }, + { + 'rafamadriz/friendly-snippets', + config = function() + require('luasnip.loaders.from_vscode').lazy_load() + end, + }, }, }, 'saadparwaiz1/cmp_luasnip', @@ -837,6 +858,7 @@ require('lazy').setup({ -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` { import = 'custom.plugins' }, + { import = 'custom.functions' }, { import = 'basic.plugins' }, }, { ui = {