Make tab pages a bit less awkward

This commit is contained in:
secretspecter 2024-03-09 11:28:00 -07:00
parent 682bdbb680
commit 3425a60d97

View file

@ -18,13 +18,6 @@
:keymap (fn []
(let [nmap #(vim.keymap.set :n $1 $2 {:desc $3})
tmap #(vim.keymap.set :t $1 $2)]
(nmap :<Tab> :<C-^> "Toggle alternate-file")
(nmap :<C-x> ":bn|bd!#<cr>" "Delete a buffer without removing the split")
(nmap :<leader>to ":new term://bash|resize 8<cr>" "Open an 8 line terminal below the current window")
(nmap :<leader>w :80<C-W>| "Set the window width to 80 characters")
(nmap :<C-t> :tabnew "Create a new tab page")
(nmap :<C-h> :<C-W>h "Move to window left")
(nmap :<C-j> :<C-W>j "Move to window down")
(nmap :<C-k> :<C-W>k "Move to window up")
@ -39,6 +32,14 @@
{:pattern "term://*"
:command "startinsert"}) ;; Start terminals in insert mode
(nmap :<Tab> :<C-^> "Toggle alternate-file")
(nmap :<C-x> ":bn|bd!#<cr>" "Delete a buffer without removing the split")
(nmap :<leader>to ":new term://bash|resize 8<cr>" "Open an 8 line terminal below the current window")
(nmap :<leader>w :80<C-W>| "Set the window width to 80 characters")
(nmap :<leader>W :120<C-W>| "Set the window width to 120 characters")
(nmap :<C-t> ":tabnew<cr>" "Create a new tab page")
(nmap :<C-w><tab> :<C-w>gt "Go to next tab (cyclical)")
(nmap :<leader>jt
#(vim.cmd (.. "vsplit ~/TDC-Obsidian/Journal/"
(os.date "%Y") "/"
@ -53,8 +54,7 @@
(nmap :<leader>s ":Telescope live_grep<cr>" "Search current buffer")
(nmap :<leader>e ":Telescope emoji<cr>" "Search for an emoji to copy to clipboard")
(nmap :<leader>gs ":vsplit term://tig<cr>")
(nmap :<leader>gc ":vsplit term://git commit<cr>")
(nmap :<leader>gs ":vsplit term://tig<cr>" "Open tig(1) to stage and commit changes")
(let [duck (require :duck)]
(nmap :<leader><leader> #(duck.hatch) "hatch a duck")