-- Set spellcheck language to english vim.opt.spelllang=en_gb -- Set default split to be right or bottom vim.opt.splitright=true vim.opt.splitbelow=true -- Tell vim it's a fast terminal vim.opt.ttyfast=true -- set relative ruler with current line as real line number vim.opt.relativenumber=true vim.opt.number=true -- Allows vim to background buffers without saving vim.opt.hidden=true -- Sets vim to smart case -- If search is all lowercase, search insensitively; if you include a capital -- it becomes a case sensitive match vim.opt.ignorecase=true vim.opt.smartcase=true -- Makes vim try to keep 5 lines visible at the top and bottom vim.opt.scrolloff=5 -- set tabwidth vim.opt.autoindent=true vim.opt.smartindent=true vim.opt.shiftwidth=4 vim.opt.tabstop=4 -- Add invisivle character reperesentation vim.opt.list=true vim.opt.listchars={ tab="» ", trail="␣" } -- Stops vim wrapping in the middle of a word vim.opt.linebreak=true -- Sets tool for opening non-text files with gx -- If in netrw, this is run with just x vim.g.netrw_browsex_viewer = "opout" -- Automatically insert comment leader after hitting enter (r) or when pushing o or O (o) vim.opt.formatoptions:append('r') vim.opt.formatoptions:append('o') -- Show the results of the substitute command as you type vim.opt.inccommand = 'nosplit' -- Sets the default fold method to indent vim.opt.foldmethod = 'indent' -- Need to find out how to do this in lua vim.cmd([[ if executable('rg') set grepprg=rg\ --vimgrep\ --no-heading\ --color=never\ --glob=\"!shell-logs/*\" set grepformat=%f:%l:%c:%m,%f:%l:%m endif augroup colorcols autocmd! autocmd FileType,VimEnter,BufEnter * call mine#functions#colorcols() augroup end " share data between nvim instances (registers etc) augroup SHADA autocmd! autocmd CursorHold,TextYankPost,FocusGained,FocusLost * \ if exists(':rshada') | rshada | wshada | endif augroup END ]])