2020-02-14 16:37:50 +01:00
|
|
|
|
colorscheme twilight256
|
2020-02-14 16:37:46 +01:00
|
|
|
|
set mouse=a relativenumber number foldmethod=indent nofoldenable "without nofoldenable all folds are closed at startup"
|
|
|
|
|
set splitbelow splitright
|
|
|
|
|
set autoread
|
2020-02-14 16:37:46 +01:00
|
|
|
|
|
2020-02-14 16:37:46 +01:00
|
|
|
|
" ALE configuration
|
2020-02-09 14:41:30 +01:00
|
|
|
|
let g:ale_fixers = { 'python': ['black'] , 'rust': ['rustfmt']}
|
|
|
|
|
let g:ale_linters = { 'python': ['pylint'], 'bash': ['bashlint', 'shellcheck'], 'rust': ['rustc'] }
|
2020-02-14 16:37:50 +01:00
|
|
|
|
let g:ale_lint_on_insert_leave = 1
|
|
|
|
|
let g:ale_fix_on_insert_leave = 1
|
2020-02-14 16:37:51 +01:00
|
|
|
|
let g:ale_lint_on_text_changed = 1
|
2020-02-14 16:37:50 +01:00
|
|
|
|
|
2020-02-14 16:37:46 +01:00
|
|
|
|
let g:ack_default_options = " --cc --cpp --shell --python"
|
2020-02-14 16:37:49 +01:00
|
|
|
|
" let g:ale_lint_on_save = 1
|
2020-02-14 16:37:46 +01:00
|
|
|
|
let g:ale_fix_on_save = 1
|
|
|
|
|
let g:ale_lint_on_insert_leave = 1
|
|
|
|
|
let g:ale_completion_enabled = 1
|
|
|
|
|
|
|
|
|
|
|
2020-02-14 16:37:46 +01:00
|
|
|
|
packadd termdebug
|
2020-02-14 16:37:50 +01:00
|
|
|
|
|
|
|
|
|
let g:gitgutter_enabled = 1
|
|
|
|
|
|
2020-02-14 16:37:50 +01:00
|
|
|
|
" Highlight all instances of word under cursor, when idle.
|
|
|
|
|
" Useful when studying strange source code.
|
|
|
|
|
" Type z/ to toggle highlighting on/off.
|
|
|
|
|
nnoremap z/ :if AutoHighlightToggle()<Bar>set hls<Bar>endif<CR>
|
|
|
|
|
function! AutoHighlightToggle()
|
|
|
|
|
let @/ = ''
|
|
|
|
|
if exists('#auto_highlight')
|
|
|
|
|
au! auto_highlight
|
|
|
|
|
augroup! auto_highlight
|
|
|
|
|
setl updatetime=4000
|
|
|
|
|
echo 'Highlight current word: off'
|
|
|
|
|
return 0
|
|
|
|
|
else
|
|
|
|
|
augroup auto_highlight
|
|
|
|
|
au!
|
|
|
|
|
au CursorHold * let @/ = '\V\<'.escape(expand('<cword>'), '\').'\>'
|
|
|
|
|
augroup end
|
|
|
|
|
setl updatetime=500
|
|
|
|
|
echo 'Highlight current word: ON'
|
|
|
|
|
return 1
|
|
|
|
|
endif
|
|
|
|
|
endfunction
|
2020-02-14 16:37:51 +01:00
|
|
|
|
|
|
|
|
|
" A friggin python breakpoint. Invoke with @b
|
|
|
|
|
let @b = 'A
breakpoint()<1B><>ajkj0'
|
|
|
|
|
|
2019-12-27 01:24:53 +01:00
|
|
|
|
let g:ctrlp_custom_ignore = {
|
|
|
|
|
\ 'dir': 'target$',
|
|
|
|
|
\ }
|
|
|
|
|
" \ 'file': '\v\.(exe|so|dll)$',
|
|
|
|
|
" \ 'link': 'some_bad_symbolic_links',
|
|
|
|
|
|
2020-02-09 14:37:18 +01:00
|
|
|
|
nnoremap <leader>mk :bel copen<bar>silent (cargo run) !<bar>redraw!<cr>
|
|
|
|
|
|