Last active
August 7, 2017 01:17
-
-
Save elliotchance/5801752 to your computer and use it in GitHub Desktop.
My 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
" INSTALL (run this): | |
" cd ~ && curl -s https://gist.github.com/elliotchance/5801752/download | tar -x --strip-components=1 && cat .vimrc | grep '^\"% ' .vimrc | cut -c 3- | bash | |
" Lines started with % will be executed on install: | |
" | |
"% # install ctags-exuberant | |
"% if [ ! -f /usr/local/bin/ctags ]; then | |
"% wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz | |
"% tar -zxf ctags-5.8.tar.gz | |
"% cd ctags-5.8 && ./configure && make && sudo make install && sudo rm -f /usr/bin/ctags && sudo ln -s /usr/local/bin/ctags /usr/bin/ctags && cd .. | |
"% rm -rf ctags-5.8 ctags-5.8.tar.gz | |
"% fi | |
" | |
"% # install YouCompleteMe | |
"% if [ ! -d ~/.vim/bundle/YouCompleteMe ]; then | |
"% git clone git://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe | |
"% cd ~/.vim/bundle/YouCompleteMe | |
"% ./install.sh --clang-completer | |
"% fi | |
" | |
"% if [ ! -d ~/.vim/bundle/vundle ]; then | |
"% git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle | |
"% fi | |
"% vim +BundleInstall +qall | |
" basic options | |
syntax enable | |
set number | |
" editor options | |
set smartindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
inoremap { {<CR>}<Esc>ko | |
" mappings | |
":imap <tab> <c-x><c-o> | |
" this is because I type these by mistake often | |
:command Wq wq | |
:command WQ wq | |
:command Q q | |
" --- automated stuff from here | |
" git & fugitive | |
:command Gw w \| Gwrite | |
" for Vundle | |
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'tpope/vim-fugitive' | |
Bundle 'altercation/vim-colors-solarized' | |
Bundle 'xolox/vim-misc' | |
Bundle 'xolox/vim-easytags' | |
Bundle 'Valloric/YouCompleteMe' | |
Bundle 'shawncplus/phpcomplete.vim' | |
Bundle 'scrooloose/nerdtree' | |
filetype plugin indent on " required! | |
" autocomplete | |
autocmd FileType php set omnifunc=phpcomplete#CompletePHP | |
" colour scheme | |
set background=light | |
colorscheme solarized |
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
# vim-gitgutter | |
cd /tmp && git clone git://github.com/airblade/vim-gitgutter.git | |
cp -r vim-gitgutter/* ~/.vim/ | |
cd - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment