~/.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 | |
call pathogen#infect() | |
set number | |
set ruler | |
syntax on | |
" Set encoding | |
set encoding=utf-8 | |
" Whitespace stuff | |
set nowrap | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab | |
set list listchars=tab:\ \ ,trail:· | |
" Searching | |
set hlsearch | |
set incsearch | |
set ignorecase | |
set smartcase | |
" Tab completion | |
set wildmode=list:longest,list:full | |
set wildignore+=*.o,*.obj,.git,*.rbc,*.class,.svn,vendor/gems/* | |
" ctrlp | |
" cwd setting: 2 is Nearest Ancestor Containing an RCS dir | |
let g:ctrlp_working_path_mode = 2 | |
" window location: 0 is top of window | |
" let g:ctrlp_match_window_bottom = 0 | |
" Status bar | |
set laststatus=2 | |
" Explicitly tell vim that the terminal has 256 colors | |
set t_Co=256 | |
" Remember last location in file | |
if has("autocmd") | |
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | |
\| exe "normal g'\"" | endif | |
endif | |
function s:setupWrapping() | |
set wrap | |
set wrapmargin=2 | |
set textwidth=72 | |
endfunction | |
" make uses real tabs | |
au FileType make set noexpandtab | |
" Thorfile, Rakefile, Vagrantfile and Gemfile are Ruby | |
au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,config.ru} set ft=ruby | |
" add json syntax highlighting | |
au BufNewFile,BufRead *.json set ft=javascript | |
au BufRead,BufNewFile *.txt call s:setupWrapping() | |
" make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ ) | |
au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79 | |
" allow backspacing over everything in insert mode | |
set backspace=indent,eol,start | |
" load the plugin and indent settings for the detected filetype | |
filetype plugin indent on | |
" Opens an edit command with the path of the currently edited file filled in | |
" Normal mode: <Leader>e | |
map <Leader>e :e <C-R>=expand("%:p:h") . "/" <CR> | |
" Opens a tab edit command with the path of the currently edited file filled in | |
" Normal mode: <Leader>t | |
map <Leader>te :tabe <C-R>=expand("%:p:h") . "/" <CR> | |
" Use modeline overrides | |
set modeline | |
set modelines=10 | |
" Directories for swp files | |
set backupdir=~/.vim/backups | |
set directory=~/.vim/backups | |
" Turn off jslint errors by default | |
let g:JSLintHighlightErrorLine = 0 | |
" Show (partial) command in the status line | |
set showcmd | |
" Include user's local vim config | |
if filereadable(expand("~/.vimrc.local")) | |
source ~/.vimrc.local | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tree ~/.vim
/Users/ntahoeusntaeou/.vim
├── autoload
│ ├── Pl
│ │ └── Colors.vim
│ ├── Pl.vim
│ ├── ctrlp
│ │ ├── buffertag.vim
│ │ ├── dir.vim
│ │ ├── line.vim
│ │ ├── mrufiles.vim
│ │ ├── quickfix.vim
│ │ ├── rtscript.vim
│ │ ├── tag.vim
│ │ ├── undo.vim
│ │ └── utils.vim
│ ├── ctrlp.vim
│ └── pathogen.vim
├── backups
├── bundle
│ └── vim-fugitive
│ ├── README.markdown
│ ├── doc
│ │ └── fugitive.txt
│ └── plugin
│ └── fugitive.vim
├── doc
│ ├── NERD_commenter.txt
│ ├── Powerline.txt
│ ├── ctrlp.txt
│ ├── supertab.txt
│ └── tags
├── ftplugin
│ └── javascript
│ ├── jslint
│ │ ├── jslint-core.js
│ │ ├── runjslint.js
│ │ └── runjslint.wsf
│ └── jslint.vim
├── plugin
│ ├── NERD_commenter.vim
│ ├── Powerline.vim
│ ├── ctrlp.vim
│ └── supertab.vim
├── powerline
│ ├── distinguished
│ │ ├── 00-default.vim
│ │ ├── 50-gundo.vim
│ │ ├── 50-help.vim
│ │ ├── 50-lusty.vim
│ │ ├── 50-manpage.vim
│ │ ├── 50-syntastic.vim
│ │ └── 50-tagbar.vim
│ └── distinguished.vim
└── ruby
└── command-t
├── Makefile
├── ext.bundle
├── ext.o
├── match.o
└── matcher.o