ergonomics or something
This commit is contained in:
parent
20be1e9ca2
commit
82a1fb7de1
|
@ -15,29 +15,37 @@
|
|||
:keymap (fn []
|
||||
(let [nmap #(vim.keymap.set :n $1 $2 {:desc $3})
|
||||
tmap #(vim.keymap.set :t $1 $2)]
|
||||
(nmap :<Tab> ":bnext<CR>" "Next Buffer")
|
||||
(nmap :<S-Tab> ":bprevious<CR>" "Previous Buffer")
|
||||
(nmap :<C-p> ":Telescope find_files<CR>" "Telescope find_files")
|
||||
(nmap :<C-b> ":Telescope buffers<CR>" "Telescope find_files")
|
||||
(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 :<leader>l ":ls<cr>:b<space>" "List buffers and open")
|
||||
(nmap :<C-x> ":bn|bd!#<cr>" "Delete a buffer without removing the split")
|
||||
(nmap :<leader>w :80<C-W>|)
|
||||
;; unified split navigation via C-hjkl
|
||||
(nmap :<C-h> :<C-W>h)
|
||||
(nmap :<C-j> :<C-W>j)
|
||||
(nmap :<C-k> :<C-W>k)
|
||||
(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
|
||||
#(vim.cmd (.. "split ~/gemwiki/diary/"
|
||||
(os.date "%Y%m%d")
|
||||
".gmi"
|
||||
"|resize 8|$")
|
||||
"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)]
|
||||
(nmap :<leader>dd #(duck.hatch) "hatch a duck")
|
||||
(nmap :<leader><leader> #(duck.hatch) "hatch a duck")
|
||||
(nmap :<leader>dk #(duck.cook) "cook a duck"))
|
||||
))
|
||||
:treesitter-languages [:c
|
||||
|
|
Loading…
Reference in a new issue