From 6b06caa3880a16d68ab2104db4b0c9481e607462 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 21 Oct 2020 16:25:45 +0200 Subject: Added floaterm good stuff for vim --- .config/nvim/bindings.vim | 44 +++++++++++++++++++++++++++++++------------- .config/nvim/plug.vim | 3 +++ .config/nvim/plugins.vim | 7 +++++++ .config/nvim/settings.vim | 1 + .config/nvim/sidebars.vim | 1 - 5 files changed, 42 insertions(+), 14 deletions(-) diff --git a/.config/nvim/bindings.vim b/.config/nvim/bindings.vim index dbea3af..1957419 100644 --- a/.config/nvim/bindings.vim +++ b/.config/nvim/bindings.vim @@ -1,3 +1,5 @@ +call which_key#register('\', "g:which_key_map") +let g:which_key_map = {} nnoremap c "_c nnoremap :call NERDComment(0,"toggle") nnoremap : @@ -14,23 +16,39 @@ nnoremap 1 o nnoremap 2 :sp nnoremap 3 :vsp nnoremap 0 q -nnoremap g :G -nnoremap d :Vifm +nnoremap :WhichKey '\' +nnoremap g :FloatermNew lazygit +let g:which_key_map.g = 'lazygit' +nnoremap d :FloatermNew vifm +let g:which_key_map.d = 'vifm' +nnoremap v :FloatermNew vifm +let g:which_key_map.v = 'vifm' nnoremap e :Files +let g:which_key_map.e = 'fzf-files' nnoremap b :Buffers +let g:which_key_map.b = 'fzf-buffers' +nnoremap h :Startify +let g:which_key_map.h = 'startify' nnoremap p :CocList -A --normal yank +let g:which_key_map.p = 'coc-paste' nnoremap s :w -nnoremap w :w:bp:bd # +let g:which_key_map.s = 'write-buffer' +nnoremap k :w:bp:bd # +let g:which_key_map.k = 'write-and-close-buffer' nnoremap x :w:bp:bd # -nmap 1 AirlineSelectTab1 -nmap 2 AirlineSelectTab2 -nmap 3 AirlineSelectTab3 -nmap 4 AirlineSelectTab4 -nmap 5 AirlineSelectTab5 -nmap 6 AirlineSelectTab6 -nmap 7 AirlineSelectTab7 -nmap 8 AirlineSelectTab8 -nmap 9 AirlineSelectTab9 -nmap 0 AirlineSelectTab10 +let g:which_key_map.x = 'write-and-close-buffer' +nmap AirlineSelectTab1 +nmap AirlineSelectTab2 +nmap AirlineSelectTab3 +nmap AirlineSelectTab4 +nmap AirlineSelectTab5 +nmap AirlineSelectTab6 +nmap AirlineSelectTab7 +nmap AirlineSelectTab8 +nmap AirlineSelectTab9 +nmap AirlineSelectTab10 inoremap pumvisible() ? "" : "" inoremap pumvisible() ? "" : "" +let g:floaterm_keymap_toggle = '' +let g:floaterm_keymap_prev = '' +let g:floaterm_keymap_next = '' diff --git a/.config/nvim/plug.vim b/.config/nvim/plug.vim index 5b4a271..2fcfd83 100644 --- a/.config/nvim/plug.vim +++ b/.config/nvim/plug.vim @@ -5,6 +5,7 @@ Plug 'jceb/vim-orgmode' Plug 'jiangmiao/auto-pairs' Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' +Plug 'liuchengxu/vim-which-key' Plug 'luochen1990/rainbow' Plug 'mbbill/undotree' Plug 'mg979/vim-visual-multi' @@ -23,4 +24,6 @@ Plug 'tpope/vim-speeddating' Plug 'vifm/vifm.vim' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' +Plug 'voldikss/fzf-floaterm' +Plug 'voldikss/vim-floaterm' call plug#end() diff --git a/.config/nvim/plugins.vim b/.config/nvim/plugins.vim index d597412..931d8c7 100644 --- a/.config/nvim/plugins.vim +++ b/.config/nvim/plugins.vim @@ -68,3 +68,10 @@ let g:airline#extensions#tabline#buffer_idx_mode = 1 " Org-mode let g:org_todo_keywords = ['TODO', '|', 'DONE', 'CANCELED'] + +" Floaterm +let g:floaterm_autoinsert = 1 +let g:floaterm_width = 0.85 +let g:floaterm_height = 0.75 +let g:floaterm_wintitle = 0 +let g:floaterm_autoclose = 1 diff --git a/.config/nvim/settings.vim b/.config/nvim/settings.vim index c04aeeb..2f09b0f 100644 --- a/.config/nvim/settings.vim +++ b/.config/nvim/settings.vim @@ -13,6 +13,7 @@ set shortmess+=c set softtabstop=4 set ruler set tabstop=4 +set timeoutlen=0 set undodir=/tmp set undofile set wildmode=longest,list,full diff --git a/.config/nvim/sidebars.vim b/.config/nvim/sidebars.vim index f21cf8c..4aa6707 100644 --- a/.config/nvim/sidebars.vim +++ b/.config/nvim/sidebars.vim @@ -30,7 +30,6 @@ let g:sidebars = { \ } \ } -noremap :spj:term:resize -10i noremap :call sidebar#toggle('nerdtree') noremap :make-j5 noremap :call sidebar#toggle('tagbar') -- cgit v1.2.3