5f326d48bd
Set spell locally for .md files and set json locally for .ipynb files - instead of globally for each. Set autoread to reload files when changed (e.g. cronjobs or git) Add .swp files to .gitignore
67 lines
1.9 KiB
VimL
67 lines
1.9 KiB
VimL
unlet! skip_defaults_vim
|
|
source $VIMRUNTIME/defaults.vim
|
|
|
|
colorscheme slate
|
|
set laststatus=2
|
|
|
|
set number
|
|
set listchars=trail:.,tab:>_
|
|
set list
|
|
set wrap
|
|
set linebreak
|
|
set autoread
|
|
|
|
au BufRead,BufNewFile *.ipynb setlocal filetype=json
|
|
au BufRead,BufNewFile *.md setlocal spell
|
|
syntax on
|
|
if &diff
|
|
syntax off
|
|
endif
|
|
|
|
set expandtab
|
|
set autoindent
|
|
set smartindent
|
|
filetype plugin indent on
|
|
|
|
noremap <C-J> <C-W><C-J>
|
|
noremap <C-K> <C-W><C-K>
|
|
noremap <C-L> <C-W><C-L>
|
|
noremap <C-H> <C-W><C-H>
|
|
|
|
imap jk <Esc>
|
|
|
|
set splitbelow
|
|
set splitright
|
|
|
|
let g:lightline = {}
|
|
|
|
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
|