improve vim for colemak

This commit is contained in:
lelgenio 2020-09-19 18:26:04 -03:00
parent 9b1da93454
commit 68522b9cba
2 changed files with 42 additions and 27 deletions

View file

@ -40,15 +40,17 @@ profiles:
- blender - blender
variables: variables:
key: key:
layout: colemak
left: n left: n
down: e down: e
up: i up: i
right: o right: o
next: l next: l
insertMode: s
font: font:
mono: Fira Code mono: Fira Code
interface: Inter interface: Inter
gtk_theme: materia-custom-accent gtk_theme: materia-custom-accent-dark
cursor_theme: capitaine-cursors cursor_theme: capitaine-cursors
color: color:
accent: '#D9534F' accent: '#D9534F'

View file

@ -62,7 +62,7 @@
" HTML shortcuts " HTML shortcuts
Plug 'mattn/emmet-vim' Plug 'mattn/emmet-vim'
" Plug 'jiangmiao/auto-pairs' Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-surround' Plug 'tpope/vim-surround'
Plug 'junegunn/vim-easy-align' Plug 'junegunn/vim-easy-align'
Plug 'tpope/vim-commentary' Plug 'tpope/vim-commentary'
@ -189,10 +189,10 @@ call plug#end()
" "
" Basic motion " Basic motion
noremap {{@@ key.left @@}} <left> map {{@@ key.left @@}} <left>
noremap {{@@ key.down @@}} <down> map {{@@ key.down @@}} <down>
noremap {{@@ key.up @@}} <up> map {{@@ key.up @@}} <up>
noremap {{@@ key.right @@}} <right> map {{@@ key.right @@}} <right>
noremap <silent> <C-w>{{@@ key.left @@}} :wincmd h<CR> noremap <silent> <C-w>{{@@ key.left @@}} :wincmd h<CR>
noremap <silent> <C-w>{{@@ key.down @@}} :wincmd j<CR> noremap <silent> <C-w>{{@@ key.down @@}} :wincmd j<CR>
@ -202,32 +202,48 @@ call plug#end()
noremap {{@@ key.next @@}} n noremap {{@@ key.next @@}} n
noremap {{@@ key.next.upper() @@}} N noremap {{@@ key.next.upper() @@}} N
noremap t i noremap {{@@ key.insertMode @@}} i
noremap T I noremap {{@@ key.insertMode.upper() @@}} I
noremap h o {%@@ if key.layout == "colemak" @@%}
noremap H O
" 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 <C-w><C-w>
noremap T <C-w><C-r>
{%@@ endif @@%}
" Added benefits
noremap - $
noremap _ ^
" noremap N <C-w><C-w>
" noremap T <C-w><C-r>
noremap {{@@ key.down.upper() @@}} 8<Down> noremap {{@@ key.down.upper() @@}} 8<Down>
noremap {{@@ key.up.upper() @@}} 8<Up> noremap {{@@ key.up.upper() @@}} 8<Up>
" noremap D <C-w><C-r> noremap D <C-w><C-r>
" Single charater traversal "open folds
imap <C-{{@@ key.down @@}}> <Left> nmap <silent> {{@@ key.right @@}} <right>
imap <C-{{@@ key.up @@}}> <Right> nmap <silent> <right> <right>:silent! foldopen<CR>
"I deserve the death sentence "I deserve the death sentence
nmap <C-s> :wa<CR> nmap <C-s> :wa<CR>
"open folds
nmap <silent> {{@@ key.right @@}} <right>
noremap <silent> <right> <right>:silent! foldopen<CR>
" Easy comment toggle " Easy comment toggle
nmap <silent> gc :Commentary<CR> nmap <silent> gc :Commentary<CR>
xmap <silent> gc :Commentary<CR> xmap <silent> gc :Commentary<CR>
@ -239,10 +255,6 @@ call plug#end()
xmap ga <Plug>(EasyAlign) xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign) nmap ga <Plug>(EasyAlign)
"EasyMotion
" map e <Plug>(easymotion-prefix)
set ignorecase
map <C-j> :GFiles<CR> map <C-j> :GFiles<CR>
" map <C-q> :Files<CR> " map <C-q> :Files<CR>
@ -250,6 +262,7 @@ call plug#end()
" Lanugage Server{{{ " Lanugage Server{{{
" "
set foldmethod=marker set foldmethod=marker
set ignorecase
set hidden set hidden
set autoread set autoread