ergonomics or something

This commit is contained in:
secretspecter 2023-08-04 16:43:22 -06:00
parent 20be1e9ca2
commit 82a1fb7de1

View file

@ -15,29 +15,37 @@
:keymap (fn [] :keymap (fn []
(let [nmap #(vim.keymap.set :n $1 $2 {:desc $3}) (let [nmap #(vim.keymap.set :n $1 $2 {:desc $3})
tmap #(vim.keymap.set :t $1 $2)] tmap #(vim.keymap.set :t $1 $2)]
(nmap :<Tab> ":bnext<CR>" "Next Buffer") (nmap :<leader>l ":ls<cr>:b<space>" "List buffers and open")
(nmap :<S-Tab> ":bprevious<CR>" "Previous Buffer") (nmap :<C-x> ":bn|bd!#<cr>" "Delete a buffer without removing the split")
(nmap :<C-p> ":Telescope find_files<CR>" "Telescope find_files") (nmap :<leader>w :80<C-W>|)
(nmap :<C-b> ":Telescope buffers<CR>" "Telescope find_files") ;; unified split navigation via C-hjkl
(nmap :<C-x> ":bn|bd!#<CR>" "Delete a buffer without removing the split")
(nmap :<leader>tt ":new term://bash|resize 8<CR>|i")
;; unified window navigation via C-hjkl
(tmap :<C-h> :<C-\><C-N><C-w>h)
(tmap :<C-j> :<C-\><C-N><C-w>j)
(tmap :<C-k> :<C-\><C-N><C-w>k)
(tmap :<C-l> :<C-\><C-N><C-w>l)
(nmap :<C-h> :<C-W>h) (nmap :<C-h> :<C-W>h)
(nmap :<C-j> :<C-W>j) (nmap :<C-j> :<C-W>j)
(nmap :<C-k> :<C-W>k) (nmap :<C-k> :<C-W>k)
(nmap :<C-l> :<C-W>l) (nmap :<C-l> :<C-W>l)
(tmap :<C-h> :<C-\><C-n><C-w>h)
(tmap :<C-j> :<C-\><C-n><C-w>j)
(tmap :<C-k> :<C-\><C-n><C-w>k)
(tmap :<C-l> :<C-\><C-n><C-w>l)
;; terminal
(nmap :<leader>to ":new term://bash|resize 8<cr>")
(nmap :<leader>tt ":vnew term://tut<cr>")
(nmap :<leader>tg ":new term://gomuks<cr>")
(vim.api.nvim_create_autocmd
[:BufWinEnter :WinEnter]
{:pattern "term://*"
:command "startinsert"})
;; gemwiki
(nmap :<leader>dd (nmap :<leader>dd
#(vim.cmd (.. "split ~/gemwiki/diary/" #(vim.cmd (.. "split ~/gemwiki/diary/"
(os.date "%Y%m%d") (os.date "%Y%m%d")
".gmi" ".gmi"
"|resize 8|$") "|resize 8|$")
"Open today's diary")) "Open today's diary"))
(nmap :<C-p> ":Telescope find_files<cr>" "Telescope find_files")
(nmap :<C-b> ":Telescope buffers<cr>" "Telescope buffers")
(let [duck (require :duck)] (let [duck (require :duck)]
(nmap :<leader>dd #(duck.hatch) "hatch a duck") (nmap :<leader><leader> #(duck.hatch) "hatch a duck")
(nmap :<leader>dk #(duck.cook) "cook a duck")) (nmap :<leader>dk #(duck.cook) "cook a duck"))
)) ))
:treesitter-languages [:c :treesitter-languages [:c