|
|
|
@ -21,7 +21,6 @@ end
|
|
|
|
|
function tnoremap(l, r)
|
|
|
|
|
keymapper.set('t', l, r)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
|
|
-- custom mappings {{{
|
|
|
|
@ -51,6 +50,34 @@ inoremap('zz', '<Esc>:w!<CR>a')
|
|
|
|
|
tnoremap('<Esc>', '<C-\\><C-n>')
|
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
|
|
-- vim options {{{
|
|
|
|
|
opt.compatible = false
|
|
|
|
|
opt.number = true
|
|
|
|
|
opt.foldmethod = 'marker'
|
|
|
|
|
opt.encoding = 'utf8'
|
|
|
|
|
opt.list = true
|
|
|
|
|
opt.lcs = 'tab:->,trail:_,eol:^'
|
|
|
|
|
opt.clipboard = 'unnamedplus'
|
|
|
|
|
opt.spell = true
|
|
|
|
|
opt.spelllang = "en_us"
|
|
|
|
|
opt.title = true
|
|
|
|
|
opt.ts = 2
|
|
|
|
|
opt.sw = 2
|
|
|
|
|
opt.hlsearch = true
|
|
|
|
|
opt.incsearch = true
|
|
|
|
|
opt.ignorecase = true
|
|
|
|
|
opt.smartcase = true
|
|
|
|
|
opt.inccommand = 'nosplit'
|
|
|
|
|
opt.hidden = true
|
|
|
|
|
opt.linebreak = true
|
|
|
|
|
opt.path = '.,/usr/include,**'
|
|
|
|
|
vim.cmd.colorscheme('earth')
|
|
|
|
|
opt.statusline="%f %r%m%q%h%=%y 0x%02B %04l:%03c:%03p"
|
|
|
|
|
vim.api.nvim_exec("let &titlestring='%{expand(\"%:p\")}'", true)
|
|
|
|
|
|
|
|
|
|
globals.vimtex_view_method = 'zathura'
|
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
|
|
-- autocommands {{{
|
|
|
|
|
-- swapfile handler
|
|
|
|
|
vim.api.nvim_create_autocmd({"SwapExists"}, {
|
|
|
|
@ -82,16 +109,6 @@ vim.api.nvim_create_autocmd({"BufWrite"}, {
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- autocmds for python
|
|
|
|
|
-- vim.api.nvim_create_autocmd({"Filetype"}, {
|
|
|
|
|
-- pattern = {"python"},
|
|
|
|
|
-- callback = function()
|
|
|
|
|
-- vim.bo.expandtab = true
|
|
|
|
|
-- vim.bo.tabstop = 4
|
|
|
|
|
-- vim.bo.shiftwidth = 4
|
|
|
|
|
-- end
|
|
|
|
|
-- })
|
|
|
|
|
|
|
|
|
|
function setTabbing(lang, width)
|
|
|
|
|
vim.api.nvim_create_autocmd({"Filetype"}, {
|
|
|
|
|
pattern = {lang},
|
|
|
|
@ -105,33 +122,13 @@ end
|
|
|
|
|
|
|
|
|
|
setTabbing("python", 4)
|
|
|
|
|
setTabbing("javascript", 2)
|
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
|
|
-- vim options {{{
|
|
|
|
|
opt.compatible = false
|
|
|
|
|
opt.number = true
|
|
|
|
|
opt.foldmethod = 'marker'
|
|
|
|
|
opt.encoding = 'utf8'
|
|
|
|
|
opt.list = true
|
|
|
|
|
opt.lcs = 'tab:->,trail:_,eol:^'
|
|
|
|
|
opt.clipboard = 'unnamedplus'
|
|
|
|
|
opt.spell = true
|
|
|
|
|
opt.spelllang = "en_us"
|
|
|
|
|
opt.title = true
|
|
|
|
|
opt.ts = 2
|
|
|
|
|
opt.sw = 2
|
|
|
|
|
opt.hlsearch = true
|
|
|
|
|
opt.incsearch = true
|
|
|
|
|
opt.ignorecase = true
|
|
|
|
|
opt.smartcase = true
|
|
|
|
|
opt.inccommand = 'nosplit'
|
|
|
|
|
opt.hidden = true
|
|
|
|
|
opt.path = '.,/usr/include,**'
|
|
|
|
|
vim.cmd.colorscheme('earth')
|
|
|
|
|
opt.statusline="%f %r%m%q%h%=%y 0x%02B %04l:%03c:%03p"
|
|
|
|
|
vim.api.nvim_exec("let &titlestring='%{expand(\"%:p\")}'", true)
|
|
|
|
|
|
|
|
|
|
globals.vimtex_view_method = 'zathura'
|
|
|
|
|
vim.api.nvim_create_autocmd({"TermOpen"}, {
|
|
|
|
|
pattern = {"*"},
|
|
|
|
|
callback = function()
|
|
|
|
|
vim.wo.number = false
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
|
|
-- netrw options {{{
|
|
|
|
|