diff --git a/nvim/.config/nvim/fnl/dotfiles/util.fnl b/nvim/.config/nvim/fnl/dotfiles/util.fnl index 8d3074c..2a176ea 100644 --- a/nvim/.config/nvim/fnl/dotfiles/util.fnl +++ b/nvim/.config/nvim/fnl/dotfiles/util.fnl @@ -1,23 +1,21 @@ -(module dotfiles.util - {autoload - {a aniseed.core} - require - {nvim aniseed.nvim}}) - +(module dotfiles.util {autoload {a aniseed.core} require {nvim aniseed.nvim}}) (defn noremap [mode from to opts] - (let [map-opts {:noremap true :silent true} - to (.. ":" to "") - buff-num (a.get opts :buff-num)] - (if (or (a.get opts :local?) buff-num ) - (nvim.buf_set_keymap (or buff-num 0) mode from to map-opts) - (nvim.set_keymap mode from to map-opts)))) + (let [map-opts {:noremap true :silent true} + to (.. ":" to :) + buff-num (a.get opts :buff-num)] + (if (or (a.get opts :local?) buff-num) + (nvim.buf_set_keymap (or buff-num 0) mode from to map-opts) + (nvim.set_keymap mode from to map-opts)))) -(defn nnoremap [from to opts] - (noremap :n from to opts)) +(defn nnoremap [from to opts] (noremap :n from to opts)) -(defn lnnoremap [from to] - (nnoremap (.. "" from) to)) +(defn tnoremap [from to opts] (noremap :t from to opts)) -(defn lvnoremap [from to opts] - (noremap :v (.. "" from) to opts)) +(defn inoremap [from to opts] (noremap :i from to opts)) + +(defn vnoremap [from to opts] (noremap :v from to opts)) + +(defn lnnoremap [from to] (nnoremap (.. : from) to)) + +(defn lvnoremap [from to opts] (noremap :v (.. : from) to opts))