-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
105 lines (87 loc) · 2.6 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
" .vimrc
set nocompatible
filetype off
" set the runtime path to include vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/vundle.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'raimondi/delimitmate'
Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-bundler'
Plugin 'https://github.com/kien/ctrlp.vim'
Plugin 'tpope/vim-vividchalk'
Plugin 'scrooloose/syntastic'
" Plugin 'wookiehangover/jshint.vim'
Plugin 'helino/vim-json'
Plugin 'tpope/vim-surround'
Plugin 'ternjs/tern_for_vim'
Plugin 'kchmck/vim-coffee-script'
call vundle#end()
" to ignore plugin indent changes, instead use:
"
" 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 background=dark
colorscheme vividchalk
set re=1
set clipboard=unnamed
set encoding=utf-8
set fileformats=unix
set ff=unix
set nomodeline
set undodir^=~/.vimtemp/undo
set backupdir^=~/.vimtemp/backup
set directory^=~/.vimtemp/temp
set nobackup
set noswapfile
set showcmd
set wildmenu
set autoread
set autowrite
set ttyfast
"" searching
set incsearch
set ignorecase
set smartcase
filetype plugin indent on
set scrolloff=3
set nu
set expandtab
set tabstop=2
set shiftwidth=2
" explicitly set filetype to ruby
au bufread,bufnewfile {gemfile,rakefile,vagrantfile,thorfile,procfile,capfile,guardfile,config.ru,.railsrc,.irbrc,.pryrc} set ft=ruby
" 4 spaces for tab in python files
autocmd bufenter *.py setlocal softtabstop=4 shiftwidth=4
:nmap <c-s> :wa<cr>
:vmap <c-s> <esc><c-s>gv
:imap <c-s> <esc><c-s>
:map <c-j> <c-w>j<c-w>_
:map <c-k> <c-w>k<c-w>_
:map <c-c> <cr><esc>o
set runtimepath^=~/.vim/bundle/ctrlp.vim
map <c-a> <esc>ggvg<cr>
let g:netrw_localrmdir="rm -r"
"-----SYNTASTIC-------"
let g:syntastic_mode_map = { 'mode': 'active',
\ 'active_filetypes': ['python', 'javascript'],
\ 'passive_filetypes': [] }
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_coffee_checkers = ['coffeelint', 'coffee']
" add spell checking and automatic wrapping at 72 columns for commit messages
autocmd filetype gitcommit setlocal spell textwidth=72