-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
executable file
·171 lines (133 loc) · 3.77 KB
/
vimrc
File metadata and controls
executable file
·171 lines (133 loc) · 3.77 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
" Turn on Pathogen and load all the bundles
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
filetype plugin indent on
" Turn off VI compatability, we won't need it where we're going
set nocompatible
" Modelines can cause issues??
set modelines=0
" Fix up yer tabs, ya'll
set tabstop=4
set shiftwidth=4
set softtabstop=4
set noexpandtab
" Whitespace
set list listchars=tab:\ \ ,trail:·
" Alright, here's a whole bunch of stuff I have no clue about :)
set number
set encoding=utf-8
set scrolloff=3
set autoindent
set showmode
set showcmd
set hidden
set visualbell
set cursorline
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
" Use tabs instead of opening a buffer on top of another
set switchbuf=usetab
" Tab completion
set wildmenu
set wildmode=list:longest,list:full
set wildignore+=*.o,*.obj,.git,*.rbc,.hg,*.pyc
" Change the leader to comma, because backslash is so passe
let mapleader = ","
" Searching like it's 1999
set ignorecase
set smartcase
set gdefault
set incsearch
set hlsearch
" Textwrap, sho' nuf
set wrap
set linebreak
set nolist
set textwidth=0
set wrapmargin=0
let &showbreak = '> '
" Safe after losing focus
au FocusLost * :wa
" Ack
nnoremap <leader>a :tabnew<CR>:Ack
" Hardwrap paragraphs of text
nnoremap <leader>q gqip
" Fold tag
nnoremap <leader>ft Vatzf
" Sort css properties...whoa
nnoremap <leader>S ?{<CR>jV/^\s*\}<CR>k:sort<CR>:noh<CR>
nnoremap <leader>Sa :g#\({\n\)\@<=#.,/}/sort<CR>:noh<CR>
" Select pasted text
nnoremap <leader>v V`]
" Quickly edit/reload the vimrc file
nmap <leader>v :tabedit $MYVIMRC<CR>
if has("autocmd")
autocmd bufwritepost .vimrc source $MYVIMRC
endif
" Split windows
nnoremap <leader>w <C-w>v<C-w>l
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Set color scheme
if &t_Co >= 256 || has("gui_running")
colorscheme mac_classic
endif
if &t_Co > 2 || has("gui_running")
" switch syntax highlighting on, when the terminal has colors
syntax on
endif
" MacVim Settings
set guifont=Monaco:h12
" Ditch backup files
set nobackup
set noswapfile
" make python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
au FileType python set tabstop=4 textwidth=79 expandtab
" 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>
" Inserts the path of the currently edited file into a command
" Command mode: Ctrl+P
cmap <C-P> <C-R>=expand("%:p:h") . "/" <CR>
" Enable syntastic syntax checking
let g:syntastic_enable_signs=1
let g:syntastic_quiet_warnings=1
" MacVIM shift+arrow-keys behavior (required in .vimrc)
let macvim_hig_shift_movement = 1
" Turn on NERDTree
map <Leader>n :NERDTreeToggle<CR>
" Tweak some NERDCommenter settings
let NERDSpaceDelims = 1
" Refresh Ctags
map <Leader>rt :!/usr/local/bin/ctags --extra=+f -R *<CR><CR>
" Command-T configuration
let g:CommandTMaxHeight=20
let g:CommandTAcceptSelectionTabMap='<CR>'
let g:CommandTAcceptSelectionMap='<C-t>'
" Tlist
map <Leader>tl :TlistToggle<CR>
let tlist_php_settings = 'php;c:class;f:function;d:constant'
let Tlist_Close_On_Select = 1
let Tlist_Ctags_Cmd='/usr/local/bin/ctags'
let Tlist_Show_One_File = 1
let Tlist_GainFocus_On_ToggleOpen = 1
" ConqueTerm Settings
let g:ConqueTerm_TERM = "xterm-color"
" SuperTab Settings (aka, make my tab work normally damn it)
let g:SuperTabMappingForward = '<s-tab>'
let g:SuperTabMappingFowrard = '<s-c-tab>'
" SnipMate
map <Leader>rs :call ReloadAllSnippets()<CR>
" FuzzyFinder
let g:fuf_buffertag_ctagsPath = '/usr/local/bin/ctags'
map <C-S-T> :FufBufferTag<CR>
" Gundo
nnoremap <F5> :GundoToggle<CR>