dotfiles/.vim/vimrc

183 lines
5.6 KiB
VimL
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

" vim config
" Ryan Cavicchioni
if has('vim_starting')
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
end
call neobundle#rc(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
if $MONO != "yes"
set t_Co=256 " Set to 256 color mode.
syntax on " Enable syntax highlighting.
set nonumber " Enable line numbering.
else
" makes the autocmd's work when in MONO mode.
filetype on
endif
set nowrap " Disable word wrap.
set tabstop=4 " Set tab to 4 characters.
set smartindent " Enable smart indent.
set autoindent
set shiftwidth=4 " Set smartindent width to 4 characters.
set hlsearch " Highlight search and increment search.
set incsearch
set showmatch " Show matching brackets.
set nomodeline " Disable modeline support.
set softtabstop=4
set showcmd " Show partial command in status line.
set ignorecase " Case insensitive searching.
set smartcase " Smart case matching.
set autowrite " Save before switching buffers.
set number
set smarttab
set listchars=tab:·\ ,eol:$
set expandtab
set backspace=indent,eol
set textwidth=80
set spell
set ruler
set laststatus=2
nnoremap <leader>s :set spell!<CR>
nnoremap <leader>n :set number!<CR>
nnoremap <leader>rn :set relativenumber!<CR>
if has("win32")
silent execute "!mkdir " . $HOME . "\\vimfiles\\backup"
silent execute "!mkdir " . $HOME . "\\vimfiles\\swp"
set backupdir=~/vimfiles/backup/
set directory=~/vimfiles/swp/
else
silent !mkdir -p ~/.vim/{backup,swp}/
set backupdir=~/.vim/backup/
set directory=~/.vim/swp/
endif
au BufNewFile,BufRead *.txt set ft=text
au FileType text set tw=72 spell spelllang=en_us nonumber
au FileType mail set tw=72 spell spelllang=en_us nonumber
au FileType gitcommit set tw=72 spell spelllang=en_us nonumber
au BufNewFile,BufEnter *.phtml set tabstop=2 shiftwidth=2 softtabstop=2
au BufNewFile,BufEnter *.twig set tabstop=2 shiftwidth=2 softtabstop=2 ft=htmljinja
au FileType html set tabstop=2 shiftwidth=2 softtabstop=2
au FileType xml set tabstop=2 shiftwidth=2 softtabstop=2
au FileType ant set tabstop=2 shiftwidth=2 softtabstop=2
au FileType yaml set tabstop=2 shiftwidth=2 softtabstop=2
au FileType php set tabstop=4 shiftwidth=4 softtabstop=4
au FileType make set noexpandtab
au FileType ruby,eruby setlocal ts=2 sw=2 tw=79 et sts=2 autoindent colorcolumn=80
" keyboard shortcuts
nmap <silent> <leader>l :set list!<CR>
nmap <silent> <leader>t :NERDTreeToggle<CR>
nmap <silent> <leader>u :GundoToggle<CR>
"call pathogen#helptags()
"call pathogen#runtime_append_all_bundles()
filetype off
" Plugins
NeoBundle 'Shougo/vimproc'
NeoBundle 'sjl/gundo.vim.git'
NeoBundle 'scrooloose/nerdcommenter.git'
NeoBundle 'scrooloose/nerdtree.git'
NeoBundle 'msanders/snipmate.vim.git'
NeoBundle 'godlygeek/tabular.git'
NeoBundle 'tpope/vim-surround.git'
NeoBundle 'mattn/gist-vim.git'
NeoBundle 'tpope/vim-fugitive.git'
NeoBundle 'python.vim'
NeoBundle 'kien/ctrlp.vim.git'
NeoBundle 'scratch.vim'
NeoBundle 'bling/vim-airline'
NeoBundle 'tpope/vim-characterize'
" Syntax
NeoBundle 'groenewege/vim-less.git'
NeoBundle 'tpope/vim-haml.git'
NeoBundle 'jnwhiteh/vim-golang'
NeoBundle 'slim-template/vim-slim.git'
NeoBundle 'juvenn/mustache.vim.git'
NeoBundle 'puppetlabs/puppet-syntax-vim.git'
" Themes
NeoBundle 'jnurmine/Zenburn.git'
NeoBundle 'ciaranm/inkpot.git'
NeoBundle 'nanotech/jellybeans.vim.git'
NeoBundle 'guns/jellyx.vim.git'
NeoBundle 'strange/strange.vim.git'
NeoBundle 'veloce/vim-aldmeris.git'
NeoBundle 'altercation/vim-colors-solarized.git'
NeoBundle 'Lokaltog/vim-distinguished.git'
NeoBundle 'nelstrom/vim-mac-classic-theme.git'
NeoBundle 'atonse/vydark.git'
NeoBundle 'vim-scripts/vylight.git'
NeoBundle 'tpope/vim-vividchalk.git'
NeoBundle 'ciaranm/inkpot.git'
NeoBundle 'jpo/vim-railscasts-theme.git'
NeoBundle 'oguzbilgic/sexy-railscasts-theme.git'
NeoBundle 'mrkn/mrkn256.vim.git'
NeoBundle 'bcat/abbott.vim.git'
NeoBundle 'twilight256.vim'
NeoBundle 'vilight.vim'
NeoBundle 'dasch/vim-mocha.git'
NeoBundle 'dasch/satellite.git'
NeoBundle 'djjcast/mirodark.git'
NeoBundle 'molok/vim-vombato-colorscheme.git'
NeoBundle 'jelera/vim-gummybears-colorscheme.git'
NeoBundle 'sjl/badwolf.git'
NeoBundle 'shawncplus/skittles_berry.git'
NeoBundle 'Skittles-Dark'
NeoBundle 'tortex'
NeoBundle 'mayansmoke'
NeoBundle 'sjl/badwolf.git'
NeoBundle 'w0ng/vim-hybrid.git'
NeoBundle 'blackgate/tropikos-vim-theme.git'
NeoBundle 'zaki/zazen.git'
NeoBundle 'jonathanfilip/vim-lucius.git'
NeoBundle 'chriskempson/vim-tomorrow-theme.git'
NeoBundle 'tangphillip/SunburstVIM.git'
NeoBundle 'nelstrom/vim-blackboard.git'
NeoBundle 'tomasr/molokai.git'
NeoBundle 'zeis/vim-kolor.git'
NeoBundle 'morhetz/gruvbox.git'
NeoBundle 'trapd00r/neverland-vim-theme.git'
NeoBundle 'chriskempson/base16-vim.git'
NeoBundle 'changyuheng/color-scheme-holokai-of-vim.git'
NeoBundle 'noahfrederick/Hemisu.git'
NeoBundle 'sk1418/last256.git'
NeoBundle 'toupeira/vim-desertink.git'
NeoBundle 'junegunn/seoul256.vim.git'
NeoBundle 'lsdr/monokai'
NeoBundle 'daylerees/colour-schemes', { "rtp": "vim-themes/" }
NeoBundle 'Pychimp/vim-luna'
NeoBundle 'Pychimp/vim-sol'
NeoBundle 'vim-scripts/wombat256.vim'
NeoBundle 'vim-scripts/Wombat'
colorscheme last256
filetype plugin indent on
" Force hash comments to retain their indentation level.
inoremap # X#
" Configure airline
let g:airline#extensions#tabline#enabled = 1
let g:airline_left_sep=''
let g:airline_right_sep=''
NeoBundleCheck
" If it exists, include user's local vim config
if filereadable(expand("~/.vimrc.local"))
source ~/.vimrc.local
endif