diff options
Diffstat (limited to 'fnl/settings/autocmds.fnl')
| -rw-r--r-- | fnl/settings/autocmds.fnl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fnl/settings/autocmds.fnl b/fnl/settings/autocmds.fnl index b2a065c..9b5eac5 100644 --- a/fnl/settings/autocmds.fnl +++ b/fnl/settings/autocmds.fnl @@ -12,7 +12,11 @@ [:FileType {:pattern [:gitcommit :markdown] :command "setlocal wrap"}] [:VimResized {:command "tabdo wincmd ="}] - [[:FocusGained :BufEnter] {:command :checktime}] + [[:FocusGained :BufEnter :CursorHold :CursorHoldI] + {:pattern "*" + :callback (fn [] + (when (= (vim.fn.mode) :n) + (vim.cmd :checktime)))}] [[:InsertLeave :WinEnter] {:callback (λ [] (let [cursorline (require :settings.cursorline)] |