summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris <[email protected]>2020-05-14 22:26:50 -0400
committerChris <[email protected]>2020-05-14 22:26:50 -0400
commitcf2e506ff04554f4493aec95e3f15c2d1b3217ce (patch)
tree0bd5d6baabcaf366cf97f87cffa3b183107acb91
parent434568b5bb413cd0029f0dcc8f62d42149369c06 (diff)
added stuff for floaterm
-rw-r--r--init.vim7
-rw-r--r--keys/mappings.vim16
-rw-r--r--keys/which-key.vim22
-rw-r--r--vim-plug/plugins.vim2
4 files changed, 42 insertions, 5 deletions
diff --git a/init.vim b/init.vim
index 286fc898..31e1ae6a 100644
--- a/init.vim
+++ b/init.vim
@@ -40,3 +40,10 @@ else
luafile $HOME/.config/nvim/lua/plug-colorizer.lua
" source $HOME/.config/nvim/plug-config/easymotion.vim
endif
+
+" Experimental
+let g:codi#rightalign=0
+let g:floaterm_gitcommit='floaterm'
+let g:floaterm_autoinsert=1
+let g:floaterm_wintitle=0
+
diff --git a/keys/mappings.vim b/keys/mappings.vim
index 33802954..2801b7ff 100644
--- a/keys/mappings.vim
+++ b/keys/mappings.vim
@@ -1,3 +1,8 @@
+
+imap <C-h> <C-w>h
+imap <C-j> <C-w>j
+imap <C-k> <C-w>k
+imap <C-l> <C-w>l
" g Leader key
let mapleader=" "
" let localleader=" "
@@ -47,6 +52,17 @@ else
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
+ " Terminal window navigation
+ tnoremap <C-h> <C-\><C-N><C-w>h
+ tnoremap <C-j> <C-\><C-N><C-w>j
+ tnoremap <C-k> <C-\><C-N><C-w>k
+ tnoremap <C-l> <C-\><C-N><C-w>l
+ inoremap <C-h> <C-\><C-N><C-w>h
+ inoremap <C-j> <C-\><C-N><C-w>j
+ inoremap <C-k> <C-\><C-N><C-w>k
+ inoremap <C-l> <C-\><C-N><C-w>l
+ tnoremap <Esc> <C-\><C-n>
+
" Use alt + hjkl to resize windows
nnoremap <silent> <M-j> :resize -2<CR>
nnoremap <silent> <M-k> :resize +2<CR>
diff --git a/keys/which-key.vim b/keys/which-key.vim
index 87eda181..68c53ba6 100644
--- a/keys/which-key.vim
+++ b/keys/which-key.vim
@@ -43,6 +43,18 @@ let g:which_key_map['z'] = [ 'Goyo' , 'zen' ]
" Group mappings
+" a is for actions
+let g:which_key_map.a = {
+ \ 'name' : '+actions' ,
+ \ 'c' : [':ColorizerToggle' , 'colorizer'],
+ \ 'e' : [':CocCommand explorer' , 'explorer'],
+ \ 'n' : [':set nonumber!' , 'line-numbers'],
+ \ 'r' : [':set norelativenumber!' , 'relative line nums'],
+ \ 's' : [':let @/ = ""' , 'remove search highlight'],
+ \ 't' : [':FloatermToggle' , 'terminal'],
+ \ 'v' : [':Vista!!' , 'tag viewer'],
+ \ }
+
" b is for buffer
let g:which_key_map.b = {
\ 'name' : '+buffer' ,
@@ -93,7 +105,7 @@ let g:which_key_map.g = {
\ 'A' : [':Git add %' , 'add current'],
\ 'b' : [':Git blame' , 'blame'],
\ 'B' : [':GBrowse' , 'browse'],
- \ 'c' : [':Git commit -m "autocommit"' , 'commit'],
+ \ 'c' : [':Git commit' , 'commit'],
\ 'd' : [':Git diff' , 'diff'],
\ 'D' : [':Gdiffsplit' , 'diff split'],
\ 'g' : [':GGrep' , 'git grep'],
@@ -151,19 +163,19 @@ let g:which_key_map.l = {
\ 'Z' : [':CocEnable' , 'enable CoC'],
\ }
-
" t is for toggle
let g:which_key_map.t = {
- \ 'name' : '+toggle' ,
- \ 'c' : [':ColorizerToggle' , 'colorizer'],
+ \ 'name' : '+terminal' ,
+ \ 't' : [':CocCommand floaterm.toggle' , 'toggle'],
\ 'e' : [':CocCommand explorer' , 'explorer'],
\ 'n' : [':set nonumber!' , 'line-numbers'],
\ 'r' : [':set norelativenumber!' , 'relative line nums'],
\ 's' : [':let @/ = ""' , 'remove search highlight'],
- \ 't' : [':FloatermToggle' , 'terminal'],
\ 'v' : [':Vista!!' , 'tag viewer'],
\ }
+
+
" Register which key map
call which_key#register('<Space>', "g:which_key_map")
diff --git a/vim-plug/plugins.vim b/vim-plug/plugins.vim
index 6c2eea23..ec3e7a15 100644
--- a/vim-plug/plugins.vim
+++ b/vim-plug/plugins.vim
@@ -86,6 +86,8 @@ call plug#begin('~/.config/nvim/autoload/plugged')
" Plug 'jbgutierrez/vim-better-comments'
" Echo doc
" Plug 'Shougo/echodoc.vim'
+ " Interactive code
+ Plug 'metakirby5/codi.vim'
endif