From 96df378bb0b2fdbe111cfc0d8f0eab7a99a06b3b Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Sat, 15 May 2021 18:45:59 +0300 Subject: [PATCH 1/3] [nvim] add some more mappings --- nvim/plugin/editing.vim | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/nvim/plugin/editing.vim b/nvim/plugin/editing.vim index 46cbe9b..8b2ec27 100644 --- a/nvim/plugin/editing.vim +++ b/nvim/plugin/editing.vim @@ -100,7 +100,8 @@ set commentstring=//%s nnoremap nnoremap - nnoremap Q + " Source of this trick: + nnoremap Q gq " normal mode nnoremap dg :.diffget @@ -110,10 +111,18 @@ set commentstring=//%s xnoremap dp :diffput " Horizontal scroll + " Alt+hjkl and Alt+Arrow - scroll one column/row + " Alt+Shift+hjkl - scroll half a page " normal mode nnoremap zh nnoremap zH nnoremap zh + nnoremap + nnoremap + nnoremap + nnoremap + nnoremap + nnoremap nnoremap zl nnoremap zL nnoremap zl @@ -121,6 +130,12 @@ set commentstring=//%s xnoremap zh xnoremap zH xnoremap zh + xnoremap + xnoremap + xnoremap + xnoremap + xnoremap + xnoremap xnoremap zl xnoremap zL xnoremap zl From 280606b2b014660395774e21f1384b77477e79ac Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Sat, 15 May 2021 19:35:44 +0300 Subject: [PATCH 2/3] [nvim] fix plugins after update --- nvim/colors/dotfiles.vim | 6 ++++-- nvim/plugin/interface.vim | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/nvim/colors/dotfiles.vim b/nvim/colors/dotfiles.vim index 4c137f3..0a69a98 100644 --- a/nvim/colors/dotfiles.vim +++ b/nvim/colors/dotfiles.vim @@ -98,10 +98,12 @@ call s:hi('WarningMsg', 0x9, 'NONE', '', '') call s:hi('TooLong', 0x8, '', '', '') call s:hi('Debug', 0x8, '', '', '') - hi! link CocErrorSign Error + hi! link CocErrorSign Error call s:hi('CocWarningSign', 'bg', 0xA, '', '') call s:hi('CocInfoSign', 'bg', 0xD, '', '') - hi! link CocHintSign CocInfoSign + hi! link CocHintSign CocInfoSign + call s:hi('CocFadeOut', 0x3, '', '', '') + hi! link CocMarkdownLink Underlined call s:hi('FoldColumn', 0xC, 0x1, '', '') call s:hi('Folded', 0x3, 0x1, '', '') diff --git a/nvim/plugin/interface.vim b/nvim/plugin/interface.vim index 194922d..2f4ac1f 100644 --- a/nvim/plugin/interface.vim +++ b/nvim/plugin/interface.vim @@ -93,6 +93,7 @@ endif let g:airline_symbols = { \ 'readonly': 'RO', \ 'whitespace': "\u21e5 ", + \ 'colnr': '', \ 'linenr': '', \ 'maxlinenr': ' ', \ 'branch': '', @@ -103,6 +104,7 @@ endif let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#coc#enabled = 1 let g:airline#extensions#po#enabled = 0 + let g:airline#extensions#scrollbar#enabled = 0 let g:airline#extensions#tabline#left_sep = ' ' let g:airline#extensions#tabline#left_alt_sep = '' @@ -125,6 +127,17 @@ endif endfunction call airline#parts#define('filesize', { 'function': 'StatusLine_filesize' }) + " Undo this commit a little bit: + " + call airline#parts#define('maxlinenr', { + \ 'raw': '/%L%{g:airline_symbols.maxlinenr}', + \ 'accent': 'bold', + \ }) + call airline#parts#define('colnr', { + \ 'raw': '%{g:airline_symbols.colnr}:%v', + \ 'accent': 'none', + \ }) + function s:airline_section_prepend(section, items) let g:airline_section_{a:section} = airline#section#create_right(a:items + ['']) . g:airline_section_{a:section} endfunction From cbaeeb2f131d9734ec6d8f745a2cca40d5dcec72 Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Sat, 15 May 2021 22:00:13 +0300 Subject: [PATCH 3/3] fixup! [zsh] add a couple of aliases to numfmt --- zsh/functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index a9d956d..c5b7eaa 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -2,7 +2,7 @@ count() { print -r -- "$#"; } -bytecount() { wc -c "$@" | numfmt --to=iec-i; } +bytecount() { wc -c "$@" | bytefmt2; } mkcd() { mkdir -p "$@" && cd "${@[-1]}"; }