Files
dotfiles/dot_vimrc
2025-08-28 16:08:13 +02:00

127 lines
3.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
syntax on " syntax highlighting
filetype plugin indent on " enable filetype dependent features
set noswapfile " disable swap file
set number " show line numbers
set cursorline " highlight line of cursor
set conceallevel=2 " hide syntac elements, i.e. the quotations in json
set hlsearch " highlight all search results
set ignorecase " search case insensitive
set incsearch " incremental search
set tabstop=4 " show tabs as 4 spaces
set shiftwidth=4 " indent by 4 spaces with <, > keys
set expandtab " indent by 4 spaces with tab
set colorcolumn=80,100,120 " color column
"let mapleader = "." " change leader key
set clipboard^=unnamed,unnamedplus " yank to clipboard
set go+=a " auto copy visual selection
call plug#begin()
Plug 'vim-airline/vim-airline' " colored status line at bottom
Plug 'morhetz/gruvbox' " theme
Plug 'nathanaelkane/vim-indent-guides' " indentation lines
Plug 'djoshea/vim-autoread' " watch for file changes
" ** features **
Plug 'preservim/nerdcommenter'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
nnoremap <C-f> :Files<Cr>
nnoremap <C-g> :Rg<Cr>
" ** syntax **
Plug 'https://github.com/elzr/vim-json.git'
Plug 'stephpy/vim-yaml'
Plug 'lervag/vimtex'
Plug 'ibab/vim-snakemake'
Plug 'gabrielelana/vim-markdown'
Plug 'airblade/vim-gitgutter'
Plug 'manabuishii/vim-cwl'
Plug 'MunifTanjim/nui.nvim'
Plug 'VonHeikemen/fine-cmdline.nvim'
Plug 'townk/vim-autoclose' " auto close brackets, parenthesis, ..
call plug#end()
let g:vim_markdown_folding_disabled = 1
colorscheme gruvbox
let g:gruvbox_contrast_dark = 'hard'
set background=dark
let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1
" yaml spacing
autocmd FileType yml,yaml setlocal ts=2 sts=2 sw=2 expandtab
" folding
:setlocal foldmethod=syntax " use language syntax for folding
set foldlevelstart=99 " do not fold on open
" json autocmds
augroup json_autocmd
autocmd!
autocmd FileType json set autoindent
autocmd FileType json set formatoptions=tcq2l
autocmd FileType json set textwidth=78 shiftwidth=2
autocmd FileType json set softtabstop=2 tabstop=8
autocmd FileType json set expandtab
autocmd FileType json set foldmethod=syntax
augroup END
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" Vim Powerline configuration (see :help airline-customization)
" unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.colnr = ' ㏇:'
let g:airline_symbols.colnr = ' ℅:'
let g:airline_symbols.crypt = '🔒'
let g:airline_symbols.linenr = '☰'
let g:airline_symbols.linenr = ' ␊:'
let g:airline_symbols.linenr = ' ␤:'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.maxlinenr = '㏑'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.spell = 'Ꞩ'
let g:airline_symbols.notexists = 'Ɇ'
let g:airline_symbols.notexists = '∄'
let g:airline_symbols.whitespace = 'Ξ'
" powerline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.colnr = ' ℅:'
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ' :'
let g:airline_symbols.maxlinenr = '☰ '
let g:airline_symbols.dirty='⚡'
let g:airline_section_z = airline#section#create(['linenr', 'maxlinenr', 'colnr'])
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'jsformatter'