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/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 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 diff --git a/zsh/functions.zsh b/zsh/functions.zsh index f161e0d..2f21529 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]}"; }