mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 13:29:55 -06:00
neovim - smartsplits plugin
This commit is contained in:
@@ -79,28 +79,29 @@
|
||||
; Trim trailing Whitespace in current line
|
||||
(util.lnnoremap :tw "<C-U>.s/\\s\\+$//ge<CR>:nohlsearch<Enter>/<BS>")
|
||||
|
||||
;; (noremap :n :<C-A-l> ":echo \"test\"\n")
|
||||
; Window switching
|
||||
; ˙ -> alt-h
|
||||
; ∆ -> alt-j
|
||||
; ˚ -> alt-k
|
||||
; ¬ -> alt-l
|
||||
;; Terminal mode
|
||||
(noremap :t "˙" "<c-\\><c-n><c-w>h")
|
||||
(noremap :t "∆" "<c-\\><c-n><c-w>j")
|
||||
(noremap :t "˚" "<c-\\><c-n><c-w>k")
|
||||
(noremap :t "¬" "<c-\\><c-n><c-w>l")
|
||||
;; Insert mode:
|
||||
(noremap :i "˙" :<Esc><c-w>h)
|
||||
(noremap :i "∆" :<Esc><c-w>j)
|
||||
(noremap :i "˚" :<Esc><c-w>k)
|
||||
(noremap :i "¬" :<Esc><c-w>l)
|
||||
;; Visual mode:
|
||||
(noremap :v "˙" :<Esc><c-w>h)
|
||||
(noremap :v "∆" :<Esc><c-w>j)
|
||||
(noremap :v "˚" :<Esc><c-w>k)
|
||||
(noremap :v "¬" :<Esc><c-w>l)
|
||||
;; Normal mode:
|
||||
(noremap :n "˙" :<c-w>h)
|
||||
(noremap :n "∆" :<c-w>j)
|
||||
(noremap :n "˚" :<c-w>k)
|
||||
(noremap :n "¬" :<c-w>l)
|
||||
;; (noremap :t "˙" "<c-\\><c-n><c-w>h")
|
||||
;; (noremap :t "∆" "<c-\\><c-n><c-w>j")
|
||||
;; (noremap :t "˚" "<c-\\><c-n><c-w>k")
|
||||
;; (noremap :t "¬" "<c-\\><c-n><c-w>l")
|
||||
;; ;; Insert mode:
|
||||
;; (noremap :i "˙" :<Esc><c-w>h)
|
||||
;; (noremap :i "∆" :<Esc><c-w>j)
|
||||
;; (noremap :i "˚" :<Esc><c-w>k)
|
||||
;; (noremap :i "¬" :<Esc><c-w>l)
|
||||
;; ;; Visual mode:
|
||||
;; (noremap :v "˙" :<Esc><c-w>h)
|
||||
;; (noremap :v "∆" :<Esc><c-w>j)
|
||||
;; (noremap :v "˚" :<Esc><c-w>k)
|
||||
;; (noremap :v "¬" :<Esc><c-w>l)
|
||||
;; ;; Normal mode:
|
||||
;; (noremap :n "˙" :<c-w>h)
|
||||
;; (noremap :n "∆" :<c-w>j)
|
||||
;; (noremap :n "˚" :<c-w>k)
|
||||
;; (noremap :n "¬" :<c-w>l)
|
||||
|
||||
27
nvim/.config/nvim/fnl/dotfiles/plugin/smartsplits.fnl
Normal file
27
nvim/.config/nvim/fnl/dotfiles/plugin/smartsplits.fnl
Normal file
@@ -0,0 +1,27 @@
|
||||
(module dotfiles.plugin.smartsplits
|
||||
{autoload {nvim aniseed.nvim
|
||||
a aniseed.core
|
||||
smart-splits smart-splits
|
||||
;; util dotfiles.util
|
||||
}})
|
||||
|
||||
(smart-splits.setup)
|
||||
|
||||
;; recommended mappings
|
||||
;; resizing splits
|
||||
;; these keymaps will also accept a range,
|
||||
;; for example `10<A-h>` will `resize_left` by `(10 * config.default_amount)`
|
||||
(vim.keymap.set :n :<M-S-h> smart-splits.resize_left)
|
||||
(vim.keymap.set :n :<M-S-j> smart-splits.resize_down)
|
||||
(vim.keymap.set :n :<M-S-k> smart-splits.resize_up)
|
||||
(vim.keymap.set :n :<M-S-l> smart-splits.resize_right)
|
||||
;; moving between splits
|
||||
(vim.keymap.set :n :<M-h> smart-splits.move_cursor_left)
|
||||
(vim.keymap.set :n :<M-j> smart-splits.move_cursor_down)
|
||||
(vim.keymap.set :n :<M-k> smart-splits.move_cursor_up)
|
||||
(vim.keymap.set :n :<M-l> smart-splits.move_cursor_right)
|
||||
;; swapping buffers between windows
|
||||
(vim.keymap.set :n :<leader><leader>h smart-splits.swap_buf_left)
|
||||
(vim.keymap.set :n :<leader><leader>j smart-splits.swap_buf_down)
|
||||
(vim.keymap.set :n :<leader><leader>k smart-splits.swap_buf_up)
|
||||
(vim.keymap.set :n :<leader><leader>l smart-splits.swap_buf_right)
|
||||
@@ -52,6 +52,7 @@
|
||||
:lifepillar/vim-solarized8 {}
|
||||
:lukas-reineke/headlines.nvim {:mod :headlines}
|
||||
; :michaelb/sniprun {:run "bash ./install.sh" :mod :sniprun}
|
||||
:mrjones2014/smart-splits.nvim {:mod :smartsplits}
|
||||
:neovim/nvim-lspconfig {:mod :lspconfig}
|
||||
:norcalli/nvim-colorizer.lua {:mod :colorizer}
|
||||
:nvim-orgmode/orgmode {:mod :orgmode}
|
||||
|
||||
Reference in New Issue
Block a user