do the things to init.lua

This commit is contained in:
randomuser 2023-04-10 08:58:48 -05:00
parent 3ea9e3389b
commit 89c4530d2e
1 changed files with 33 additions and 37 deletions

View File

@ -21,7 +21,6 @@ end
function tnoremap(l, r) function tnoremap(l, r)
keymapper.set('t', l, r) keymapper.set('t', l, r)
end end
-- }}} -- }}}
-- custom mappings {{{ -- custom mappings {{{
@ -51,6 +50,33 @@ inoremap('zz', '<Esc>:w!<CR>a')
tnoremap('<Esc>', '<C-\\><C-n>') 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.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 {{{ -- autocommands {{{
-- swapfile handler -- swapfile handler
vim.api.nvim_create_autocmd({"SwapExists"}, { vim.api.nvim_create_autocmd({"SwapExists"}, {
@ -82,16 +108,6 @@ vim.api.nvim_create_autocmd({"BufWrite"}, {
end 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) function setTabbing(lang, width)
vim.api.nvim_create_autocmd({"Filetype"}, { vim.api.nvim_create_autocmd({"Filetype"}, {
pattern = {lang}, pattern = {lang},
@ -105,33 +121,13 @@ end
setTabbing("python", 4) setTabbing("python", 4)
setTabbing("javascript", 2) setTabbing("javascript", 2)
-- }}}
-- vim options {{{ vim.api.nvim_create_autocmd({"TermOpen"}, {
opt.compatible = false pattern = {"*"},
opt.number = true callback = function()
opt.foldmethod = 'marker' vim.wo.number = false
opt.encoding = 'utf8' end
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'
-- }}} -- }}}
-- netrw options {{{ -- netrw options {{{