fix autocmds break oil

This commit is contained in:
fiplox 2023-01-22 16:46:51 +01:00
parent 8ebdf655e9
commit 6d2bb7f4a4

View File

@ -12,6 +12,7 @@ end
-- g.did_load_filetypes = 0 -- g.did_load_filetypes = 0
g.netrw_liststyle = 1 g.netrw_liststyle = 1
g.netrw_banner = 0 g.netrw_banner = 0
g.netrw_list_hide = '^\\..*'
g.mapleader = ' ' g.mapleader = ' '
g.tex_flavor = 'latex' g.tex_flavor = 'latex'
-- }}} -- }}}
@ -65,9 +66,9 @@ vim.api.nvim_create_user_command('Pdf', '!pandoc % -o %:r.pdf', { nargs = 0 })
vim.api.nvim_create_user_command('Slide', '!pandoc -t beamer % -o %:r.pdf', { nargs = 0 }) vim.api.nvim_create_user_command('Slide', '!pandoc -t beamer % -o %:r.pdf', { nargs = 0 })
vim.api.nvim_create_user_command('Cd', 'lcd %:p:h', { nargs = 0 }) vim.api.nvim_create_user_command('Cd', 'lcd %:p:h', { nargs = 0 })
vim.api.nvim_create_autocmd({ 'BufReadPost' }, { pattern = { '*' }, command = 'silent! g`"zz' }) -- vim.api.nvim_create_autocmd({ 'BufReadPost' }, { pattern = { '*' }, command = 'silent! g`"zz' })
vim.api.nvim_create_autocmd({ 'BufWinLeave' }, { pattern = { '?*' }, command = 'mkview' }) -- vim.api.nvim_create_autocmd({ 'BufWinLeave' }, { pattern = { '*' }, command = 'mkview' })
vim.api.nvim_create_autocmd({ 'BufReadPost' }, { pattern = { '?*' }, command = 'silent! loadview' }) -- vim.api.nvim_create_autocmd({ 'BufReadPost' }, { pattern = { '*' }, command = 'silent! loadview' })
-- }}} -- }}}
function ToggleTroubleAuto() function ToggleTroubleAuto()
local ok, trouble = pcall(require, 'trouble') local ok, trouble = pcall(require, 'trouble')