set rtp+=/home/linuxbrew/.linuxbrew/opt/fzf,/usr/local/opt/fzf,/opt/homebrew/opt/fzf nnoremap ,fa :call fzf#run({'sink': 'edit', 'options': '--preview="bat --color=always {}"'}) nnoremap ,ff :call fzf#run({'sink': 'edit', 'options': '--preview="bat --color=always {}"', 'source': 'git ls-files'}) set exrc set secure if has('clipboard') set clipboard^=unnamed,unnamedplus endif set tabstop=4 set shiftwidth=0 set expandtab set rnu set nu set nowrap set shiftround set nohlsearch set incsearch set guicursor=n-v-c:block-Cursor set cursorline set autoindent set ttimeoutlen=50 syntax on nnoremap ,co :copen nnoremap ,cc :cclose nnoremap ,cq :call setqflist([]):cclose nnoremap ,ct :call setqflist([{'filename': expand('%'), 'lnum': line('.'), 'col': col('.'), 'text': 'TODO'}], 'a') nnoremap ,cf :cfirst nnoremap ,cl :clast nnoremap :cnextzz nnoremap :cpreviouszz nnoremap ,cu :colder nnoremap ,cr :cnewer nnoremap ,h H nnoremap ,l L nnoremap H ^ nnoremap L $ xnoremap H ^ xnoremap L $ nnoremap ,cD :call setqflist(filter(getqflist(), 'v:val != getqflist()[getqflist({"idx": 0}).idx - 1]')) nnoremap ,t vl:terminala " Don't include curdir, it just causes pain. set viewoptions=folds,cursor autocmd BufWinLeave *.* silent! mkview autocmd BufWinEnter *.* silent! loadview nnoremap h nnoremap j nnoremap k nnoremap l nnoremap zz nnoremap zz tnoremap c c autocmd BufEnter *__virtual* setlocal buftype=nofile bufhidden=hide noswapfile let g:rustfmt_autosave = 0 " remove annoying and bad indentation autocmd FileType * setlocal indentexpr= set wildignore=*.o,*.obj,.git/**,tags,*.pyc " for c tests set errorformat^=[----]\ %f:%l:\ %m set path=** " language specific makeprgs autocmd BufNewFile,BufRead *.h set filetype=c autocmd FileType c setlocal path+=/usr/local/include,/usr/include autocmd FileType python setlocal makeprg=basedpyright autocmd FileType go setlocal makeprg=go noexpandtab autocmd FileType csharp setlocal makeprg=dotnet autocmd FileType yaml setlocal tabstop=2