From 71c73436eeea476b3f0cffbfcdbfabcf2c3c48cc Mon Sep 17 00:00:00 2001 From: beppe Date: Sat, 15 Jun 2024 22:19:58 +0200 Subject: [PATCH] new ctrl w binds like in vim --- .config/i3/config | 38 +++++++++++++++++++++++++++++++++++ .gitignore | 3 ++- .vimrc | 51 ++++++++++++++++++++++++----------------------- 3 files changed, 66 insertions(+), 26 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 649a16f..a73b838 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -167,6 +167,44 @@ gaps inner 5px gaps outer 4px # resize window (you can also use the mouse for that) + +bindsym ctrl+w mode focus +bindsym ctrl+shift+w mode move +mode "focus" { + bindsym Shift+h focus left + bindsym Shift+j focus down + bindsym Shift+k focus up + bindsym Shift+l focus right + + bindsym h focus left; mode default + bindsym j focus down; mode default + bindsym k focus up; mode default + bindsym l focus right; mode default + + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym ctrl+w mode "default" + bindsym ctrl+shift+w mode "move" +} + + +mode "move" { + bindsym Shift+h move left + bindsym Shift+j move down + bindsym Shift+k move up + bindsym Shift+l move right + + bindsym h move left; mode default + bindsym j move down; mode default + bindsym k move up; mode default + bindsym l move right; mode default + + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym ctrl+shift+w mode "default" + bindsym ctrl+w mode "focus" +} + mode "resize" { # These bindings trigger as soon as you enter the resize mode diff --git a/.gitignore b/.gitignore index ece3e48..0ef73c1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ .config/wally .config/.keymapp .config/google-chrome -.config/wally +.config/GIMP/ +.config/weylus/ diff --git a/.vimrc b/.vimrc index 7b7f3e9..77e50ce 100644 --- a/.vimrc +++ b/.vimrc @@ -19,10 +19,10 @@ set ai set si set wrap -" Visual mode pressing * or # searches for the current selection " Super useful! From an idea by Michael Naumann -vnoremap * :call VisualSelection('', '')/=@/ -vnoremap # :call VisualSelection('', '')?=@/ +"vnoremap * :call VisualSelection('', '')/=@/ +"vnoremap # :call VisualSelection('', '')?=@/ + " enable syntax highlighting syntax on @@ -58,8 +58,7 @@ set showmode "au FocusGained,BufEnter * silent! checktime " mapping a leader allows for more keycombos - -let mapleader = "," +"let mapleader = "," " auto completion menu after tab set wildmenu @@ -70,7 +69,7 @@ set wildignore=*.o,*~,*.pyc,*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store " show current pos info set ruler -set laststatus=2 +"set laststatus=2 "ignore case when searching set ignorecase @@ -79,11 +78,11 @@ set ignorecase set lazyredraw " enable regex enginej -set regexpengine=0 +"set regexpengine=0 "Configure backspace so it acts as it should act -set backspace=eol,start,indent -set whichwrap+=<,>,h,l +"set backspace=eol,start,indent +"set whichwrap+=<,>,h,l "plugins config @@ -93,28 +92,30 @@ call plug#begin('~/.vim/plugged') Plug 'preservim/nerdtree' " Plug 'prabirshrestha/vim-lsp' Plug 'SirVer/ultisnips' - Plug 'sheerun/vim-polyglot' + "Plug 'sheerun/vim-polyglot' Plug 'petrbroz/vim-glsl' - Plug 'Xuyuanp/nerdtree-git-plugin' + "Plug 'Xuyuanp/nerdtree-git-plugin' Plug 'jayli/vim-easycomplete' + Plug 'kien/rainbow_parenthesis' + "Plug 'kien/rainbow_parenth call plug#end() "nerdtree mappings -nnoremap n :NerdTreeFocus +"nnoremap n :NerdTreeFocus nnoremap :NERDTree nnoremap :NERDTreeToggle nnoremap :NERDTreeFind "nerdtree git settings -let g:NERDTreeGitStatusUseNerdFonts = 1 " you should install nerdfonts by yourself. default: 0 +"let g:NERDTreeGitStatusUseNerdFonts = 1 " you should install nerdfonts by yourself. default: 0 "ultisnip config -let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpForwardTrigger="" -let g:UltiSnipsJumpBackwardTrigger="" - -let g:UltiSnipsEditSplit="vertical" +"let g:UltiSnipsExpandTrigger="" +"let g:UltiSnipsJumpForwardTrigger="" +"let g:UltiSnipsJumpBackwardTrigger="" +" +"let g:UltiSnipsEditSplit="vertical" colorscheme gruvbox set background=dark @@ -139,16 +140,16 @@ autocmd! BufNewFile,BufRead *.frag set ft=glsl autocmd! BufNewFile,BufRead *.fsh set ft=glsl -set updatetime=300 +set updatetime=3000 " easy complete settings: " highlight the symbol when holding the cursor if you need it -let g:easycomplete_cursor_word_hl = 1 +"let g:easycomplete_cursor_word_hl = 1 " using nerdfont is highly recommened -let g:easycomplete_nerd_font = 1 +"let g:easycomplete_nerd_font = 1 "goto code nav -noremap gr :EasyCompleteReference -noremap gd :EasyCompleteGotoDefinition -noremap rn :EasyCompleteRename -noremap gb :BackToOrignialBuffer +"noremap gr :EasyCompleteReference +"noremap gd :EasyCompleteGotoDefinition +"noremap rn :EasyCompleteRename +"noremap gb :BackToOrignialBuffer