From bfbda397331e5ef66d2cf2a3f87d3b2e55baa816 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Fri, 25 Sep 2020 15:15:28 -0300 Subject: [PATCH] major improvements to readability and other kbd layouts --- dotfiles/nvim/init.vim | 57 ++++++++++++++++++++++------------------- dotfiles/qutebrowser.py | 14 ++++++---- dotfiles/sway.conf | 2 +- 3 files changed, 41 insertions(+), 32 deletions(-) diff --git a/dotfiles/nvim/init.vim b/dotfiles/nvim/init.vim index dcdf6e6..2f3ee74 100644 --- a/dotfiles/nvim/init.vim +++ b/dotfiles/nvim/init.vim @@ -74,7 +74,7 @@ Plug 'junegunn/fzf.vim' " Completions - Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } + " Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " HTML shortcuts Plug 'mattn/emmet-vim' @@ -132,25 +132,29 @@ call plug#end() set expandtab set smarttab + " Allow moving the cursor anywhere set virtualedit=all + " When to start scrolling the window set scrolloff=8 set sidescrolloff=8 set nowrap - "destaque no nĂºmer de linhas + " Show line numbers on the left set number set relativenumber - "display whitespace + " Display whitespace set listchars=tab:>-,trail:~,extends:>,precedes:< set listchars=space:_,eol:;,tab:>-,trail:~,extends:>,precedes:< set list - "ativa o mouse + " Enable mouse set mouse =a set clipboard +=unnamedplus + + " Rename the terminal set title let g:python_highlight_all = 1 @@ -223,18 +227,26 @@ call plug#end() noremap {{@@ key.up .upper() @@}} :wincmd K noremap {{@@ key.right.upper() @@}} :wincmd L + " Skip 8 lines + noremap {{@@ key.down.upper() @@}} 8 + noremap {{@@ key.up.upper() @@}} 8 + + " Repeat search noremap {{@@ key.next @@}} n noremap {{@@ key.next.upper() @@}} N + " for/backward on tabs nnoremap {{@@ key.tabL @@}} :tabprev nnoremap {{@@ key.tabR @@}} :tabnext + " Enter insert mode noremap {{@@ key.insertMode @@}} i noremap {{@@ key.insertMode.upper() @@}} I + " Keyboard Layout specific {%@@ if key.layout == "colemak" @@%} - " insert on next line + " Insert on next line noremap h o noremap H O @@ -242,20 +254,18 @@ call plug#end() noremap t e noremap T E - " inneR object (like vip) - onoremap r i - {%@@ for move in "pPwW{([" @@%} - nnoremap vr{{@@ move @@}} vi{{@@ move @@}} - {%@@ endfor @@%} - " FZF bindings nmap :Buffers nmap :Files nmap :GFiles - {%@@ endif @@%} + " inneR object (like vip) + onoremap r i + {%@@ for move in "pPwW{(['\"" @@%} + nnoremap vr{{@@ move @@}} vi{{@@ move @@}} + {%@@ endfor @@%} - {%@@ if key.layout == "dvorak" @@%} + {%@@ elif key.layout == "dvorak" @@%} " Added benefits noremap - $ @@ -268,13 +278,16 @@ call plug#end() nmap :Files nmap :Buffers + {%@@ elif key.layout == "qwerty" @@%} + + " FZF bindings + nmap :Buffers + nmap :Files + nmap :GFiles + {%@@ endif @@%} - noremap {{@@ key.down.upper() @@}} 8 - noremap {{@@ key.up.upper() @@}} 8 - " noremap D - - "open folds + " Open folds nmap {{@@ key.right @@}} nmap :silent! foldopen @@ -285,18 +298,10 @@ call plug#end() nmap gc :Commentary xmap gc :Commentary - " Toggle file manager - " map :NERDTreeToggle %:p:h - " EasyAlign xmap ga (EasyAlign) nmap ga (EasyAlign) - " FZF bindings - nmap :Buffers - nmap :Files - nmap :GFiles - "}}} " Lanugage Server{{{ " diff --git a/dotfiles/qutebrowser.py b/dotfiles/qutebrowser.py index dc0ad38..6450ab0 100644 --- a/dotfiles/qutebrowser.py +++ b/dotfiles/qutebrowser.py @@ -349,16 +349,20 @@ config.bind(",r", "spawn --userscript readability") config.bind(";e", "hint links spawn deemix '{hint-url}'") config.bind(";m", "hint links spawn mpv --fs {hint-url}") -config.bind("s", "hint all") -config.bind("S", "hint all tab") +# {%@@ if key.layout == "colemak" @@%} +# +config.bind("t", "hint all") +config.bind("T", "hint all tab") config.bind("h", "set-cmd-text -s :open") config.bind("H", "set-cmd-text -s :open -t") -config.bind("t", "enter-mode insert") +# {%@@ endif @@%} -config.bind("{{@@ key.next @@}}", "search-next") -config.bind("{{@@ key.next.upper() @@}}", "search-prev") +config.bind("{{@@ key.insertMode @@}}", "enter-mode insert") + +config.bind("{{@@ key.next @@}}", "search-next") +config.bind("{{@@ key.next.upper() @@}}", "search-prev") config.bind("{{@@ key.left @@}}", "scroll left") config.bind("{{@@ key.down @@}}", "scroll down") diff --git a/dotfiles/sway.conf b/dotfiles/sway.conf index 1701370..b1748ab 100644 --- a/dotfiles/sway.conf +++ b/dotfiles/sway.conf @@ -134,7 +134,7 @@ # Workspaces: {{{ bindsym $mod+{{@@ key.tabL @@}} workspace prev - bindsym $mod+{{@@ key.tabY @@}} workspace next + bindsym $mod+{{@@ key.tabR @@}} workspace next # Switch to workspace # Move focused container to workspace