vim.opt.autoread = true vim.opt.formatoptions:remove("t") vim.opt.path:append("**") vim.g.netrw_banner = 0 vim.opt.wildignore = '*.o,*~,*.pyc,*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store' vim.opt.smartcase = true vim.opt.showmatch = true vim.opt.swapfile = false vim.opt.smartindent = true -- Default to the "modern normal" vim.opt.expandtab = true vim.opt.shiftwidth = 4 vim.opt.tabstop = 4 vim.opt.softtabstop = 4 -- Disable highlight when is pressed vim.api.nvim_set_keymap('n', '', ':noh', { noremap = true, silent = true }) -- Tab commands vim.api.nvim_set_keymap('n', 'tp', ':tabprevious', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'tn', ':tabnext', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'tc', ':tabnew', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'tx', ':tabclose', { noremap = true, silent = true }) -- Return to last edit position when opening files vim.cmd [[ au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] -- Colorscheme vim.cmd [[ colorscheme vim ]] vim.opt.background = "light" -- No idea why, preview in fzf does at least work extremely porly without this vim.cmd [[ let $BAT_THEME = 'gruvbox-light' ]] -- Show colour column vim.opt.colorcolumn = '120' vim.api.nvim_set_hl(0, "ColorColumn", { ctermbg = "lightgrey", bg = "#eae7da" })