Skip to content

Commit

Permalink
chore: add TermToggleN mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
ttak0422 committed Jul 20, 2024
1 parent 18464f9 commit cb60f4a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
7 changes: 6 additions & 1 deletion fnl/prelude.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
(set vim.g.maplocalleader ",")

(let [map vim.keymap.set
cmd (fn [c] (.. :<cmd> c :<cr>))
opts {:noremap true :silent true}
N [[:<leader> ":lua vim.cmd('doautocmd User TriggerLeader')<CR>"]
[";" ":"]
Expand All @@ -37,8 +38,12 @@
;; normal mode keymaps
(each [_ K (ipairs N)]
(map :n (. K 1) (. K 2) (or (. K 3) opts)))
;; visual mode keymaps
(each [_ K (ipairs V)]
(map :v (. K 1) (. K 2) (or (. K 3) opts))))
(map :v (. K 1) (. K 2) (or (. K 3) opts)))
;; term toggle keymaps
(for [i 0 9]
(map [:n :t :i] (.. :<C- i ">") (cmd (.. "TermToggle " i)) opts)))

;; user events
(var specificFileEnterAutoCmd nil)
Expand Down
14 changes: 11 additions & 3 deletions lua/autogen/prelude.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cb60f4a

Please sign in to comment.