Tue, 14 Feb 2023 02:39:04 -0600
Add more plain vim plugins
1014 | 1 | vim.g.mapleader = "\\" |
2 | vim.g.maplocalleader = "\\" | |
3 | ||
4 | local o = vim.opt | |
5 | ||
6 | -- Editing | |
7 | o.expandtab = true | |
8 | o.shiftround = true | |
9 | o.shiftwidth = 2 | |
10 | ||
11 | -- Display | |
12 | o.breakindent = true | |
13 | o.breakindentopt = "min:66,shift:2" | |
14 | o.diffopt:append("algorithm:patience") | |
15 | o.fillchars = "fold: ,vert:│" | |
16 | o.linebreak = true | |
17 | o.listchars = "tab:⇥·,trail:◼,nbsp:◻,extends:»,precedes:«" | |
18 | o.showbreak = "» " | |
19 | o.termguicolors = true | |
20 | o.signcolumn = "number" | |
21 | ||
22 | -- set font etc | |
23 | if vim.fn.has("gui") then | |
24 | o.number = true | |
25 | end | |
26 | ||
27 | -- Behavior | |
28 | o.autowriteall = true | |
1015 | 29 | o.backup = true |
30 | o.completeopt:append({"menuone", "noselect"}) | |
1014 | 31 | o.ignorecase = true |
32 | o.scrolloff = 15 | |
1015 | 33 | o.sessionoptions = {"buffers", "curdir", "localoptions"} |
1014 | 34 | o.sidescrolloff = 10 |
35 | o.smartcase = true | |
36 | o.splitbelow = true | |
37 | o.splitright = true | |
1015 | 38 | o.undofile = true |
1014 | 39 | o.wildignorecase = true |
40 | ||
41 | -- Paths | |
1019 | 42 | o.backupdir:remove(".") |
1015 | 43 | o.tags:append({".tags", "./.tags;"}) |
1014 | 44 | o.wildignore = "*~,*.o,*.pyc,.git/*,hg/*,.svn/*" |
45 | ||
1015 | 46 | if vim.fn.executable("ag") then |
47 | o.grepprg = "ag --vimgrep" | |
48 | o.grepformat:prepend({"%f:%l:%c:%m", "%f"}) | |
49 | o.errorformat:append("%f") | |
50 | end | |
51 |