-- ┌───────────────────────┐ -- │ ▐ ▐ ▗ │ -- │▞▀▘▞▀▖▜▀ ▜▀ ▄ ▛▀▖▞▀▌▞▀▘│ -- │▝▀▖▛▀ ▐ ▖▐ ▖▐ ▌ ▌▚▄▌▝▀▖│ -- │▀▀ ▝▀▘ ▀ ▀ ▀▘▘ ▘▗▄▘▀▀ │ -- └───────────────────────┘ local o = vim.o -- gl[o]bal options local wo = vim.wo -- [w]indow-local [o]ptions local bo = vim.bo -- [b]uffer-local [o]ptions local opt = vim.opt -- convenient :set -- look & feel o.termguicolors = true -- Disable italics vim.g.rose_pine_disable_italics = true vim.cmd('colorscheme rose-pine') -- interact with system clipboard opt.clipboard:append('unnamedplus') -- copy indent on a new line o.autoindent = true -- :h tabstop, 2. point -- use appropriate number of spaces to insert a o.expandtab = true o.shiftwidth = 4 o.softtabstop = 4 o.tabstop = 8 -- use english for spellchecking, but don't spellcheck by default wo.spell = true bo.spelllang = "en_gb" wo.spell = false -- tab completion, zsh style o.wildmode = "longest:full,full" opt.wildignore = { '*.o', '*.obj', '*.class', '*.aux', '*.lof', '*.log', '*.lot', '*.fls', '*.toc', '*.fmt', '*.fot', '*.cb', '*.cb2', '.*.lb', '.dvi', '*.xdv', '*.bbl', '*.bcf', '*.blg', '*-blx.aux', '*-blx.bib', '*.run.xml', '*.fdb_latexmk', '*.synctex', '*.synctex(busy)', '*.synctex.gz', '*.synctex.gz(busy)', '*.pdfsync' } -- put one space while joining (not two) o.joinspaces = false -- keep n lines above/below cursor while scrolling o.scrolloff = 4 -- line numbers o.number = true -- fold manually, when I place markers o.foldmethod = "marker" -- set the terminal title o.title = true -- wrap using 'breakat' character o.linebreak = true -- new split panes will split to below and right o.splitbelow = true o.splitright = true -- highlight the current line, yoc undoes o.cursorline = true -- current line actual number, rest are relative o.relativenumber = true -- we are already using a cursorline, don't clobber linter messages o.showmode = false -- jump to the matching bracket briefly o.showmatch = true -- move freely between buffers o.hidden = true -- persistent undo o.undofile = true -- lower case searches ignore case, upper case searches do not o.ignorecase = true o.smartcase = true -- https://stackoverflow.com/a/3445040/ -- switch case labels o.cinoptions = "l1" if vim.fn.executable("rg") then o.grepprg = "rg --vimgrep --no-heading --smart-case" end -- iwhite: ignore changes in amount of white space. -- vertical: start diff mode with vertical splits -- filler: show filler lines, opt.diffopt = { "iwhite", "vertical", "filler", "algorithm:patience", "indent-heuristic" } -- menu: use a popup menu to show the possible completions -- preview: show extra information opt.completeopt = {"menu", "menuone", "noselect"}