Skip to content

Commit

Permalink
fix: local autocmd while using tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Robitx committed Dec 15, 2023
1 parent b815509 commit 80836df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/gp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ M.prep_md = function(buf)
-- better text wrapping
vim.api.nvim_command("setlocal wrap linebreak")
-- auto save on TextChanged, TextChangedI
vim.api.nvim_command("autocmd TextChanged,TextChangedI <buffer> silent! write")
vim.api.nvim_command("autocmd TextChanged,TextChangedI <buffer=" .. buf .. "> silent! write")

-- register shortcuts local to this buffer
buf = buf or vim.api.nvim_get_current_buf()
Expand Down

0 comments on commit 80836df

Please sign in to comment.