Merge branch 'master' of github.com:dnlbauer/dotfiles

This commit is contained in:
Daniel Bauer
2024-08-30 09:27:37 +02:00
2 changed files with 43 additions and 44 deletions

View File

@@ -1,13 +1,33 @@
call plug#begin()
" ** style **
Plug 'vim-airline/vim-airline'
Plug 'morhetz/gruvbox'
syntax on " syntax highlighting
filetype plugin indent on " enable filetype dependent features
"Plug 'Yggdroot/indentLine'
Plug 'nathanaelkane/vim-indent-guides'
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 " use system clipboard
set paste " paste to/from vim
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
" ** features **
Plug 'godlygeek/tabular'
Plug 'preservim/nerdcommenter'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
@@ -15,7 +35,7 @@ nnoremap <C-f> :Files<Cr>
nnoremap <C-g> :Rg<Cr>
" ** syntax **
Plug 'elzr/vim-json'
Plug 'https://github.com/elzr/vim-json.git'
Plug 'stephpy/vim-yaml'
Plug 'lervag/vimtex'
Plug 'ibab/vim-snakemake'
@@ -25,45 +45,17 @@ Plug 'manabuishii/vim-cwl'
call plug#end()
" Always show statusline
set laststatus=2
" Use 256 colours
set t_Co=256
" show linenumber
set number
let g:vim_markdown_folding_disabled = 1
syntax on
filetype plugin indent on
" show tabs with 4 spaces width
set tabstop=4
" use 4 space to indent with '>'
set shiftwidth=4
" insert 4 spaces instead of tab
set expandtab
set colorcolumn=80,100,120
colorscheme gruvbox
let g:gruvbox_contrast_dark = 'hard'
set background=dark
" nerdcommenter
filetype plugin on
" use conceals, but not on inserted lines
set conceallevel=2
set concealcursor=nc
let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1
set cursorline
" yaml spacing
autocmd FileType yml,yaml setlocal ts=2 sts=2 sw=2 expandtab
@@ -72,11 +64,13 @@ autocmd FileType yml,yaml setlocal ts=2 sts=2 sw=2 expandtab
:setlocal foldmethod=syntax " use language syntax for folding
set foldlevelstart=99 " do not fold on open
" change leader key
let mapleader = "."
set clipboard+=unnamed " use system clipboard
set paste " paste to/from vim
set go+=a " auto copy visual selection
" 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

View File

@@ -38,3 +38,8 @@ bindkey -v
bindkey '^f' fzf-file-widget
$HOME/.dotfiles/auto-update.sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
[ -s "$HOME/.cargo/env" ] && \. "$HOME/.cargo/env" # Load cargo env