Skip to content

Instantly share code, notes, and snippets.

@jorge-lavin
Last active August 29, 2015 14:18
Show Gist options
  • Save jorge-lavin/1c5a7ccdeca004ac601e to your computer and use it in GitHub Desktop.
Save jorge-lavin/1c5a7ccdeca004ac601e to your computer and use it in GitHub Desktop.
" Set folding method to be marker for this file
" vim:fdm=marker
" Vundle {{{
" Prepare to install Vundle if needed
let vundle_installed=1 " Assume Vundle is not to be installed
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle.."
echo ""
silent !mkdir -p ~/.vim/bundle
silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
let vundle_installed=0 " Vundle was installed at run time
endif
" Vundle start
filetype off
set nocompatible
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Vundle bundles
Bundle 'gmarik/vundle'
Bundle 'Syntastic'
Bundle 'bling/vim-airline'
" Required by gist
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
Bundle 'ervandew/supertab'
" If Vundle was installed at run time, launch BundleInstall
if vundle_installed == 0
echo "Installing Bundles, please ignore key map error messages"
echo ""
:BundleInstall
endif
" }}}
" General {{{
filetype on
syntax on
colorscheme elflord
set laststatus=2
let g:airline_left_sep = '▶'
let g:airline_right_sep = '◀'
" }}}
" Editing {{{
set softtabstop=4 " A tab is 4 spaces when editing
set number
set ruler
set expandtab " Tabs are spaces
" }}}
" Make and compilation {{{
set makeprg=g++\ -o\ \"%:p:r\"\ \"%:p\"
map <F9> :w<CR>:!clear<CR>:make<CR>
imap <F9> <ESC>:w<CR>:!clear<CR>:make<CR>
map <F5> :!clear<CR>:!%:p:r<CR>
autocmd FileType make set noexpandtab " We dont like 4 spaces in makefiles
" }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment