- Notifications
You must be signed in to change notification settings - Fork16
dhruvasagar/vim-zoom
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A simple plugin to toggle zoom of current window within the current tab.
This is heavily inspired from tmux's zoom pane feature.
Use your favorite plugin manager to install this plugin (recommended).
git clone https://github.com/dhruvasagar/vim-zoom.git ~/.vim/bundle/vim-zoom
If however you don't use a plugin manager such as pathogen, vundle, neobundle,vim-plug then you can copy all files within this repository directly withinyour ~/.vim folder. (not recommended)
Simply use the provided mapping<C-W>m to toggle zoom in and outfor the current window
NOTE: In an attempt to keep this plugin as lean as possible, it avoidshaving to deal with special buffers created by plugins that aren't backed byactual files. This is a trade-off we've made consiously and helps us keepour plugin less than 100 lines of code.
If that doesn't work for you and for other more advanced use cases you maywant to consider alternate plugins such asgoyo.vim
VIM Zoom provideszoom#statusline()
API to be used for addingg:zoom#statustext
value to your statusline while your window is zoomed.g:zoom#statustext
defaults to value'zoomed'
. You may add this to yourstatusline like this :
set statusline+=%{zoom#statusline()}
If you're using some complex statusline plugin, you may need to refer to itsdocumentation to figure out how to add this to your statusline.
-- Set lualine optionssections= {-- leftlualine_a= {'mode'},lualine_b= {'branch','diff','diagnostic'},lualine_c= {'filename'},-- rightlualine_x= {"vim.fn['zoom#statusline']()",'encoding','fileformat','filetype'},lualine_y= {'progress'},lualine_z= {'location'}})
Contributions of configurations for other statusline plugins are appreciated.
- Fork it.
- Commit your changes and give your commit message some love.
- Push to your fork on github.
- Open a Pull Request.
This plugin was heavily inspired by tmux's zoom pane feature.
About
Toggle zoom in / out individual windows (splits)