update vim keybinds and settings
This commit is contained in:
parent
0f277ecfab
commit
89d92d0d7c
1 changed files with 15 additions and 0 deletions
|
@ -2,12 +2,27 @@ vim.cmd("set expandtab")
|
||||||
vim.cmd("set tabstop=2")
|
vim.cmd("set tabstop=2")
|
||||||
vim.cmd("set softtabstop=2")
|
vim.cmd("set softtabstop=2")
|
||||||
vim.cmd("set shiftwidth=2")
|
vim.cmd("set shiftwidth=2")
|
||||||
|
vim.cmd("set number")
|
||||||
vim.cmd("set clipboard+=unnamedplus")
|
vim.cmd("set clipboard+=unnamedplus")
|
||||||
vim.g.mapleader = " "
|
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
|
-- Setup custom keybinds
|
||||||
vim.keymap.set("n", "<C-n>", "<CMD>Neotree toggle<CR>") -- Open Neotree fs with CTRL - n
|
vim.keymap.set("n", "<C-n>", "<CMD>Neotree toggle<CR>") -- Open Neotree fs with CTRL - n
|
||||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action) -- Open Code actions with Space - ca
|
vim.keymap.set("n", "<leader>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", "K", vim.lsp.buf.hover) -- Open information with captial K
|
||||||
vim.keymap.set("n", "<leader>gp", "<CMD>Gitsigns preview_hunk<CR>") -- Open tab with changes with Space - gp
|
vim.keymap.set("n", "<leader>gp", "<CMD>Gitsigns preview_hunk<CR>") -- Open tab with changes with Space - gp
|
||||||
vim.keymap.set("n", "<leader>gt", "<CMD>Gitsigns toggle_current_line_blame<CR>") -- Shows when and who changed with Space - gt
|
vim.keymap.set("n", "<leader>gt", "<CMD>Gitsigns toggle_current_line_blame<CR>") -- Shows when and who changed with Space - gt
|
||||||
|
vim.keymap.set("i", "jj", "<esc>") -- Sometimes we are a bit afk, we can work arround that
|
||||||
|
|
Loading…
Reference in a new issue