diff --git "a/.config/nvim/lua/\\" "b/.config/nvim/lua/\\" new file mode 100644 index 0000000..135d565 --- /dev/null +++ "b/.config/nvim/lua/\\" @@ -0,0 +1,53 @@ +--Leader +vim.g.mapleader = " " +--Relative line numbers +vim.wo.number=true +vim.wo.relativenumber= true +--Remove search highlight +vim.opt.hlsearch = false +vim.opt.incsearch = true +vim.opt.smartindent = true +--Remove Wrap +vim.opt.wrap = false +--Not let cursor go bellow 10 chars. +vim.opt.scrolloff = 10 +--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 } + +-- Move to previous/next +map('n', '', 'BufferPrevious', opts) +map('n', '', 'BufferNext', opts) +-- Re-order to previous/next +map('n', '', 'BufferMovePrevious', opts) +map('n', '>', 'BufferMoveNext', opts) +-- Goto buffer in position... +map('n', '', 'BufferGoto 1', opts) +map('n', '', 'BufferGoto 2', opts) +map('n', '', 'BufferGoto 3', opts) +map('n', '', 'BufferGoto 4', opts) +map('n', '', 'BufferGoto 5', opts) +map('n', '', 'BufferGoto 6', opts) +map('n', '', 'BufferGoto 7', opts) +map('n', '', 'BufferGoto 8', opts) +map('n', '', 'BufferGoto 9', opts) +map('n', '', 'BufferLast', opts) +-- Pin/unpin buffer +map('n', '', 'BufferPin', opts) +-- Close buffer +map('n', '', 'BufferClose', opts) +-- Magic buffer-picking mode +map('n', '', 'BufferPick', opts) +-- Sort automatically by... +map('n', 'bb', 'BufferOrderByBufferNumber', opts) +map('n', 'bd', 'BufferOrderByDirectory', opts) +map('n', 'bl', 'BufferOrderByLanguage', opts) +map('n', 'bw', 'BufferOrderByWindowNumber', opts) + +--NVimTree +map('n', '', 'NvimTreeToggle',opts) + + diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua index 3987d4e..de53e8b 100644 --- a/.config/nvim/lua/mappings.lua +++ b/.config/nvim/lua/mappings.lua @@ -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', '', 'BufferLast', opts) map('n', '', 'BufferPin', opts) -- Close buffer map('n', '', 'BufferClose', opts) --- Wipeout buffer --- :BufferWipeout --- Close commands --- :BufferCloseAllButCurrent --- :BufferCloseAllButPinned --- :BufferCloseAllButCurrentOrPinned --- :BufferCloseBuffersLeft --- :BufferCloseBuffersRight -- Magic buffer-picking mode map('n', '', 'BufferPick', opts) -- Sort automatically by... @@ -48,9 +52,7 @@ map('n', 'bd', 'BufferOrderByDirectory', opts) map('n', 'bl', 'BufferOrderByLanguage', opts) map('n', 'bw', 'BufferOrderByWindowNumber', opts) - --NVimTree - map('n', '', 'NvimTreeToggle',opts)