mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 08:39:56 -06:00
neovim - update zoom-toggle
This commit is contained in:
@@ -1,24 +1,21 @@
|
|||||||
(module dotfiles.zoom-toggle
|
(module dotfiles.zoom-toggle
|
||||||
{autoload
|
{autoload {a aniseed.core}
|
||||||
{a aniseed.core}
|
require {anenv aniseed.env
|
||||||
require
|
nvim aniseed.nvim
|
||||||
{anenv aniseed.env
|
nu aniseed.nvim.util
|
||||||
nvim aniseed.nvim
|
u dotfiles.util}})
|
||||||
nu aniseed.nvim.util
|
|
||||||
u dotfiles.util}})
|
|
||||||
|
|
||||||
(var unzoom! nil)
|
(var unzoom! nil)
|
||||||
|
|
||||||
(defn zoom-toggle []
|
(defn zoom-toggle [] (if unzoom!
|
||||||
(if unzoom!
|
(do
|
||||||
(do
|
(nvim.command unzoom!)
|
||||||
(nvim.command unzoom!)
|
(set unzoom! nil))
|
||||||
(set unzoom! nil))
|
(do
|
||||||
(do
|
(set unzoom! (nvim.fn.winrestcmd))
|
||||||
(set unzoom! (nvim.fn.winrestcmd))
|
(nvim.ex.resize)
|
||||||
(nvim.ex.resize)
|
(nvim.ex.vertical :resize))))
|
||||||
(nvim.ex.vertical :resize))))
|
|
||||||
|
|
||||||
|
|
||||||
(nu.fn-bridge :ZoomToggle :dotfiles.zoom-toggle :zoom-toggle {:return false})
|
(nu.fn-bridge :ZoomToggle :dotfiles.zoom-toggle :zoom-toggle {:return false})
|
||||||
(u.nnoremap :<C-W>z ":call ZoomToggle()<CR>")
|
(u.nnoremap :<C-W>z ":call ZoomToggle()<CR>")
|
||||||
|
(u.tnoremap :t "Ω" "<c-\\><c-n>:call ZoomToggle()<CR>")
|
||||||
|
|||||||
Reference in New Issue
Block a user