From 744188e996c2b4b2d1b31e9c481e497fb3e419f8 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Thu, 27 Jan 2022 01:47:43 -0800 Subject: [PATCH] clean up and add vim-floaterm to vimrc --- dotfiles/.vimrc | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 55c244e..d8a800c 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -40,20 +40,18 @@ endif " Run PlugInstall if there are missing plugins autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) - \| PlugInstall --sync | source $MYVIMRC + \| PlugInstall --sync | source '~/.vimrc' \| endif call plug#begin('~/.vim/plugged') -Plug 'mhinz/vim-startify' -Plug 'kristijanhusak/vim-carbon-now-sh' +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-surround' Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'ryanoasis/vim-devicons' -Plug 'tpope/vim-fugitive' Plug 'pechorin/any-jump.vim' -Plug 'tpope/vim-commentary' -Plug 'shime/vim-livedown' Plug 'jiangmiao/auto-pairs' Plug 'ap/vim-css-color' Plug 'ap/vim-buftabline' @@ -67,6 +65,9 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'maximbaz/lightline-ale' Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] } Plug 'osyo-manga/vim-over' +Plug 'voldikss/vim-floaterm' +" Plug 'windwp/vim-floaterm-repl' + " colorschemes Plug 'joshdick/onedark.vim' Plug 'kaicataldo/material.vim', { 'branch': 'main' } @@ -576,12 +577,23 @@ nnoremap ci :CocCommand fzf-preview.CocImplementat "which key "------------------------------------------------------------------------------ set timeoutlen=400 - +"------------------------------------------------------------------------------ +" dadbod ui +"------------------------------------------------------------------------------ +let g:db_ui_save_location = '~/.sql' +"------------------------------------------------------------------------------ +" Floaterm +"------------------------------------------------------------------------------ +let g:floaterm_width = 0.80 +let g:floaterm_height = 0.88 +let g:floaterm_opener = 'vsplit' +let g:floaterm_autoclose = 1 "------------------------------------------------------------------------------ " custom commands "------------------------------------------------------------------------------ command! Reload execute "source ~/.vimrc" command! Config execute ":e ~/.vimrc" +command! Env execute ":Dotenv .env" "------------------------------------------------------------------------------ "KEYBINDINGS "------------------------------------------------------------------------------ @@ -592,24 +604,25 @@ nnoremap :WhichKey ',' map :! map :NERDTreeToggle map :LivedownToggle -nnoremap :wa:vertical botright term ++kill=term +" nnoremap :wa:vertical botright term ++kill=term +nnoremap :wa:FloatermToggle " fzf nmap // :CocCommand fzf-preview.Lines nmap ?? :CocCommand fzf-preview.BufferLines " search fzf, refs, impls, defs -nmap sf :FZF +nmap ff :FloatermNew --title=fzf fzf " buffers -nmap bb :CocCommand fzf-preview.Buffers nmap bB :CocCommand fzf-preview.AllBuffers +nmap bb :CocCommand fzf-preview.Buffers nmap bk :bdelete nmap bn :bnext nmap bp :bprev map :bnext map :bprev " git -nmap gg :tab term ++close lazygit nmap gc :CocCommand fzf-preview.GitLogs nmap gf :CocCommand fzf-preview.GitFiles +nmap gg :FloatermNew --title=lazygit lazygit nmap gs :CocCommand fzf-preview.GitStatus " help nmap hc :CocCommand fzf-preview.CommandPalette @@ -617,9 +630,12 @@ nmap hk :Maps " any jump plugin nmap j :AnyJump " toggle/open -nmap on :NERDTreeToggle -nmap ot :vertical botright ter ++kill=terminal ++close +nmap ob :FloatermNew --title=bpytop bpytop +nmap od :FloatermNew --title=lazydocker lazydocker +nmap on :FloatermNew --title=ncmpcpp ncmpcpp nmap oo :OverCommandLine +nmap or :FloatermNew --title=ranger ranger --cmd="cd $PWD" +nmap ot :vertical botright ter ++kill=terminal ++close " search nmap sc :nohls "toggle coc outline