From 812e92b08a3aaef8970e3093acd3d9906b5a8410 Mon Sep 17 00:00:00 2001 From: Max Bucknell Date: Sat, 7 Mar 2020 10:47:17 +1100 Subject: [PATCH] Add animation to vim --- nvim/nvim.symlink/after/plugin/animate.vim | 13 +++++++++++++ nvim/nvim.symlink/after/plugin/fzf.vim | 9 --------- nvim/nvim.symlink/init.vim | 3 +++ 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 nvim/nvim.symlink/after/plugin/animate.vim diff --git a/nvim/nvim.symlink/after/plugin/animate.vim b/nvim/nvim.symlink/after/plugin/animate.vim new file mode 100644 index 0000000..c88dbe9 --- /dev/null +++ b/nvim/nvim.symlink/after/plugin/animate.vim @@ -0,0 +1,13 @@ +if ! exists('g:animate#loaded') + finish +endif + +let g:animate#distribute_space = 0 +let g:animate#duration = 140.0 + +let g:fzf_layout = { + \ 'window': 'new | wincmd J | resize 1 | call animate#window_percent_height(0.3)' +\ } + +nnoremap v :vnew:vertical resize 1:call animate#window_percent_width(0.5) +nnoremap s :new:resize 1:call animate#window_percent_height(0.5) diff --git a/nvim/nvim.symlink/after/plugin/fzf.vim b/nvim/nvim.symlink/after/plugin/fzf.vim index 0be20ac..44d20bd 100644 --- a/nvim/nvim.symlink/after/plugin/fzf.vim +++ b/nvim/nvim.symlink/after/plugin/fzf.vim @@ -4,12 +4,3 @@ endif nnoremap o :Files nnoremap b :Buffers - -" Making splits a little bit better. -" -" I open splits before opening files because I can never remember the -" keyboard incantations in FZF to open in splits, but I get annoyed for -" the brief moment that the same buffer was shown when I do :vsp or :sp. -" I don't have to have this problem anymore. -nnoremap v :vnew:Files -nnoremap s :new:Files diff --git a/nvim/nvim.symlink/init.vim b/nvim/nvim.symlink/init.vim index 60258f5..c350494 100644 --- a/nvim/nvim.symlink/init.vim +++ b/nvim/nvim.symlink/init.vim @@ -33,6 +33,9 @@ call plug#begin() " JSON with comments, just for TypeScript Plug 'kevinoid/vim-jsonc' + + " I can't believe I'm doing this. + Plug 'camspiers/animate.vim' call plug#end() " I have a true colour terminal, and I will have true colours in my Vim