summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/autocmds.lua
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-04-10 16:38:26 -0300
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-04-10 16:38:26 -0300
commit57e115339d00a2a8afe09dba6f83009cc5a02e99 (patch)
treef05a871967f57454d9e14a085f87cafede538941 /.config/nvim/lua/autocmds.lua
parentb876e4afcab3d01f9207f9f4794828fd8b091d9d (diff)
nvim update, semi-refactor
Diffstat (limited to '.config/nvim/lua/autocmds.lua')
-rw-r--r--[-rwxr-xr-x].config/nvim/lua/autocmds.lua20
1 files changed, 11 insertions, 9 deletions
diff --git a/.config/nvim/lua/autocmds.lua b/.config/nvim/lua/autocmds.lua
index 5fcb496..d7d1294 100755..100644
--- a/.config/nvim/lua/autocmds.lua
+++ b/.config/nvim/lua/autocmds.lua
@@ -1,28 +1,30 @@
+local custom_au = vim.api.nvim_create_augroup('custom', {})
+
vim.api.nvim_create_autocmd('BufWritePost', {
- pattern = "config",
+ group = custom_au,
+ pattern = require('utils').config_home() .. "/i3/config",
command = '!i3-msg -q reload',
})
vim.api.nvim_create_autocmd('BufWritePost', {
+ group = custom_au,
pattern = "*.tex",
command = 'silent !pdflatex %',
})
vim.api.nvim_create_autocmd('BufWritePre', {
+ group = custom_au,
pattern = 'todo.txt',
command = 'sort',
})
---vim.api.nvim_create_autocmd('VimEnter', {
- --once = true,
- --callback = function()
- --if vim.fn.filereadable('Session.vim') then
- --vim.cmd('source Session.vim')
- --end
- --end
---})
+vim.api.nvim_create_autocmd('VimResized', {
+ group = custom_au,
+ command = 'wincmd =',
+})
vim.api.nvim_create_autocmd('TextYankPost', {
+ group = custom_au,
callback = function ()
vim.highlight.on_yank({ higroup = 'IncSearch', timeout = 200})
end,