-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
97 lines (82 loc) · 3.12 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
set nocompatible
set encoding=utf-8
set showcmd " display incomplete commands
" Set the command line height to two lines.
" Otherwise long messages (like after running prettier) won't fit
" in the command line which in turn will cause vim to display
" a prompt. http://vim.wikia.com/wiki/Avoiding_the_%22Hit_ENTER_to_continue%22_prompts
set cmdheight=2
set undofile " Maintain undo history between sessions
set undodir=~/.vim-undodir
set spell spelllang=en_us " spellchecking
" Whitespace
"===========
set nowrap " don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces (or set this to 4)
set expandtab " use spaces, not tabs (optional)
set backspace=indent,eol,start " backspace through everything in insert mode
" Searching
"=========================
set hlsearch " highlight matches
set incsearch " incremental searching
set ignorecase " searches are case insensitive...
set smartcase " ... unless they contain at least one capital letter
" List chars
"=========================
set listchars="" " Reset the listchars
set listchars=tab:\ \ " a tab should display as " ", trailing whitespace as "."
set listchars+=trail:. " show trailing spaces as dots
set listchars+=extends:> " The character to show in the last column when wrap is
" off and the line continues beyond the right of the screen
set listchars+=precedes:< " The character to show in the last column when wrap is
" off and the line continues beyond the left of the screen
set list
" Ignore files
"=========================
set wildignore+=*.o,*.out,*.obj,.git,*.rbc,*.rbo,*.class,.svn,*.gem
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.bundle/*,*/.sass-cache/*
set wildignore+=*/tmp/cache/assets/*/sprockets/*,*/tmp/cache/assets/*/sass/*
set wildignore+=*/tmp/*,*.so,*.zip
set wildignore+=*.swp,*~,._*
" nvim
"=========================
let g:loaded_python_provider = 0
" neovim doesn't check if the file was changed by default
" https://github.com/qvacua/vimr/issues/242#issuecomment-318549413
au FocusGained * checktime
set noautoread
" fzf
"=========================
if executable('fzf')
set rtp+=/usr/local/opt/fzf
set rtp+=/opt/homebrew/opt/fzf
endif
" chruby
"=========================
set shell=$SHELL
" NeoBundle
"=========================
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
NeoBundleFetch 'Shougo/neobundle.vim'
" Don't load CSApprox plugin
let g:CSApprox_loaded = 1
" All bundles are in bundle/bundles file
source ~/.vim/plugins.vim
call neobundle#end()
filetype plugin indent on
filetype detect " Required by matchit
NeoBundleCheck
" Commands
"=========================
source ~/.vim/commands.vim
" Mappings
"=========================
source ~/.vim/mappings.vim
" Other settings
"=========================
source ~/.vim/other_settings.vim