2020-12-16 11:59:29 +00:00
|
|
|
unlet! skip_defaults_vim
|
|
|
|
source $VIMRUNTIME/defaults.vim
|
|
|
|
|
2021-02-23 11:57:53 +00:00
|
|
|
" fix for wsl starting with REPLACE mode
|
|
|
|
nnoremap <esc>^[ <esc>^[
|
2021-02-11 15:56:03 +00:00
|
|
|
|
2021-05-04 13:34:56 +01:00
|
|
|
" disable mouse so that clipboard works properly
|
|
|
|
set mouse=
|
|
|
|
|
2021-02-19 09:59:49 +00:00
|
|
|
set t_TI=""
|
|
|
|
set t_TE=""
|
|
|
|
set t_ut=""
|
2021-02-12 15:18:00 +00:00
|
|
|
|
2021-03-31 08:54:35 +01:00
|
|
|
set noswapfile
|
2021-03-29 14:31:11 +01:00
|
|
|
set updatetime=1000
|
|
|
|
set signcolumn=yes
|
|
|
|
|
2021-02-19 09:59:49 +00:00
|
|
|
colorscheme onehalfdark
|
2021-02-22 09:45:12 +00:00
|
|
|
if exists('+termguicolors') && ($COLORTERM == "24bit" || $COLORTERM == "truecolor")
|
2021-02-19 09:59:49 +00:00
|
|
|
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
|
|
|
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
|
|
|
set termguicolors
|
2021-02-26 11:34:13 +00:00
|
|
|
let g:terminal_ansi_colors = [
|
|
|
|
\ '#282c34',
|
|
|
|
\ '#e06c75',
|
|
|
|
\ '#98c379',
|
|
|
|
\ '#e5c07b',
|
|
|
|
\ '#61afef',
|
|
|
|
\ '#c678dd',
|
|
|
|
\ '#56b6c2',
|
|
|
|
\ '#dcdfe4',
|
|
|
|
\ '#282c34',
|
|
|
|
\ '#e06c75',
|
|
|
|
\ '#98c379',
|
|
|
|
\ '#e5c07b',
|
|
|
|
\ '#61afef',
|
|
|
|
\ '#c678dd',
|
|
|
|
\ '#56b6c2',
|
|
|
|
\ '#dcdfe4'
|
|
|
|
\ ]
|
2021-02-19 09:59:49 +00:00
|
|
|
endif
|
|
|
|
set cursorline
|
2020-12-15 21:12:08 +00:00
|
|
|
set laststatus=2
|
2021-02-04 15:39:00 +00:00
|
|
|
let mapleader=","
|
2020-12-15 21:12:08 +00:00
|
|
|
|
2020-12-15 21:01:32 +00:00
|
|
|
set number
|
2020-12-18 09:18:50 +00:00
|
|
|
set listchars=trail:.,tab:>_
|
2020-12-16 09:04:07 +00:00
|
|
|
set list
|
2020-12-21 08:52:45 +00:00
|
|
|
set wrap
|
|
|
|
set linebreak
|
2021-01-07 08:59:23 +00:00
|
|
|
set autoread
|
2021-02-11 17:03:29 +00:00
|
|
|
set colorcolumn=+1
|
2021-02-23 11:34:38 +00:00
|
|
|
set shiftwidth=2
|
|
|
|
set softtabstop=2
|
2020-12-15 21:01:32 +00:00
|
|
|
|
2021-01-07 08:59:23 +00:00
|
|
|
au BufRead,BufNewFile *.ipynb setlocal filetype=json
|
|
|
|
au BufRead,BufNewFile *.md setlocal spell
|
2021-10-05 14:20:20 +01:00
|
|
|
au BufRead,BufNewFile *.code-workspace setlocal filetype=json
|
2021-10-13 09:16:04 +01:00
|
|
|
au BufRead,BufNewFile *.csv setlocal nowrap
|
2020-12-15 21:01:32 +00:00
|
|
|
syntax on
|
2021-02-25 11:48:38 +00:00
|
|
|
|
2021-02-22 09:35:42 +00:00
|
|
|
if &diff
|
2021-02-25 11:48:38 +00:00
|
|
|
highlight! link DiffText MatchParen
|
2021-02-22 09:35:42 +00:00
|
|
|
endif
|
2021-02-25 11:48:38 +00:00
|
|
|
au OptionSet diff highlight! link DiffText MatchParen
|
2020-12-15 21:01:32 +00:00
|
|
|
|
2020-12-16 16:32:50 +00:00
|
|
|
set expandtab
|
2020-12-15 21:01:32 +00:00
|
|
|
set autoindent
|
|
|
|
set smartindent
|
2020-12-16 16:32:50 +00:00
|
|
|
filetype plugin indent on
|
2020-12-15 21:01:32 +00:00
|
|
|
|
2021-01-04 09:08:22 +00:00
|
|
|
imap jk <Esc>
|
2021-01-07 09:13:12 +00:00
|
|
|
command Bd b# | bd #
|
2021-01-20 14:51:32 +00:00
|
|
|
command! BufOnly silent! execute "%bd|e#|bd#"
|
2021-03-10 14:24:08 +00:00
|
|
|
nnoremap <Leader>b :buffers<CR>:buffer<Space>
|
2021-01-04 09:08:22 +00:00
|
|
|
|
2020-12-15 21:01:32 +00:00
|
|
|
set splitbelow
|
|
|
|
set splitright
|
2020-12-18 10:38:50 +00:00
|
|
|
|
2021-03-29 14:31:11 +01:00
|
|
|
function! GitStatus()
|
|
|
|
let [a,m,r] = GitGutterGetHunkSummary()
|
|
|
|
return printf('%s +%d ~%d -%d', FugitiveHead(), a, m, r)
|
|
|
|
endfunction
|
|
|
|
|
2021-01-26 10:34:44 +00:00
|
|
|
let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
|
|
|
|
|
2021-01-26 10:48:17 +00:00
|
|
|
let g:python_highlight_all = 1
|
|
|
|
|
2021-02-19 09:59:49 +00:00
|
|
|
let g:lightline = { 'colorscheme': 'onehalfdark' }
|
2020-12-18 10:38:50 +00:00
|
|
|
|
|
|
|
let g:lightline.component_expand = {
|
|
|
|
\ 'linter_checking': 'lightline#ale#checking',
|
|
|
|
\ 'linter_infos': 'lightline#ale#infos',
|
|
|
|
\ 'linter_warnings': 'lightline#ale#warnings',
|
|
|
|
\ 'linter_errors': 'lightline#ale#errors',
|
|
|
|
\ 'linter_ok': 'lightline#ale#ok',
|
|
|
|
\ }
|
|
|
|
|
|
|
|
let g:lightline.component_type = {
|
|
|
|
\ 'linter_checking': 'right',
|
|
|
|
\ 'linter_infos': 'right',
|
|
|
|
\ 'linter_warnings': 'warning',
|
|
|
|
\ 'linter_errors': 'error',
|
|
|
|
\ 'linter_ok': 'right',
|
|
|
|
\ }
|
|
|
|
|
|
|
|
let g:lightline.component_function = {
|
2021-03-29 14:31:11 +01:00
|
|
|
\ 'gitstatus': 'GitStatus'
|
2020-12-18 10:38:50 +00:00
|
|
|
\ }
|
|
|
|
|
|
|
|
|
|
|
|
let g:lightline.active = {
|
|
|
|
\ 'left': [ [ 'mode', 'paste' ],
|
2021-03-29 14:31:11 +01:00
|
|
|
\ [ 'gitstatus', 'readonly', 'filename', 'modified' ] ],
|
2020-12-18 10:38:50 +00:00
|
|
|
\ 'right': [ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_ok', 'lineinfo' ],
|
|
|
|
\ [ 'percent' ],
|
|
|
|
\ [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
|
|
|
\ }
|
|
|
|
set noshowmode
|
2021-02-04 08:46:53 +00:00
|
|
|
|
|
|
|
" Load all plugins now.
|
|
|
|
" Plugins need to be added to runtimepath before helptags can be generated.
|
|
|
|
packloadall
|
2021-04-06 09:56:07 +01:00
|
|
|
|
|
|
|
if has('python3')
|
|
|
|
packadd! jedi-vim
|
|
|
|
endif
|
2021-02-04 08:46:53 +00:00
|
|
|
" Load all of the helptags now, after plugins have been loaded.
|
|
|
|
" All messages and errors will be ignored.
|
|
|
|
silent! helptags ALL
|