diff --git a/after/ftplugin/php.vim b/after/ftplugin/php.vim index e36a3323..3cac491d 100644 --- a/after/ftplugin/php.vim +++ b/after/ftplugin/php.vim @@ -1 +1,4 @@ -setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab +setlocal tabstop=4 +setlocal shiftwidth=4 +setlocal softtabstop=4 +setlocal expandtab diff --git a/after/ftplugin/vue.vim b/after/ftplugin/vue.vim index 203818fd..4dc2773f 100644 --- a/after/ftplugin/vue.vim +++ b/after/ftplugin/vue.vim @@ -1 +1,4 @@ -setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab +setlocal tabstop=8 +setlocal shiftwidth=2 +setlocal softtabstop=2 +setlocal expandtab diff --git a/lua/custom/plugins/tmoyses/sessions/init.lua b/lua/custom/plugins/tmoyses/sessions/init.lua index ccabd53c..3bb96221 100644 --- a/lua/custom/plugins/tmoyses/sessions/init.lua +++ b/lua/custom/plugins/tmoyses/sessions/init.lua @@ -1,11 +1,13 @@ -- my basic session management local session_file = 'session.vim' +local auto_save = false vim.api.nvim_create_autocmd({'VimEnter'}, { callback = function () if vim.fn.argc() == 0 and vim.fn.filereadable(session_file) == 1 then vim.cmd('source ' .. session_file) + auto_save = true vim.notify("Session restored from " .. session_file, vim.log.levels.INFO, {title = "Sessions"}) end end, @@ -14,7 +16,7 @@ vim.api.nvim_create_autocmd({'VimEnter'}, { vim.api.nvim_create_autocmd({'VimLeave'}, { callback = function () - if vim.fn.argc() == 0 then + if vim.fn.argc() == 0 or auto_save == true then vim.cmd('mks! ' .. session_file) end end,