Merge pull request #258 from dmitmel/master

[pull] master from dmitmel:master
This commit is contained in:
pull[bot] 2021-05-15 19:05:59 +00:00 committed by GitHub
commit 3f6615710c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 4 deletions

View File

@ -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, '', '')

View File

@ -100,7 +100,8 @@ set commentstring=//%s
nnoremap <C-n> <C-i>
nnoremap <C-p> <C-o>
nnoremap Q <nop>
" Source of this trick: <https://youtu.be/bQfFvExpZDU?t=268>
nnoremap Q gq
" normal mode
nnoremap <leader>dg :.diffget<CR>
@ -110,10 +111,18 @@ set commentstring=//%s
xnoremap <leader>dp :diffput<CR>
" Horizontal scroll
" Alt+hjkl and Alt+Arrow - scroll one column/row
" Alt+Shift+hjkl - scroll half a page
" normal mode
nnoremap <M-h> zh
nnoremap <M-H> zH
nnoremap <M-Left> zh
nnoremap <M-j> <C-e>
nnoremap <M-J> <C-d>
nnoremap <M-Down> <C-e>
nnoremap <M-k> <C-y>
nnoremap <M-K> <C-u>
nnoremap <M-Up> <C-y>
nnoremap <M-l> zl
nnoremap <M-L> zL
nnoremap <M-Right> zl
@ -121,6 +130,12 @@ set commentstring=//%s
xnoremap <M-h> zh
xnoremap <M-H> zH
xnoremap <M-Left> zh
xnoremap <M-j> <C-e>
xnoremap <M-J> <C-d>
xnoremap <M-Down> <C-e>
xnoremap <M-k> <C-y>
xnoremap <M-K> <C-u>
xnoremap <M-Up> <C-y>
xnoremap <M-l> zl
xnoremap <M-L> zL
xnoremap <M-Right> zl

View File

@ -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:
" <https://github.com/vim-airline/vim-airline/commit/8929bc72a13d358bb8369443386ac3cc4796ca16>
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

View File

@ -2,7 +2,7 @@
count() { print -r -- "$#"; }
bytecount() { wc -c "$@" | numfmt --to=iec-i; }
bytecount() { wc -c "$@" | bytefmt2; }
mkcd() { mkdir -p "$@" && cd "${@[-1]}"; }