Skip to content

Instantly share code, notes, and snippets.

@phonyphonecall
Created February 7, 2016 04:11
Show Gist options
  • Save phonyphonecall/361d1f16c15ceafb42f1 to your computer and use it in GitHub Desktop.
Save phonyphonecall/361d1f16c15ceafb42f1 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved, required
filetype off " required
set tags=tags;/
" tabbing
set expandtab
set tabstop=4
set backspace=2
filetype indent on
" hybrid line numbers
set relativenumber
set number
" use tabs in Makefile's
autocmd FileType make setlocal noexpandtab
" use 2 space tabs in html
autocmd FileType html setlocal tabstop=2
"verilog - NOT reloading color... Why?
function FormatVlog()
!iStyle <afile>
edit
endfunction
autocmd BufWritePost *.v call FormatVlog()
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" color
Plugin 'flazz/vim-colorschemes'
" golang
Plugin 'fatih/vim-go'
Plugin 'majutsushi/tagbar'
Plugin 'mattn/emmet-vim'
" EasyMotion
Plugin 'easymotion/vim-easymotion'
" surround
Plugin 'surround'
" s allows quick nav to char of choice
nmap s <Plug>(easymotion-s2)
map / <Plug>(easymotion-sn)
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" color... still searching for the best scheme
set background=dark
syntax enable
" solarized options
" let g:solarized_visibility = "high"
" let g:solarized_contrast = "high"
colorscheme rainbow_neon
" html
autocmd Filetype html filetype indent on
autocmd Filetype html set smartindent
" JLex
au BufRead,BufNewFile *.jlex setfiletype java
" auto format c on write
autocmd BufWritePost *{.c,.h} silent ! clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4, AllowShortFunctionsOnASingleLine: None, KeepEmptyLinesAtTheStartOfBlocks: false}" -i %
" auto format python on write
autocmd BufWritePost *.py silent ! yapf -i %
set autoread
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment