From c5d3dc7fa1c7f04f2149ab04718f542de05be2ee Mon Sep 17 00:00:00 2001 From: "jakob.stendahl" Date: Tue, 11 Oct 2022 12:26:59 +0200 Subject: Add vim config --- Common/nvim/lua/basic.lua | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) mode change 100644 => 100755 Common/nvim/lua/basic.lua (limited to 'Common/nvim/lua/basic.lua') diff --git a/Common/nvim/lua/basic.lua b/Common/nvim/lua/basic.lua old mode 100644 new mode 100755 index 16e9a62..a5aec23 --- a/Common/nvim/lua/basic.lua +++ b/Common/nvim/lua/basic.lua @@ -44,7 +44,7 @@ vim.opt.wildignore = '*.o,*~,*.pyc' vim.opt.wildignore:append('*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store') -- Always show current position -vim.opt.ruler = true +--vim.opt.ruler = true -- Hide buffers when they are abandoned vim.opt.hid = true @@ -87,11 +87,27 @@ vim.opt.showcmd = true -- Show colour column vim.opt.colorcolumn = '80,120' +vim.cmd [[ highlight ColorColumn ctermbg=16 ]] -- => Colors and Fonts -- Enable syntac highlighting -vim.opt.syntax = 'enable' +--vim.opt.syntax = 'enable' + +-- Colorscheme +-- default + +-- Workaround for gutter color +vim.cmd [[ +highlight! link SignColumn LineNr +autocmd ColorScheme * highlight! link SignColumn LineNr +]] + +-- Change git colors +--vim.api.nvim_set_hl(0, "DiffAdd", {fg = "#bada9f", bg = "None"}) +--vim.api.nvim_set_hl(0, "DiffChange", {fg = "Purple", bg = "None"}) +--vim.api.nvim_set_hl(0, "DiffDelete", {fg = "Red", bg = "None"}) +--vim.api.nvim_set_hl(0, "DiffText", {fg = "Yellow", bg = "None"}) -- Set utf8 as standard encoding vim.opt.encoding = 'utf8' @@ -143,10 +159,10 @@ Moving around, tabs, windows and buffers map('n', '', ':noh', silentnoremap) -- Smart way to move between windows -map('n', '', 'j', silentnoremap) -map('n', '', 'k', silentnoremap) -map('n', '', 'h', silentnoremap) -map('n', '', 'l', silentnoremap) +map('', '', 'j', silentnoremap) +map('', '', 'k', silentnoremap) +map('', '', 'h', silentnoremap) +map('', '', 'l', silentnoremap) -- Close current buffer map('n', 'bd', ':Bclose:tabclosegT', silentnoremap) @@ -206,10 +222,10 @@ if vim.fn.has("mac") or vim.fn.has("macunix") then end -- Delete trailing whitespace on save -vim.api.nvim_create_autocmd("BufWritePre", { - pattern = { "*" }, - command = [[%s/\s\+$//e]] -}) +--vim.api.nvim_create_autocmd("BufWritePre", { +-- pattern = { "*" }, +-- command = [[%s/\s\+$//e]] +--}) --[[ Misc @@ -233,7 +249,7 @@ map('n', 'sm', ':mksession! vim_session.vim', silentnoremap) map('n', 'sl', ':source vim_session.vim', silentnoremap) -- Dont't close window when deleting buffer ---vim.api.nvim_create_user_command("Bclose", +--vim.api.nvim_create_user_command("Bclose", -- "BufcloseCloseIt()", -- {bang = true} --) -- cgit v1.2.3