chore: Changed some configs on nvim, tabs and some other sets

This commit is contained in:
Afonso Franco 2022-12-16 21:32:43 +00:00
parent ba6da1c307
commit 02dcc94541
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
2 changed files with 67 additions and 12 deletions

View file

@ -1,12 +1,24 @@
--Leader
vim.g.mapleader = " "
--Relative line numbers
vim.wo.number=true
vim.wo.relativenumber= true
vim.g.instant_username = "Afonso"
--Remove search highlight
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.smartindent = true
--Remove Wrap
vim.opt.wrap = false
vim.g.mapleader = " "
--Not let cursor go bellow 10 chars.
vim.opt.scrolloff = 10
--4 space indent
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
--Undo dir
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true
--TAB KEYBINDINGS
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
@ -32,14 +44,6 @@ map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
-- Close buffer
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
-- Wipeout buffer
-- :BufferWipeout
-- Close commands
-- :BufferCloseAllButCurrent
-- :BufferCloseAllButPinned
-- :BufferCloseAllButCurrentOrPinned
-- :BufferCloseBuffersLeft
-- :BufferCloseBuffersRight
-- Magic buffer-picking mode
map('n', '<C-p>', '<Cmd>BufferPick<CR>', opts)
-- Sort automatically by...
@ -48,9 +52,7 @@ map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)
--NVimTree
map('n', '<C-n>', '<Cmd>NvimTreeToggle<CR>',opts)