All Projects → camspiers → Lens.vim

camspiers / Lens.vim

Licence: other
A Vim Automatic Window Resizing Plugin

Projects that are alternatives of or similar to Lens.vim

Vim Monokai Tasty
VIM Colour scheme
Stars: ✭ 279 (-26.77%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Blamer.nvim
A git blame plugin for neovim inspired by VS Code's GitLens plugin
Stars: ✭ 283 (-25.72%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Neotex
latex live preview - plugin for neovim and vim 8
Stars: ✭ 170 (-55.38%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
format.nvim
Neovim lua plugin to format the current buffer with external executables
Stars: ✭ 189 (-50.39%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Dashboard Nvim
vim dashboard
Stars: ✭ 294 (-22.83%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Dadbod Completion
Database autocompletion powered by https://github.com/tpope/vim-dadbod
Stars: ✭ 163 (-57.22%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Gen tags.vim
Async plugin for vim and neovim to ease the use of ctags/gtags
Stars: ✭ 288 (-24.41%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Nvim Treesitter Context
Show code context
Stars: ✭ 113 (-70.34%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Vsnip
Snippet plugin for vim/nvim that supports LSP/VSCode's snippet format.
Stars: ✭ 224 (-41.21%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Indent Blankline.nvim
Indent guides for Neovim
Stars: ✭ 203 (-46.72%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Targets.vim
Vim plugin that provides additional text objects
Stars: ✭ 2,114 (+454.86%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
virt-column.nvim
Display a character as the colorcolumn
Stars: ✭ 64 (-83.2%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vem Tabline
A lightweight Vim/Neovim plugin to display buffers and tabs in the tabline
Stars: ✭ 129 (-66.14%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Barbar.nvim
A neovim tabline plugin.
Stars: ✭ 359 (-5.77%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Clap
👏 Modern performant fuzzy picker for Vim and NeoVim
Stars: ✭ 1,802 (+372.97%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Animate.vim
A Vim Window Animation Library
Stars: ✭ 173 (-54.59%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Asyncrun.vim
🚀 Run Async Shell Commands in Vim 8.0 / NeoVim and Output to the Quickfix Window !!
Stars: ✭ 1,332 (+249.61%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Neovim Fuzzy
Fuzzy file finding for neovim
Stars: ✭ 103 (-72.97%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Visual Split.vim
Vim plugin to control splits with visual selections or text objects
Stars: ✭ 190 (-50.13%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Ghost
Vim/Nvim client for GhostText - Edit browser text areas in Vim/Neovim
Stars: ✭ 245 (-35.7%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
██╗     ███████╗███╗   ██╗███████╗  ██╗   ██╗██╗███╗   ███╗
██║     ██╔════╝████╗  ██║██╔════╝  ██║   ██║██║████╗ ████║
██║     █████╗  ██╔██╗ ██║███████╗  ██║   ██║██║██╔████╔██║
██║     ██╔══╝  ██║╚██╗██║╚════██║  ╚██╗ ██╔╝██║██║╚██╔╝██║
███████╗███████╗██║ ╚████║███████║██╗╚████╔╝ ██║██║ ╚═╝ ██║
╚══════╝╚══════╝╚═╝  ╚═══╝╚══════╝╚═╝ ╚═══╝  ╚═╝╚═╝     ╚═╝

Lens.vim

A Vim Automatic Window Resizing Plugin

Lens.vim automatically resizes windows when their content exceeds their window dimensions, but does so respecting some minimum and maximum resize bounds ensuring automatically resized windows neither become too large (in cases of large content) or too small (in cases of small content).

Demo

Lens

Animation

Lens.vim by default integrates with the camspiers/animate.vim plugin for window animation.

Installation

To install Lens.vim, use your plugin manager of choice, for example

With Animation

Plug 'camspiers/animate.vim'
Plug 'camspiers/lens.vim'

Without Animation

Plug 'camspiers/lens.vim'

Usage

Out of the box Lens.vim it set up to resize windows when they are entered, and as such the minimal usecase is covered. However this can be disabled and resizing can be preformed manually using lens#run().

Options

Lens.vim is set up with some sensible defaults, but if needed the following can be configured:

Disabled

The plugin can be disabled completely with:

let g:lens#disabled = 1

Disabled Filetypes

The plugin can be disabled for specific filetypes:

let g:lens#disabled_filetypes = ['nerdtree', 'fzf']

Animate

Animation is enabled by default, but can be disabled with:

let g:lens#animate = 0

Resize Max Height

When resizing don't go beyond the following height

let g:lens#height_resize_max = 20

Resize Min Height

When resizing don't go below the following height

let g:lens#height_resize_min = 5

Resize Max Width

When resizing don't go beyond the following width

let g:lens#width_resize_max = 80

Resize Min Width

When resizing don't go below the following width

let g:lens#width_resize_min = 20

API

Lens.vim provides the following functions:

Run

Resizes the window to respect minimal lens configuration

function! lens#run() abort

Toggle

Toggles the plugin on and off

function! lens#toggle() abort

Get Size

When current is smaller than target, returns target if target is within bounds otherwise returns a value closest to target within bounds.

function! lens#get_size(current, target, resize_min, resize_max) abort

Get Rows

Gets the rows of the current window

function! lens#get_rows() abort

Get Cols

Gets the cols of the current window

function! lens#get_cols() abort
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].