All Projects → camspiers → Animate.vim

camspiers / Animate.vim

Licence: other
A Vim Window Animation Library

Projects that are alternatives of or similar to Animate.vim

Neotex
latex live preview - plugin for neovim and vim 8
Stars: ✭ 170 (-1.73%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Dadbod Completion
Database autocompletion powered by https://github.com/tpope/vim-dadbod
Stars: ✭ 163 (-5.78%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Lens.vim
A Vim Automatic Window Resizing Plugin
Stars: ✭ 381 (+120.23%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Neovim Fuzzy
Fuzzy file finding for neovim
Stars: ✭ 103 (-40.46%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Crease.vim
Easy foldtext customization for [neo]vim.
Stars: ✭ 19 (-89.02%)
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 (+669.94%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Clap
👏 Modern performant fuzzy picker for Vim and NeoVim
Stars: ✭ 1,802 (+941.62%)
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 (+66.47%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Context.vim
Vim plugin that shows the context of the currently visible buffer contents
Stars: ✭ 688 (+297.69%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Alchemist.vim
Elixir Integration Into Vim
Stars: ✭ 632 (+265.32%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Barbar.nvim
A neovim tabline plugin.
Stars: ✭ 359 (+107.51%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vem Tabline
A lightweight Vim/Neovim plugin to display buffers and tabs in the tabline
Stars: ✭ 129 (-25.43%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Dashboard Nvim
vim dashboard
Stars: ✭ 294 (+69.94%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Nvim Treesitter Context
Show code context
Stars: ✭ 113 (-34.68%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Blamer.nvim
A git blame plugin for neovim inspired by VS Code's GitLens plugin
Stars: ✭ 283 (+63.58%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Tmux Complete.vim
Vim plugin for insert mode completion of words in adjacent tmux panes
Stars: ✭ 447 (+158.38%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
format.nvim
Neovim lua plugin to format the current buffer with external executables
Stars: ✭ 189 (+9.25%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Monokai Tasty
VIM Colour scheme
Stars: ✭ 279 (+61.27%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Vim Markdown Composer
An asynchronous markdown preview plugin for Vim and Neovim.
Stars: ✭ 501 (+189.6%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
Todoist.nvim
A todoist extension for neovim
Stars: ✭ 84 (-51.45%)
Mutual labels:  neovim, vim-plugin, neovim-plugin
 █████╗ ███╗   ██╗██╗███╗   ███╗ █████╗ ████████╗███████╗  ██╗   ██╗██╗███╗   ███╗
██╔══██╗████╗  ██║██║████╗ ████║██╔══██╗╚══██╔══╝██╔════╝  ██║   ██║██║████╗ ████║
███████║██╔██╗ ██║██║██╔████╔██║███████║   ██║   █████╗    ██║   ██║██║██╔████╔██║
██╔══██║██║╚██╗██║██║██║╚██╔╝██║██╔══██║   ██║   ██╔══╝    ╚██╗ ██╔╝██║██║╚██╔╝██║
██║  ██║██║ ╚████║██║██║ ╚═╝ ██║██║  ██║   ██║   ███████╗██╗╚████╔╝ ██║██║ ╚═╝ ██║
╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝╚═╝     ╚═╝╚═╝  ╚═╝   ╚═╝   ╚══════╝╚═╝ ╚═══╝  ╚═╝╚═╝     ╚═╝

Animate.vim

A Vim Window Animation Library

Animate.vim is a general window animation library for Vim, it provides the ability to animate window height and width via:

  • delta from current size
  • percent of screen
  • absolute size

Installation

To install Animate.vim, use your plugin manager of choice, e.g:

Plug 'camspiers/animate.vim'

Usage

Given the general purpose nature of resizing windows Animate.vim can be used in many contexts.

The following gives and example of using animate to more smoothly change window size using the directional keys:

Example: Animated Directional Keys

nnoremap <silent> <Up>    :call animate#window_delta_height(10)<CR>
nnoremap <silent> <Down>  :call animate#window_delta_height(-10)<CR>
nnoremap <silent> <Left>  :call animate#window_delta_width(10)<CR>
nnoremap <silent> <Right> :call animate#window_delta_width(-10)<CR>

Animate-Resize

Example: Animated FZF Bottom Drawer

Here is an example that integrates Animate.vim with Fuzzy Finder (FZF) to animate its opening:

let g:fzf_layout = {
 \ 'window': 'new | wincmd J | resize 1 | call animate#window_percent_height(0.5)'
\ }

Animate-FZF

Example: Animated Neovim Terminal Drawers

function! OpenAnimatedHtop() abort
  " Open a htop in terminal
  new term://htop
  " Send window to bottom and start with small height
  wincmd J | resize 1
  " Animate height to 66%
  call animate#window_percent_height(0.66)
endfunction

Animate-Htop

Animate-LazyGit

Options

Distribute Space

By default Animate.vim distributes space of non-animating windows while resizing this can be destructive to intended window sizes when those sizes aren't fixed. To disable:

let g:animate#distribute_space = 0

Duration

Animation duration in milliseconds can be controlled via a global flag:

let g:animate#duration = 300.0

Easing

Animation easing can be controlled via a global flag:

let g:animate#easing_func = 'animate#ease_linear'

Easing Options

Currently there are 3 easing options available:

  • animate#ease_linear
  • animate#ease_out_quad
  • animate#ease_out_cubic
  • animate#ease_in_out_sine (default)

To set a custom easing function:

let g:animate#easing_func = 'animate#ease_out_cubic'

You can also set your own easing function using the following signature:

function! MyEasingFunction(elapsed, initial, delta, duration) abort
  " return value
endfunction

let g:animate#easing_func = 'MyEasingFunction'

API

Delta Functions

Animate current window by delta:

animate#window_delta(width_delta, height_delta)

Animate current window by width delta:

animate#window_delta_width(delta)

Animate current window by height delta:

animate#window_delta_height(delta)

Percent Functions

Animate current window by percent of screen:

animate#window_percent(width_percent, height_percent)

Animate current window by percent of screen width:

animate#window_percent_width(percent)

Animate current window by percent of screen height:

animate#window_percent_height(percent)

Absolute Functions

Animate current window to absolute size:

animate#window_absolute(width, height)

Animate current window by absolute width:

animate#window_absolute_width(width)

Animate current window by absolute height:

animate#window_absolute_height(height)

Helper Functions

Focus window:

function! animate#window_focus(target_window) abort

Determines with target window is animating:

function! animate#window_is_animating(target_window) abort

Get the current time as a float in milliseconds:

animate#time()

Get the available height factoring in cmdheight and status line:

animate#get_available_height()

Linear easing function:

animate#ease_linear(elapsed, initial, delta, duration)

Out quad easing function:

animate#ease_out_quad(elapsed, initial, delta, duration)

Out cubic easing function:

animate#ease_out_cubic(elapsed, initial, delta, duration)

In out sine easing function:

animate#ease_in_out_sine(elapsed, initial, delta, duration)
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].