55 lines
1.7 KiB
VimL
55 lines
1.7 KiB
VimL
|
" lightline config
|
||
|
let g:lightline = {
|
||
|
\ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
|
||
|
\ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }
|
||
|
\ }
|
||
|
|
||
|
" set nowrap, line numbers, hightlight search
|
||
|
set nowrap
|
||
|
set nu
|
||
|
set hlsearch
|
||
|
|
||
|
" set fold settings
|
||
|
set foldmethod=indent
|
||
|
set foldnestmax=10
|
||
|
set foldlevel=2
|
||
|
set nofoldenable
|
||
|
|
||
|
" synchronize with system clipboard
|
||
|
set clipboard=unnamed
|
||
|
|
||
|
" remap shift-enter to fire up the sidebar
|
||
|
" the same remap as above - may be necessary in some distros
|
||
|
nnoremap <silent> <C-M> :leftabove 25vs<CR>:e .<CR>
|
||
|
|
||
|
" View *.hex files in hex
|
||
|
au BufReadPost *.hex silent %!xxd
|
||
|
|
||
|
" Always show the signcolumn, otherwise it would shift the text each time
|
||
|
" diagnostics appear/become resolved.
|
||
|
set signcolumn=yes
|
||
|
|
||
|
" Use <c-space> to trigger completion.
|
||
|
inoremap <silent><expr> <c-space> coc#refresh()
|
||
|
|
||
|
" Use tab for trigger completion with characters ahead and navigate.
|
||
|
" NOTE: There's always complete item selected by default, you may want to enable
|
||
|
" no select by `"suggest.noselect": true` in your configuration file.
|
||
|
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||
|
" other plugin before putting this into your config.
|
||
|
inoremap <silent><expr> <TAB>
|
||
|
\ coc#pum#visible() ? coc#pum#next(1) :
|
||
|
\ CheckBackspace() ? "\<Tab>" :
|
||
|
\ coc#refresh()
|
||
|
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
||
|
|
||
|
" Make <CR> to accept selected completion item or notify coc.nvim to format
|
||
|
" <C-g>u breaks current undo, please make your own choice.
|
||
|
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
||
|
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||
|
|
||
|
function! CheckBackspace() abort
|
||
|
let col = col('.') - 1
|
||
|
return !col || getline('.')[col - 1] =~# '\s'
|
||
|
endfunction
|