dot-vimrc (2916B)
1 set nocompatible " make vim act like vim and not vi 2 3 filetype plugin indent on 4 5 let mapleader = " " 6 let g:netrw_banner=0 " disable netrw's (filebrowser) banner, which takes up a lot of space 7 let g:netrw_liststyle=3 " enable a tree style list 8 9 set mouse=a " allow the mouse 10 set path+=** " allows for global searches 11 set clipboard^=unnamed 12 set clipboard^=unnamedplus 13 set undofile 14 set undodir=~/.cache/vim/undo 15 set undolevels=1000 16 set ruler " show line and column number (on the statusline) 17 set encoding=utf-8 18 set autoindent " 'n' option in formatoptions below requires autoindent 19 set formatoptions=tcqn1 " specify formatting behavior see 'fo-table' for details 20 set expandtab " use spaces for tabs, run ':retab!' to changes spaces to tabs 21 set noshiftround 22 set scrolloff=10 " offset when scrolling 23 set matchpairs+=<:> " add html pairs '<' & '>', jump pairs with '%' 24 set showmode 25 set showcmd 26 set showbreak=↪\ 27 set incsearch " while typing in search show matches 28 set ignorecase " ignore case in search patterns 29 set smartcase " override ignorecase if search pattern contains upper case 30 set laststatus=2 " always show a statusline 31 set hidden " allows for switching buffers without saving 32 33 set shiftwidth=4 34 set smarttab 35 36 autocmd FileType c setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab 37 autocmd FileType go setlocal noexpandtab tabstop=8 shiftwidth=8 softtabstop=0 38 autocmd FileType html setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab 39 autocmd FileType css setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab 40 autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab 41 autocmd FileType lua setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab 42 autocmd FileType sh setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab 43 autocmd FileType make setlocal noexpandtab tabstop=8 shiftwidth=8 softtabstop=0 44 autocmd FileType markdown setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab 45 autocmd FileType python setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab 46 autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab 47 autocmd FileType toml setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab 48 49 " open the notes file 50 nnoremap <leader>ww :e ~/notes.txt<CR> 51 " open a the current diary 52 nnoremap <leader>w<leader>w :e ~/docs/diary/<C-r>=strftime("%d%m%y")<CR>.txt<CR> 53 " next buffer 54 nnoremap <leader>b :bnext<CR> 55 " previous buffer 56 nnoremap <leader>B :bprev<CR> 57 " jump to a specific buffer 58 nnoremap <leader>bl :buffers<CR>:b 59 " go to Tag (ctags) 60 nnoremap <leader>t <C-]> 61 " jump back (ctags) 62 nnoremap <leader>T <C-t> 63 " taglist (ctags) 64 nnoremap <leader>tl <tselect<CR> 65 nnoremap j gj 66 nnoremap k gk 67 68 syntax off