Remove some unneeded events when hiding statusline

dunno why cmdwinenter was there

term enter is not needed as it will handled with Buf events

use filetype events as a buffer may not trigger other events but change
the filetype
This commit is contained in:
Akianonymus 2021-08-22 08:40:23 +05:30 committed by siduck76
parent 3719521d9a
commit aa95c05179

View file

@ -9,7 +9,7 @@
vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]]
-- Don't show status line on certain windows -- Don't show status line on certain windows
vim.cmd [[ autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * lua require("core.utils").hide_statusline() ]] vim.cmd [[ autocmd BufEnter,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]]
-- Open a file from its last left off position -- 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 ]] -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]