" .vimrc by Miika Nissi " https://github.com/miikanissi " https://miikanissi.com " language specific configs at .vim/ftplugin/.vim " or .vim/after/ftplugin/.vim to not override defaults only add to " variables let $RTP=split(&runtimepath, ',')[0] let $RC="$HOME/.vim/vimrc" " basics filetype plugin indent on syntax on highlight ColorColumn ctermbg=0 guibg=lightgrey colorscheme base16-hopscotch let g:lightline = { \ 'colorscheme': 'wombat', \ } " settings set backspace=indent,eol,start " normal backspace functionality set hidden " hides instead of unloads buffers set path=.,** " path is cur file and dir set wildmenu " tab complete shows all matching files set nocompatible " compatibility vim only set clipboard=unnamed " uses system clipboard set noerrorbells " no error bells set tabstop=4 softtabstop=4 " default tabs set shiftwidth=4 " default shift set expandtab " default tabs set smartindent " default tabs set nu " line numbers set wrap " no wrap set ignorecase " ignores case in search set smartcase " uses smartcase in search set noswapfile " no swap file set nobackup " no backup file " set undodir=~/.vim/undodir " undo dir " set undofile " makes undofiles set incsearch " incremental search enabled set ruler " ruler shows cur pos set modelines=0 " no modelines set colorcolumn=80 " colorcolumn is 80 set lazyredraw " no redraw set magic " magic for regex set scrolloff=5 " shows 5 lines under mouse set matchpairs+=<:> " highlights matching brackets, '%' to jump between them set viminfo='100,<9999,s100 " only stores info from 100 files at a time, 9999 lot. set laststatus=2 " allows lightline to show set noshowmode " -- INSERT -- is not shown as lightline shows it let skip_defaults_vim=1 " disable viminfo set viminfo="" " disable viminfo set showcmd " shows the typed command " file browsing tweaks netrw-browse-maps for mappings let g:netrw_banner=0 " disable banner let g:netrw_browse_split=4 " open in prior window let g:netrw_altv=1 " open splits to right let g:netrw_liststyle=3 " tree view let g:netrw_list_hide=netrw_gitignore#Hide() let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' let g:netrw_dirhistmax=0 " no .netrwhist file " defines leader key as comma let mapleader = "," " snippets nnoremap html :-1read $HOME/.vim/snippets/skeleton.html5jwf>a nnoremap cc :-1read $HOME/.vim/snippets/skeleton.c4ji nnoremap cpp :-1read $HOME/.vim/snippets/skeleton.cpp4ji " terminal commands command! MakeTags !ctags -R . " recursively creates ctags in directory