diff --git a/config.yaml b/config.yaml index fc2cfc6..c7b8948 100644 --- a/config.yaml +++ b/config.yaml @@ -40,15 +40,17 @@ profiles: - blender variables: key: + layout: colemak left: n down: e up: i right: o next: l + insertMode: s font: mono: Fira Code interface: Inter - gtk_theme: materia-custom-accent + gtk_theme: materia-custom-accent-dark cursor_theme: capitaine-cursors color: accent: '#D9534F' diff --git a/dotfiles/nvim/init.vim b/dotfiles/nvim/init.vim index 11dd917..40b5356 100644 --- a/dotfiles/nvim/init.vim +++ b/dotfiles/nvim/init.vim @@ -62,7 +62,7 @@ " HTML shortcuts Plug 'mattn/emmet-vim' - " Plug 'jiangmiao/auto-pairs' + Plug 'jiangmiao/auto-pairs' Plug 'tpope/vim-surround' Plug 'junegunn/vim-easy-align' Plug 'tpope/vim-commentary' @@ -189,10 +189,10 @@ call plug#end() " " Basic motion - noremap {{@@ key.left @@}} - noremap {{@@ key.down @@}} - noremap {{@@ key.up @@}} - noremap {{@@ key.right @@}} + map {{@@ key.left @@}} + map {{@@ key.down @@}} + map {{@@ key.up @@}} + map {{@@ key.right @@}} noremap {{@@ key.left @@}} :wincmd h noremap {{@@ key.down @@}} :wincmd j @@ -202,32 +202,48 @@ call plug#end() noremap {{@@ key.next @@}} n noremap {{@@ key.next.upper() @@}} N - noremap t i - noremap T I + noremap {{@@ key.insertMode @@}} i + noremap {{@@ key.insertMode.upper() @@}} I - noremap h o - noremap H O + {%@@ if key.layout == "colemak" @@%} + + " insert on next line + noremap h o + noremap H O + + " To end of word + noremap t e + noremap T E + + " inneR object (like vip) + onoremap r i + {%@@ for move in "p{([w" @@%} + nnoremap vr{{@@ move @@}} vi{{@@ move @@}} + {%@@ endfor @@%} + + {%@@ endif @@%} + + {%@@ if key.layout == "dvorak" @@%} + + " Added benefits + noremap - $ + noremap _ ^ + noremap N + noremap T + + {%@@ endif @@%} - " Added benefits - noremap - $ - noremap _ ^ - " noremap N - " noremap T noremap {{@@ key.down.upper() @@}} 8 noremap {{@@ key.up.upper() @@}} 8 - " noremap D + noremap D - " Single charater traversal - imap - imap + "open folds + nmap {{@@ key.right @@}} + nmap :silent! foldopen "I deserve the death sentence nmap :wa - "open folds - nmap {{@@ key.right @@}} - noremap :silent! foldopen - " Easy comment toggle nmap gc :Commentary xmap gc :Commentary @@ -239,10 +255,6 @@ call plug#end() xmap ga (EasyAlign) nmap ga (EasyAlign) - "EasyMotion - " map e (easymotion-prefix) - set ignorecase - map :GFiles " map :Files @@ -250,6 +262,7 @@ call plug#end() " Lanugage Server{{{ " set foldmethod=marker + set ignorecase set hidden set autoread