add nvim configs

This commit is contained in:
fbachus
2024-11-08 18:51:43 +01:00
parent 5b7602dc6a
commit fae4da8315
46 changed files with 1344 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
vim.opt.compatible = false
vim.opt.showmatch = true
vim.opt.hlsearch = true
vim.opt.incsearch = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.expandtab = true
vim.opt.shiftwidth = 4
vim.opt.autoindent = true
vim.opt.relativenumber = true
vim.opt.number = true
vim.opt.wildmode = "longest,list"
vim.opt.cursorline = true
vim.opt.ttyfast = true
vim.opt.scrolloff = 5
vim.opt.syntax = "on"
vim.opt.wrap = false
vim.opt.mouse = ""
vim.opt.termguicolors = true
vim.opt.undofile = true
vim.opt.undodir = os.getenv("HOME").."/.local/share/nvim/undodir"
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
vim.g.mapleader = " "
-- move highlighted lines up and down, automatic indentation
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
-- replace highlighted area without adding to register
vim.keymap.set("x", "<leader>p", "\"_dP")
-- copy to system clipboard
vim.keymap.set("n", "<leader>y", "\"+y")
vim.keymap.set("v", "<leader>y", "\"+y")
vim.keymap.set("n", "<leader>Y", "\"+Y")