Files
dotfiles/vim/.vimrc
T
roodletoof 4174d3b9bf remove nvim-cmp, snippy and quickscope
remove the auto attach thing. not needed

remove snippy

remove lazydev

remove quickscope

set colorscheme to quiet on vim

use quiet colorscheme

remove oil

Revert "remove lazydev"

This reverts commit 7e2ee57079.

Revert "remove oil"

This reverts commit 7c411e9708.

add back tree-sitter-manager

add back everforest
2026-09-07 09:08:46 +02:00

103 lines
2.5 KiB
VimL

set termguicolors
set background=dark
colorscheme quiet
nnoremap ,rc :source $MYVIMRC<CR>
let g:rustfmt_autosave = 0
let g:netrw_banner = 0
nnoremap ,cD :call setqflist(filter(getqflist(), 'v:val != getqflist()[getqflist({"idx": 0}).idx - 1]'))<CR>
nnoremap ,cc :cclose<CR>
nnoremap ,cf :cfirst<CR>
nnoremap ,cl :clast<CR>
nnoremap ,co :copen<CR>
nnoremap ,cq :call setqflist([])<CR>:cclose<CR>
nnoremap ,cr :cnewer<CR>
nnoremap ,cu :colder<CR>
nnoremap ,h H
nnoremap ,l L
nnoremap ,t <c-w>v<c-w>l:terminal<CR>a
nnoremap ,rl :checktime<CR>
nnoremap <c-h> <c-w>h
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-l> <c-w>l
nnoremap <c-n> :cnext<CR>zz
nnoremap <c-p> :cprevious<CR>zz
nnoremap <c-d> <c-d>zz
nnoremap <c-u> <c-u>zz
nnoremap H ^
nnoremap L $
" i use ctrl-a for the tmux prefix key
nnoremap <C-a> <Nop>
nnoremap <C-x> <Nop>
nnoremap ,a <C-a>
nnoremap ,x <C-x>
inoremap <c-k> <c-x>
set autowriteall
set autoindent
set cursorline
set expandtab
set exrc
set guicursor=n-v-c:block-Cursor
set incsearch
set nowrap
set nu
set path=**
set secure
set shiftround
set shiftwidth=0
set tabstop=4
set ttimeoutlen=50
set viewoptions=folds,cursor
set wildignore=*.o,*.obj,.git/**,tags,*.pyc
set noswapfile
set makeprg=just
set grepprg=rg\ --vimgrep\ --hidden\ --smart-case\ -g\ \'!**/tags\'\ -g\ \'!**/.git\'
set grepformat=%f:%l:%c:%m
set hlsearch
syntax on
tnoremap <silent> <c-w>c <c-\><c-n><c-w>c
xnoremap <silent> H ^
xnoremap <silent> L $
nnoremap <silent> ,m :make<CR>
nnoremap <silent> - :E<CR>
nnoremap <silent> _ :execute 'Explore ' . fnameescape(getcwd())<CR>
nnoremap <silent> <Esc> :noh<CR><Esc>
if has('clipboard')
set clipboard^=unnamed,unnamedplus
endif
au BufEnter *__virtual* setlocal buftype=nofile bufhidden=hide noswapfile
au BufNewFile,BufRead *.h set filetype=c
au BufWinEnter *.* silent! loadview
au BufWinLeave *.* silent! mkview
au FileType * setlocal indentexpr=
au FileType lua setlocal noexpandtab
au FileType c setlocal noexpandtab
au FileType make setlocal noexpandtab
au FileType yaml setlocal tabstop=2
au FileType json setlocal tabstop=2
function! s:SetFileMark(n) abort
let g:file_marks[a:n] = expand('%:p')
endfunction
function! s:JumpFileMark(n) abort
if has_key(g:file_marks, a:n)
execute 'edit ' . fnameescape(g:file_marks[a:n])
endif
endfunction
let g:file_marks = {}
for s:n in range(0, 9)
execute 'nnoremap m' . s:n . ' :<C-U>call <SID>SetFileMark(' . s:n . ')<CR>'
execute 'nnoremap ''' . s:n . ' :<C-U>call <SID>JumpFileMark(' . s:n . ')<CR>'
endfor