Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 200 lines (184 sloc) 6.339 kb
f08139a1 »
2012-03-14 Initial commit
1 "
2 " ~/.vimrc
3 "
4
e5edf6f4 »
2012-03-14 added submodule: command-t
5 """"""""""""""""""""""""""""""""""""""""""""""""""
6 " PATHOGEN
7 """"""""""""""""""""""""""""""""""""""""""""""""""
8 " load pathogen plugins and docs
a4c14a9e »
2012-03-14 use pathogen
9 filetype off
10 call pathogen#runtime_append_all_bundles()
11 call pathogen#helptags()
f08139a1 »
2012-03-14 Initial commit
12 " enable file detection
13 filetype plugin indent on
14 syntax on
e5edf6f4 »
2012-03-14 added submodule: command-t
15
16 """"""""""""""""""""""""""""""""""""""""""""""""""
5152904e »
2012-03-17 fix headings
17 " GERERAL
e5edf6f4 »
2012-03-14 added submodule: command-t
18 """"""""""""""""""""""""""""""""""""""""""""""""""
f08139a1 »
2012-03-14 Initial commit
19 " turn off modelines to prevent security vulnerability
20 set nomodeline
21 " allow backspacing over indent,eol,start
22 set backspace=2
23 " number of spaces that <Tab> counts for
24 set tabstop=2
25 " number of spaces for (auto)indent
26 set shiftwidth=2
27 " spaces replace tabs
28 set expandtab
29 " backspace deletes shiftwidth worth of spaces
30 set smarttab
31 " show command in the last line of the screen
32 set showcmd
33 " show line numbers
34 set number
35 " show matching brackets
36 set showmatch
37 " higlight all search matches
38 set hlsearch
39 " search for pattern whilst typing
40 set incsearch
41 " ignore case in search patterns
42 set ignorecase
43 " ovreride ignorecase if search patterns contains an upper case char
44 set smartcase
45 " copy indent from previous line
46 set autoindent
47 " enable use of mouse
48 set mouse=a
49 " set filename to window title
50 set title
296759d4 »
2012-03-15 add syntax folding
51 " set folds based on syntax
52 set foldmethod=syntax
53 set foldlevel=99
f08139a1 »
2012-03-14 Initial commit
54 " comma separated list of screen columns
55 set colorcolumn=80
3557ccaf »
2012-04-03 use solarized colorscheme
56 " visual indicator for current line
57 set cursorline
f08139a1 »
2012-03-14 Initial commit
58 " always show status line
59 set laststatus=2
60 " colors
f3ae8e45 »
2012-04-04 latest pull
61 set background=dark
3557ccaf »
2012-04-03 use solarized colorscheme
62 colorscheme solarized
8d4f70ca »
2012-03-20 better contrast bracket matching
63
64 " gui options
f08139a1 »
2012-03-14 Initial commit
65 if has('gui_running')
8d4f70ca »
2012-03-20 better contrast bracket matching
66 " set font
f08139a1 »
2012-03-14 Initial commit
67 set guifont=Terminus\ 9
8d4f70ca »
2012-03-20 better contrast bracket matching
68 " remove menu and toolbar
69 set guioptions-=m
70 set guioptions-=T
71 " disable cursor blinking
72 set guicursor+=a:blinkon0
8ccdc02c »
2012-03-29 allow gvim paste like terminal
73 " paste like terminal
90c254eb »
2012-03-29 make gvim paste from PRIMARY, not CLIPBOARD
74 map <silent> <S-Insert> "*p
75 imap <silent> <S-Insert> <Esc>"*pa
f08139a1 »
2012-03-14 Initial commit
76 endif
e5edf6f4 »
2012-03-14 added submodule: command-t
77
78 """"""""""""""""""""""""""""""""""""""""""""""""""
79 " MAPPINGS
80 """"""""""""""""""""""""""""""""""""""""""""""""""
b40907f9 »
2012-04-03 add easier bindings for common commands
81 " vim - common commands
82 nnoremap ; :
83 inoremap jj <esc>
84 let mapleader = ','
85 nnoremap <C-h> <C-w>h
86 nnoremap <C-j> <C-w>j
87 nnoremap <C-k> <C-w>k
88 nnoremap <C-l> <C-w>l
94c742f3 »
2012-04-04 shortcuts to switch between dark/light backgrounds
89 " switch light/dark backgrounds
90 nnoremap <F3> :set background=dark<CR>:set guifont=Cousine\ 11<CR>
91 nnoremap <F4> :set background=light<CR>:set guifont=Cousine\ 11<CR>
e5edf6f4 »
2012-03-14 added submodule: command-t
92 " vim - toggle auto-indenting when pasting
93 nnoremap <F2> :set invpaste paste?<CR>
94 set pastetoggle=<F2>
95 " vim - clear search highlights
96 nnoremap <leader><Space> :noh<CR>
97 " vim - switch between last active buffers
98 map <leader><Tab> :b#<CR>
4deb1032 »
2012-03-14 added submodule: gundo
99 " Gundo - view diffs of every save
100 map <leader>g :GundoToggle<CR>
fee9245d »
2012-03-14 added submodule: hammer
101 " Hammer - preview markup languages in web browser
102 map <leader>h :Hammer<CR>
88cd6608 »
2012-03-14 added submodules: nerdtree, tasklist
103 " NERDTree - file browser
104 map <leader>n :NERDTreeToggle<CR>
105 " TaskList - todo
106 map <leader>d <Plug>TaskList
fee9245d »
2012-03-14 added submodule: hammer
107
4deb1032 »
2012-03-14 added submodule: gundo
108 """"""""""""""""""""""""""""""""""""""""""""""""""
5152904e »
2012-03-17 fix headings
109 " PLUGINS
4deb1032 »
2012-03-14 added submodule: gundo
110 """"""""""""""""""""""""""""""""""""""""""""""""""
88cd6608 »
2012-03-14 added submodules: nerdtree, tasklist
111 " right gundo window instead of left
4deb1032 »
2012-03-14 added submodule: gundo
112 let g:gundo_right = 1
40c8f1a2 »
2012-04-08 use github-like template
113 " use template closest looking to github
114 let g:HAMMER_TEMPLATE='default_inline'
115 " enable fancy symbols for Powerline
116 let g:Powerline_symbols = 'fancy'
35b0a0f3 »
2012-04-05 make flake8 default python syntax checker
117 " force syntastic to use flake8
118 let g:syntastic_python_checker = 'flake8'
119 " ignore >80 chars pep8 checker
120 let g:syntastic_python_checker_args='--ignore=E501'
88cd6608 »
2012-03-14 added submodules: nerdtree, tasklist
121 " ignore temp files in nerdtree
122 let NERDTreeIgnore=['\.pyc$', '\.swp$']
a34fa01c »
2012-03-14 added submodule: fugitive
123
0c089bd5 »
2012-03-14 added submodule: neocomplcache
124 """"""""""""""""""""""""""""""""""""""""""""""""""
125 " NEOCOMPLCACHE
126 """"""""""""""""""""""""""""""""""""""""""""""""""
127 " Use neocomplcache.
128 let g:neocomplcache_enable_at_startup = 1
129 " Use smartcase.
130 let g:neocomplcache_enable_smart_case = 1
131 " Use camel case completion.
132 let g:neocomplcache_enable_camel_case_completion = 1
133 " Use underbar completion.
134 let g:neocomplcache_enable_underbar_completion = 1
135 " Set minimum syntax keyword length.
136 let g:neocomplcache_min_syntax_length = 3
137 let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
a34fa01c »
2012-03-14 added submodule: fugitive
138
0c089bd5 »
2012-03-14 added submodule: neocomplcache
139 " Define dictionary.
9e1c348e »
2012-03-14 added submodule: nerdcommenter
140 let g:neocomplcache_dictionary_filetype_lists = { 'default' : '' }
0c089bd5 »
2012-03-14 added submodule: neocomplcache
141
142 " Define keyword.
143 if !exists('g:neocomplcache_keyword_patterns')
144 let g:neocomplcache_keyword_patterns = {}
145 endif
146 let g:neocomplcache_keyword_patterns['default'] = '\h\w*'
147
148 " Plugin key-mappings.
149 inoremap <expr><C-g> neocomplcache#undo_completion()
150 inoremap <expr><C-l> neocomplcache#complete_common_string()
151
152 " Recommended key-mappings.
153 " <CR>: close popup and save indent.
154 inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>"
155 " <TAB>: completion.
156 inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
157 " <C-h>, <BS>: close popup and delete backword char.
158 inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>"
159 inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
160 inoremap <expr><C-y> neocomplcache#close_popup()
161 inoremap <expr><C-e> neocomplcache#cancel_popup()
162
163 " Enable heavy omni completion.
164 if !exists('g:neocomplcache_omni_patterns')
165 let g:neocomplcache_omni_patterns = {}
166 endif
167 let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
168 let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'
169 let g:neocomplcache_omni_patterns.c = '\%(\.\|->\)\h\w*'
170 let g:neocomplcache_omni_patterns.cpp = '\h\w*\%(\.\|->\)\h\w*\|\h\w*::'
9e1c348e »
2012-03-14 added submodule: nerdcommenter
171
172 """"""""""""""""""""""""""""""""""""""""""""""""""
173 " FILETYPES
3557ccaf »
2012-04-03 use solarized colorscheme
174 """""""""""""""""""""""""""""""""""""""""""""""""
9e1c348e »
2012-03-14 added submodule: nerdcommenter
175 " for omnicompletion
176 autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
177 autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
178 autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
179 autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
180 autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
181
182 " indent rules
183 autocmd FileType markdown setlocal tabstop=4 shiftwidth=4
184 autocmd FileType python setlocal tabstop=4 shiftwidth=4
97f8f584 »
2012-03-30 fix auto-openiing folds
185
ce1435f0 »
2012-04-08 correct md extensions
186 " set correct markdown extensions
187 autocmd BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mkd,*.mkdn
188 \ if &ft =~# '^\%(conf\|modula2\)$' |
189 \ set ft=markdown |
190 \ else |
191 \ setf markdown |
192 \ endif
193
97f8f584 »
2012-03-30 fix auto-openiing folds
194 """"""""""""""""""""""""""""""""""""""""""""""""""
195 " MISC
196 """"""""""""""""""""""""""""""""""""""""""""""""""
197 " Don't auto-open folds with {} insert mode when foldmethod=syntax
198 autocmd InsertEnter * if !exists('w:last_fdm') | let w:last_fdm=&foldmethod | setlocal foldmethod=manual | endif
199 autocmd InsertLeave,WinLeave * if exists('w:last_fdm') | let &l:foldmethod=w:last_fdm | unlet w:last_fdm | endif
Something went wrong with that request. Please try again.