2021-11-30 19:22:51 +00:00
|
|
|
local vim = require("vim")
|
|
|
|
local cmd = vim.cmd
|
|
|
|
local o = vim.opt
|
2021-12-06 12:52:51 +00:00
|
|
|
local g = vim.g
|
2021-11-30 19:22:51 +00:00
|
|
|
|
|
|
|
cmd[[filetype plugin on]]
|
|
|
|
|
2021-12-06 12:52:51 +00:00
|
|
|
-- Tab/Indent settings
|
2021-12-06 12:54:55 +00:00
|
|
|
o.autoindent = true -- Enable autoindent
|
2021-11-30 19:22:51 +00:00
|
|
|
o.expandtab = true -- Expand tabs to spaces
|
2021-12-06 12:52:51 +00:00
|
|
|
o.tabstop = 4 -- Tab size in spaces
|
2021-11-30 19:22:51 +00:00
|
|
|
o.shiftwidth = 4 -- Indentation size
|
|
|
|
o.softtabstop = 4 -- Tabs/Spaces interlop
|
|
|
|
o.tabpagemax = 50 -- More tabs
|
|
|
|
|
|
|
|
-- Folding
|
|
|
|
o.foldmethod = "indent" -- Use indent to determine the fold levels
|
|
|
|
o.foldnestmax = 8 -- Only fold up to given amount of levels
|
|
|
|
o.foldlevel = 2 -- Set initial fold level
|
|
|
|
o.foldenable = false -- Hide all folds by default
|
|
|
|
|
|
|
|
-- Split order
|
|
|
|
o.splitbelow = true -- Put new windows below current
|
|
|
|
o.splitright = true -- Put new vertical splits to right
|
|
|
|
|
|
|
|
-- In-file search (/)
|
|
|
|
o.ignorecase = true -- Use case insensitive matching
|
2021-12-06 12:52:51 +00:00
|
|
|
o.incsearch = true -- Show partial matches while typing
|
2021-11-30 19:22:51 +00:00
|
|
|
o.hlsearch = true -- Highlight search matches
|
|
|
|
|
2021-12-06 12:53:03 +00:00
|
|
|
-- Show whitespace
|
|
|
|
o.list = true -- Enable showing characters like <Tab>, <EOL>, ...
|
|
|
|
o.listchars = {tab = " ", trail = "·"} -- Specify which characters to show
|
2021-11-30 19:22:51 +00:00
|
|
|
|
|
|
|
-- Command-mode search
|
|
|
|
o.wildmode = {"longest", "list", "full"} -- Enable autocompletion
|
|
|
|
o.wildmenu = true -- Display all matching files when we tab complete
|
|
|
|
table.insert(o.path, "**") -- Search down into subfolders with tab completion
|
|
|
|
|
2021-12-06 12:56:48 +00:00
|
|
|
-- Files
|
2021-11-30 19:22:51 +00:00
|
|
|
o.encoding = "utf-8" -- Use UTF-8 encoding
|
|
|
|
o.autoread = true -- Automatically reload files on change
|
2021-12-06 12:56:48 +00:00
|
|
|
|
|
|
|
-- Misc
|
|
|
|
o.mouse = "a" -- Enable mouse mode
|
2021-11-30 19:22:51 +00:00
|
|
|
o.undolevels = 999 -- Lots of these
|
|
|
|
o.history = 1000 -- More history
|
2021-12-06 12:53:32 +00:00
|
|
|
o.showmode = false -- Don't display mode (it's on status line anyway)
|