diff --git a/fnl/personalize.fnl b/fnl/personalize.fnl index 510b169..8a6eed6 100644 --- a/fnl/personalize.fnl +++ b/fnl/personalize.fnl @@ -1,6 +1,7 @@ (let [cmp (require :cmp) luasnip (require :luasnip)] {:options (fn [] + (set vim.g.mapleader " ") (set vim.o.termguicolors true) (set vim.o.clipboard :unnamedplus) (set vim.o.wrap false) @@ -8,18 +9,32 @@ (vim.cmd.colorscheme :everforest) ;; http://neovim.io/doc/user/change.html#fo-table (set vim.o.formatoptions :tncro) - (set vim.o.conceallevel 2)) + (set vim.o.conceallevel 2) + (set vim.o.splitbelow true) + (set vim.o.splitright true)) :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)] (nmap : ":bnext" "Next Buffer") (nmap : ":bprevious" "Previous Buffer") - (nmap : ":Telescope find_files" "Telescope find_files") - (nmap :x ":write|bdelete" "Save and delete buffer") - (nmap :dt - #(vim.cmd (.. "split ~/gemwiki/diary/" + (nmap : ":Telescope find_files" "Telescope find_files") + (nmap : ":Telescope buffers" "Telescope find_files") + (nmap : ":bn|bd!#" "Delete a buffer without removing the split") + (nmap :tt ":new term://bash|resize 8|i") + ;; unified window navigation via C-hjkl + (tmap : :h) + (tmap : :j) + (tmap : :k) + (tmap : :l) + (nmap : :h) + (nmap : :j) + (nmap : :k) + (nmap : :l) + (nmap :dd + #(vim.cmd (.. "split ~/gemwiki/diary/" (os.date "%Y%m%d") ".gmi" - "| resize 8 | $") + "|resize 8|$") "Open today's diary")) (let [duck (require :duck)] (nmap :dd #(duck.hatch) "hatch a duck")