dotfiles/base/.vimrc

88 lines
2.0 KiB
VimL
Raw Normal View History

2021-01-19 01:19:52 -06:00
execute pathogen#infect()
syntax on
filetype plugin indent on
" Theming
if $TERM != 'linux' && version >= 800
colorscheme gruvbox
set termguicolors
set background=dark
endif
set autoread " Automatically read when a file is changed outside of Vim
set clipboard=unnamedplus " Use XA_PRIMARY clipboard by default
set encoding=utf-8
set foldmethod=syntax
set hidden " Allow buffer switching without saving
set incsearch " Search while you type
set laststatus=2 " Always show statusbar
set list
set listchars=tab:>·,trail
set modeline
set modelines=5
set nofoldenable " Fuck autofolding
set number relativenumber " Relative line numbering
set t_Co=256
set viminfo='20,<1000,s1000 " Increase buffer size
" Templates
let g:email = 'jacob@babor.tech'
let g:user = 'Jacob Babor'
2021-01-19 01:19:52 -06:00
let g:license = 'MIT'
let g:templates_directory = [ '~/.vim/templates' ]
" Lightline
set noshowmode
let g:lightline = {
\ 'active': {
\ 'left': [
\ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified' ],
\ [ 'charvaluehex' ]
\ ],
\ 'right': [
\ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ]
\ ]
\ },
\ 'component': {
\ 'charvaluehex': 'char: 0x%B'
\ },
\}
let g:lightline.colorscheme = 'gruvbox'
2024-08-29 17:39:11 -05:00
hi Normal guibg=NONE ctermbg=NONE
2021-01-19 01:19:52 -06:00
" Jenkinsfile
au BufNewFile,BufRead Jenkinsfile setf groovy
2021-01-19 01:19:52 -06:00
" Json
au BufNewFile,BufRead *.json
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2 |
\ set autoindent |
\ set smartindent
" Python
au BufNewFile,BufRead *.py " Set up nice PEP8 indentation
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
" HTML
au BufNewFile,BufRead *.html,*.php
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2 |
\ set autoindent |
\ set smartindent
" Treat PHP like HTML
au BufNewFile,BufRead *.php
\ set filetype=html
2021-02-15 12:08:38 -06:00
au FileType yaml
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2