Created
September 6, 2014 21:30
-
-
Save otoolep/0ecdaf865e9d1da7b3df to your computer and use it in GitHub Desktop.
vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" 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' | |
" After adding a line here, bring up vim and enter | |
" :PluginInstall | |
Plugin 'fatih/vim-go' | |
Plugin 'Lokaltog/vim-easymotion' | |
"Plugin 'bling/vim-airline' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'terryma/vim-multiple-cursors' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - list configured plugins | |
" :PluginInstall(!) - install (update) plugins | |
" :PluginSearch(!) foo - search (or refresh cache first) for foo | |
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
syntax on | |
set hlsearch | |
set incsearch | |
set wrap lbr | |
set tabstop=4 | |
highlight ExtraWhitespace ctermbg=red guibg=red | |
match ExtraWhitespace /\s\+$/ | |
let _curfile = expand("%:t") | |
if _curfile =~ "Makefile" || _curfile =~ "makefile" || _curfile =~ ".*\.mk" || _curfile =~ ".*\.am" || _curfile =~ ".*\.go" | |
set noexpandtab | |
else | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
endif | |
" Remember last position | |
function! ResCur() | |
if line("'\"") <= line("$") | |
normal! g`" | |
return 1 | |
endif | |
endfunction | |
augroup resCur | |
autocmd! | |
autocmd BufWinEnter * call ResCur() | |
augroup END | |
" Vsb# - vertically split buffer # | |
command -nargs=1 Vsb call VsbFunction(<f-args>) | |
function VsbFunction (arg1) | |
execute 'vert sb' a:arg1 | |
endfunction | |
" Coding shortcuts | |
" Javascript | |
imap ;ld logger.debug();<left><left> | |
imap ;cl console.log();<left><left> | |
imap ;rq require('');<left><left><left> | |
imap ;set var self = this; | |
" Go | |
imap ;ie if err != nil {<CR><CR>}<up> | |
imap ;fmp fmt.Println()<left> | |
" Auto-enable NERDtree | |
"autocmd vimenter * NERDTree |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment