From 89d92d0d7c8dbed36a1c3dc7d9ce66dcc55809401f2c4f29aa1547ee643834bb Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 9 Jul 2024 22:40:43 +0200 Subject: [PATCH] update vim keybinds and settings --- nvim/.config/nvim/lua/vim-settings.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nvim/.config/nvim/lua/vim-settings.lua b/nvim/.config/nvim/lua/vim-settings.lua index 37ab5d6..b7cd6cb 100644 --- a/nvim/.config/nvim/lua/vim-settings.lua +++ b/nvim/.config/nvim/lua/vim-settings.lua @@ -2,12 +2,27 @@ vim.cmd("set expandtab") vim.cmd("set tabstop=2") vim.cmd("set softtabstop=2") vim.cmd("set shiftwidth=2") +vim.cmd("set number") vim.cmd("set clipboard+=unnamedplus") vim.g.mapleader = " " +-- Enable saving undo history +vim.o.undofile = true + +-- Decreate update time +vim.o.updatetime = 250 +vim.o.timeoutlen = 300 + +-- Set terminal gui colors to true +vim.o.termguicolors = true + +-- Sync clipboard between OS and neovim +vim.o.clipboard = "unnamedplus" + -- Setup custom keybinds vim.keymap.set("n", "", "Neotree toggle") -- Open Neotree fs with CTRL - n vim.keymap.set("n", "ca", vim.lsp.buf.code_action) -- Open Code actions with Space - ca vim.keymap.set("n", "K", vim.lsp.buf.hover) -- Open information with captial K vim.keymap.set("n", "gp", "Gitsigns preview_hunk") -- Open tab with changes with Space - gp vim.keymap.set("n", "gt", "Gitsigns toggle_current_line_blame") -- Shows when and who changed with Space - gt +vim.keymap.set("i", "jj", "") -- Sometimes we are a bit afk, we can work arround that