71 lines
1.3 KiB
Lua
71 lines
1.3 KiB
Lua
local ct = require('conftool')
|
|
local pk_use = require('packer').use
|
|
|
|
--
|
|
-- Encoding
|
|
--
|
|
ct.set({'encoding', 'utf-8'}, {'fileencoding', 'utf-8'})
|
|
|
|
--
|
|
-- Search
|
|
--
|
|
ct.set('wildmenu', 'incsearch', 'hlsearch')
|
|
vim.opt.backspace = 'indent,eol,start'
|
|
|
|
--
|
|
-- Folds
|
|
--
|
|
ct.augroup('AutoSaveFolds', {
|
|
'BufWinLeave,BufLeave,BufWritePost',
|
|
'?*', 'nested silent!',
|
|
'mkview!'
|
|
},{
|
|
'BufWinEnter', '?*', 'silent!', 'loadview'
|
|
}
|
|
)
|
|
|
|
--
|
|
-- Spell Checking
|
|
--
|
|
ct.set({'spelllang', {'en', 'cjk', 'id'}})
|
|
ct.set({'spellsuggest', {'best', 5}})
|
|
|
|
--
|
|
-- Focus Mode
|
|
--
|
|
pk_use {
|
|
'junegunn/goyo.vim',
|
|
cmd = 'Goyo'
|
|
}
|
|
|
|
--
|
|
-- Multi-cursor
|
|
--
|
|
pk_use {
|
|
'mg979/vim-visual-multi',
|
|
keys = {"<C-Up>", "<C-Down>"}
|
|
}
|
|
|
|
--
|
|
-- Netrw built-in file manager
|
|
--
|
|
vim.g.netrw_liststyle = 3 -- tree style display
|
|
vim.g.netrw_banner = 0 -- no banner needed
|
|
vim.g.netrw_browse_split = 4
|
|
vim.g.netrw_winsize = 15 -- small window size
|
|
vim.g.netrw_chgwin = 1
|
|
|
|
--
|
|
-- EtC.
|
|
--
|
|
vim.opt.compatible = false
|
|
vim.opt.autowrite = true
|
|
-- auto cd to the current file's location
|
|
vim.cmd('autocmd BufEnter * silent! lcd %:p:h')
|
|
-- highlighting for other langs in markdown docs
|
|
vim.g.markdown_fenced_languages = {'html', 'vim', 'python', 'c', 'bash=sh'}
|
|
-- auto close delimiters (eg. parentheses, brackets)
|
|
pk_use 'Raimondi/delimitMate'
|
|
|
|
|