" load other modules source $HOME/.config/nvim/statusline.vim source $HOME/.config/nvim/plugins.vim source $HOME/.config/nvim/bindings.vim " basic stuff syntax on filetype plugin indent on set scrolloff=5 set pumheight=10 set autoindent set smarttab set number relativenumber set clipboard=unnamedplus set inccommand=nosplit set tabstop=2 set shiftwidth=2 set ignorecase set smartcase set undofile set background=light set mouse=a set splitright set splitbelow set noshowmode set shortmess+=I set autochdir scriptencoding utf-8 color biual " ignore files which vim doesn't use set wildignore+=.git,.hg,.svn set wildignore+=*.aux,*.out,*.toc set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest,*.rbc,*.class set wildignore+=*.ai,*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png,*.psd,*.webp set wildignore+=*.avi,*.divx,*.mp4,*.webm,*.mov,*.m2ts,*.mkv,*.vob,*.mpg,*.mpeg set wildignore+=*.mp3,*.oga,*.ogg,*.wav,*.flac,*.opus set wildignore+=*.eot,*.otf,*.ttf,*.woff set wildignore+=*.doc,*.pdf,*.cbr,*.cbz set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*.kgb set wildignore+=*.swp,.lock,.DS_Store,._* " restore cursor position function! ResCur() if line("'\"") <= line("$") normal! g`" return 1 endif endfunction augroup resCur autocmd! autocmd BufWinEnter * call ResCur() augroup END " python paths, needed for virtualenvs let g:python3_host_prog = '/usr/bin/python3' let g:python_host_prog = '/usr/bin/python2' " language-specific augroup langindentation autocmd Filetype c setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 autocmd Filetype cpp setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype css setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype javascript setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype html setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype json setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype scss setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype php setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype yaml setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype sh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 augroup END " automatically reload configs on save autocmd BufWritePost *Xresources,*Xdefaults !xrdb % autocmd BufWritePost *sxhkdrc !pkill -USR1 sxhkd autocmd BufWritePost *picom.conf !pkill -USR1 picom; picom -b " automatically deletes all trailing whitespace and newlines at end of file on save autocmd BufWritePre * %s/\s\+$//e autocmd BufWritepre * %s/\n\+\%$//e " chuj autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o