![Edward Litherland-Smith](/assets/img/avatar_default.png)
Change from not writing swp file to keeping it in memory, stops writing to disk still but keeps duplicated editing feature of having swp files
122 lines
3.2 KiB
VimL
122 lines
3.2 KiB
VimL
unlet! skip_defaults_vim
|
|
source $VIMRUNTIME/defaults.vim
|
|
|
|
" fix for wsl starting with REPLACE mode
|
|
nnoremap <esc>^[ <esc>^[
|
|
|
|
set t_TI=""
|
|
set t_TE=""
|
|
set t_ut=""
|
|
|
|
set directory=/dev/shm//
|
|
set updatetime=1000
|
|
set signcolumn=yes
|
|
|
|
colorscheme onehalfdark
|
|
if exists('+termguicolors') && ($COLORTERM == "24bit" || $COLORTERM == "truecolor")
|
|
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
|
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
|
set termguicolors
|
|
let g:terminal_ansi_colors = [
|
|
\ '#282c34',
|
|
\ '#e06c75',
|
|
\ '#98c379',
|
|
\ '#e5c07b',
|
|
\ '#61afef',
|
|
\ '#c678dd',
|
|
\ '#56b6c2',
|
|
\ '#dcdfe4',
|
|
\ '#282c34',
|
|
\ '#e06c75',
|
|
\ '#98c379',
|
|
\ '#e5c07b',
|
|
\ '#61afef',
|
|
\ '#c678dd',
|
|
\ '#56b6c2',
|
|
\ '#dcdfe4'
|
|
\ ]
|
|
endif
|
|
set cursorline
|
|
set laststatus=2
|
|
let mapleader=","
|
|
|
|
set number
|
|
set listchars=trail:.,tab:>_
|
|
set list
|
|
set wrap
|
|
set linebreak
|
|
set autoread
|
|
set colorcolumn=+1
|
|
set shiftwidth=2
|
|
set softtabstop=2
|
|
|
|
au BufRead,BufNewFile *.ipynb setlocal filetype=json
|
|
au BufRead,BufNewFile *.md setlocal spell
|
|
syntax on
|
|
|
|
if &diff
|
|
highlight! link DiffText MatchParen
|
|
endif
|
|
au OptionSet diff highlight! link DiffText MatchParen
|
|
|
|
set expandtab
|
|
set autoindent
|
|
set smartindent
|
|
filetype plugin indent on
|
|
|
|
imap jk <Esc>
|
|
command Bd b# | bd #
|
|
command! BufOnly silent! execute "%bd|e#|bd#"
|
|
nnoremap <Leader>b :buffers<CR>:buffer<Space>
|
|
|
|
set splitbelow
|
|
set splitright
|
|
|
|
function! GitStatus()
|
|
let [a,m,r] = GitGutterGetHunkSummary()
|
|
return printf('%s +%d ~%d -%d', FugitiveHead(), a, m, r)
|
|
endfunction
|
|
|
|
let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
|
|
|
|
let g:python_highlight_all = 1
|
|
|
|
let g:lightline = { 'colorscheme': 'onehalfdark' }
|
|
|
|
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 = {
|
|
\ 'gitstatus': 'GitStatus'
|
|
\ }
|
|
|
|
|
|
let g:lightline.active = {
|
|
\ 'left': [ [ 'mode', 'paste' ],
|
|
\ [ 'gitstatus', 'readonly', 'filename', 'modified' ] ],
|
|
\ 'right': [ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_infos', 'linter_ok', 'lineinfo' ],
|
|
\ [ 'percent' ],
|
|
\ [ 'fileformat', 'fileencoding', 'filetype' ] ]
|
|
\ }
|
|
set noshowmode
|
|
|
|
" Load all plugins now.
|
|
" Plugins need to be added to runtimepath before helptags can be generated.
|
|
packloadall
|
|
" Load all of the helptags now, after plugins have been loaded.
|
|
" All messages and errors will be ignored.
|
|
silent! helptags ALL
|