nixos/vimrc

95 lines
2.6 KiB
VimL
Raw Normal View History

unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
" FIX: ssh from wsl starting with REPLACE mode
" https://stackoverflow.com/a/11940894
"if $TERM =~ 'xterm-256color'
" set noek
"endif
set t_TI=""
set t_TE=""
set t_ut=""
colorscheme onehalfdark
2021-02-22 09:45:12 +00:00
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
endif
set cursorline
set laststatus=2
let mapleader=","
2020-12-15 21:01:32 +00:00
set number
2020-12-18 09:18:50 +00:00
set listchars=trail:.,tab:>_
set list
2020-12-21 08:52:45 +00:00
set wrap
set linebreak
set autoread
set colorcolumn=+1
set shiftwidth=2
set softtabstop=2
2020-12-15 21:01:32 +00:00
au BufRead,BufNewFile *.ipynb setlocal filetype=json
au BufRead,BufNewFile *.md setlocal spell
2020-12-15 21:01:32 +00:00
syntax on
if &diff
syntax off
endif
2020-12-15 21:01:32 +00:00
set expandtab
2020-12-15 21:01:32 +00:00
set autoindent
set smartindent
filetype plugin indent on
2020-12-15 21:01:32 +00:00
2021-01-04 09:08:22 +00:00
imap jk <Esc>
command Bd b# | bd #
command! BufOnly silent! execute "%bd|e#|bd#"
2021-01-04 09:08:22 +00:00
2020-12-15 21:01:32 +00:00
set splitbelow
set splitright
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
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 = {
\ 'gitbranch': 'FugitiveHead'
\ }
let g:lightline.active = {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ],
\ '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
" Load all of the helptags now, after plugins have been loaded.
" All messages and errors will be ignored.
silent! helptags ALL