(import-macros {: map!} :nvrc.macro.keymap) (import-macros {: setv!} :nvrc.macro.set) (map! [nv :silent] : "") (setv! mapleader " ") (map! [n] ";" ":") (map! [n :silent] :e ":bprev ") (map! [n :silent] :r ":bnext ") (map! [n :silent] :w ":enew ") (map! [n :silent] :a ":tabnew ") (map! [n :silent] :s ":set nu! | :set rnu! ") (map! [n :silent] :d ":buffers ") (map! [n :silent] :ya ":%y+ ") (map! [n :silent] :/ ((. (require :Comment.api) :toggle_current_linewise))) (map! [v :silent] :/ ":lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode()) ") (map! [n :silent] :ff ((. (require :fzf-lua) :files))) (map! [n :silent] :fd ((. (require :fzf-lua) :grep))) (map! [n :silent] :fl ((. (require :fzf-lua) :live_grep))) (map! [n :silent] :fb ((. (require :fzf-lua) :buffer))) (map! [n :silent] :fg ((. (require :fzf-lua) :git_commits))) (map! [n :silent] :fh ((. (require :fzf-lua) :git_status))) (map! [n] :s :Lightspeed_omni_s) (map! [n] :gs :Lightspeed_omni_gs) (map! [n :silent] :u ":TZAtaraxis ") (map! [n :silent] :t ":Dirvish") (map! [n :silent] :ga ":Git add %") (map! [n :silent] :gs ":Git") (map! [n :silent] :gc ":Git commit -v -q") (map! [n :silent] :gt ":Git commit -v -q %") (map! [n :silent] :gd ":Gdiff") (map! [n :silent] :ge ":Gedit") (map! [n :silent] :gr ":Gread") (map! [n :silent] :gw ":Gwrite") (map! [n :silent] :gg ":Ggrep") (map! [n :silent] :gl ":silent! Gclog:bot copen") (map! [n :silent] :gm ":GMove") (map! [n :silent] :go ":Git checkout") (map! [n :silent] :gp ":Git! push") (map! [n :silent] :gl ":Git! pull") (map! [n] :gf ":diffget //2") (map! [n] :gj ":diffget //3") (map! [n :silent] :qo ":copen") (map! [n :silent] :qq ":cclose") (map! [n :silent] :Qo ":lopen") (map! [n :silent] :Qq ":lclose") ; work with word wrap (map! [n :expr :silent] :k "v:count == 0 ? 'gk' : 'k'") (map! [n :expr :silent] :j "v:count == 0 ? 'gj' : 'j'") (map! [n] : ":m .+1==") (map! [n] : ":m .-2==") (map! [i] : ":m .+1==gi") (map! [i] : ":m .-2==gi") (map! [v] : ":m '>+1gv=gv") (map! [v] : ":m '<-2gv=gv")