summaryrefslogtreecommitdiff
path: root/fnl/settings
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/settings')
-rw-r--r--fnl/settings/autocmds.fnl6
-rw-r--r--fnl/settings/keymaps.fnl2
-rw-r--r--fnl/settings/options.fnl2
3 files changed, 8 insertions, 2 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)]
diff --git a/fnl/settings/keymaps.fnl b/fnl/settings/keymaps.fnl
index aa32316..14cd160 100644
--- a/fnl/settings/keymaps.fnl
+++ b/fnl/settings/keymaps.fnl
@@ -33,6 +33,8 @@
[:n :<c-u> :<c-u>zz {}]
;; Remove highlighted search
[:n :<m-h> :<cmd>nohlsearch<CR> {}]
+ ;; jump to eol in insert mode
+ [:i :<c-e> :<c-o>$ {}]
;; Force refresh
[:n :mj "<cmd>:e<CR>" {:desc :Refresh}]])
diff --git a/fnl/settings/options.fnl b/fnl/settings/options.fnl
index c72d415..e7ece5f 100644
--- a/fnl/settings/options.fnl
+++ b/fnl/settings/options.fnl
@@ -43,7 +43,7 @@
;; enable persistent undo
:undofile true
;; faster completion (4000ms default)
- :updatetime 100
+ :updatetime 1000
;; if a file is being edited by another program (or was written
;; to file while editing with another program), it is not allowed
;; to be edited