2021-08-22 07:49:15 +00:00
|
|
|
-- uncomment this if you want to open nvim with a dir
|
|
|
|
-- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]]
|
|
|
|
|
|
|
|
-- Use relative & absolute line numbers in 'n' & 'i' modes respectively
|
|
|
|
-- vim.cmd[[ au InsertEnter * set norelativenumber ]]
|
|
|
|
-- vim.cmd[[ au InsertLeave * set relativenumber ]]
|
|
|
|
|
|
|
|
-- Don't show any numbers inside terminals
|
|
|
|
vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]]
|
|
|
|
|
|
|
|
-- Don't show status line on certain windows
|
2021-08-22 03:10:23 +00:00
|
|
|
vim.cmd [[ autocmd BufEnter,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]]
|
2021-08-22 07:49:15 +00:00
|
|
|
|
2021-09-07 08:47:29 +00:00
|
|
|
--auto close file exploer when quiting incase a single buffer is left
|
2021-09-10 10:10:54 +00:00
|
|
|
-- vim.cmd([[ autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'nvimtree') | q | endif ]])
|
2021-09-07 08:47:29 +00:00
|
|
|
|
2021-08-22 07:49:15 +00:00
|
|
|
-- Open a file from its last left off position
|
|
|
|
-- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]
|
|
|
|
-- File extension specific tabbing
|
|
|
|
-- vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]]
|