Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 179 lines (141 sloc) 4.579 kb
4076211d »
2010-03-04 vimrc now under version control, symlink in home
1 set nocompatible " We're running Vim, not Vi!
2 set title
3
a74208c1 »
2010-09-21 boosted my vim setup!
4 " Use pathogen to easily modify the runtime path to include all
5 " plugins under the ~/.vim/bundle directory
48ded7a0 »
2011-05-18 works now
6 filetype off
7 call pathogen#helptags()
8 call pathogen#runtime_append_all_bundles()
a74208c1 »
2010-09-21 boosted my vim setup!
9
48ded7a0 »
2011-05-18 works now
10 if exists('g:loaded_fugitive') || &cp
fa8a3c32 »
2011-05-17 added gundo + vim-coffee-script
11 set statusline=%<%f\ %h%w%m%r%y\ %{fugitive#statusline()}%=%-17.(%l/%L(%p%%),%c%)
12 endif
bfe2f366 »
2010-09-22 show git branch if in repo
13
48ded7a0 »
2011-05-18 works now
14 syntax on " Enable syntax highlighting
15 filetype on " Enable filetype detection
16 filetype indent on " Enable filetype-specific indenting
17 filetype plugin on " Enable filetype-specific plugins
18
994e3241 »
2010-09-21 , is a better leader!
19 let mapleader = ","
20
a74208c1 »
2010-09-21 boosted my vim setup!
21 " hide buffers instead of closing them
22 set hidden
23
7ffdba0b »
2010-09-22 added a few options
24 set wrap " wrap lines
a74208c1 »
2010-09-21 boosted my vim setup!
25
26 set history=1000 " remember more commands and search history
27 set undolevels=1000 " use many muchos levels of undo
28 set wildignore=*.swp,*.bak,*.pyc,*.rbc,*.class
29
30 set pastetoggle=<F2>
31
71c6a685 »
2010-09-17 always show statusbar
32 " always show the status bar
33 set laststatus=2
34
4076211d »
2010-03-04 vimrc now under version control, symlink in home
35 set shell=/bin/zsh
36 set nu
37 set formatoptions-=o
38 set ignorecase
39 set smartcase
7ffdba0b »
2010-09-22 added a few options
40 set gdefault " applies substitutions globally on lines (like /g)
41 set ruler " show me where the cursor is
4076211d »
2010-03-04 vimrc now under version control, symlink in home
42 set rulerformat=%l/%L(%p%%),%c " a better ruler
43 "set hlsearch
e746a473 »
2010-05-19 do not bell! → no urgency hint
44 set visualbell
45 set noerrorbells
46 set t_vb=
4076211d »
2010-03-04 vimrc now under version control, symlink in home
47
48 set tabstop=4
49 set softtabstop=4
50 set shiftwidth=4
51 set expandtab
52
62ee2a08 »
2010-07-15 wildmenu=on !
53 " instead of :lcd %:p:h
54 " to change directories upon opening a file
55 "set autochdir
56
57 " set wildmenu on
58 set wmnu
59
e746a473 »
2010-05-19 do not bell! → no urgency hint
60 " swap file directory
61 set directory^=~/.vim/swap
62
63 " don't store .viminfo in $HOME
64 set viminfo+=n~/.vim/viminfo
65
4076211d »
2010-03-04 vimrc now under version control, symlink in home
66 " enable display of invisible whitespace
67 set list
68 " toggle invisible whitespace display
69 nmap <leader>l :set list!<CR>
70 set listchars=tab:▸\ ,eol
71
72 colorscheme vibrantink
73
74 " nnoremap F :w<Enter>:colorscheme vibrantink<Enter>
75
76 " for use with :Gist
77 "" clipboard fix
78 let g:gist_clip_command = 'xclip -selection clipboard'
79 " open browser!
80 let g:gist_open_browser_after_post = 1
fa8a3c32 »
2011-05-17 added gundo + vim-coffee-script
81 let g:gist_browser_command = 'chromium %URL% &'
4076211d »
2010-03-04 vimrc now under version control, symlink in home
82
83 " autocmd
84 "" delete trailing whitespace on save
85 "" via http://gist.github.com/227361 (defunkt)
86 "" and
87 "" http://vimcasts.org/episodes/tidying-whitespace/
88 function! <SID>StripTrailingWhitespaces()
89 " Preparation: save last search, and cursor position.
90 let _s=@/
91 let l = line(".")
92 let c = col(".")
93 " Do the business:
94 %s/\s\+$//e
95 " Clean up: restore previous search history, and cursor position
96 let @/=_s
97 call cursor(l, c)
98 endfunction
c119e172 »
2011-02-14 added arduino specific code
99 autocmd BufWritePre *.c,*.rb,*.erl,*.tex,*.xml,*.java,*.js,*.php,*.pde :call <SID>StripTrailingWhitespaces()
4076211d »
2010-03-04 vimrc now under version control, symlink in home
100
101 "" C files
102 au FileType c let $MANSECT="3,2,7,5,1,8"
103 au FileType c set tabstop=8
104 au FileType c set softtabstop=8
105 au FileType c set shiftwidth=8
106 au FileType c set expandtab
107
108 "" LaTex Compile //& Open -
109 "au FileType tex nnoremap Y :w<Enter>:!rake && xpdf %<.pdf<Enter>
110 au FileType tex nnoremap Y :w<CR>:!rake<CR>
111
112 "" erlang files
113 au FileType erlang setlocal foldmethod=manual
114
115 "" PKGBUILD files
a74208c1 »
2010-09-21 boosted my vim setup!
116 "" needs cleanup, maybe own file?
4076211d »
2010-03-04 vimrc now under version control, symlink in home
117 au BufEnter PKGBUILD nested imap <F6> <C-O>mt<C-O>gg<C-O>/^[
118 \t]*md5sums=/<CR><C-O>0<C-O>vf(%d<C-O>dd<C-O>k<C-O>:r!makepkg -g 2>/dev/null<CR><C-O>:nohlsearch<CR><C-O>`t|
119 \ map <silent><F6> mtgg/^[
120 \t]*md5sums=/<CR>0vf(%dddk:r!makepkg -g 2>/dev/null<CR>:nohlsearch<CR>`t
121
c119e172 »
2011-02-14 added arduino specific code
122 " Arduino source files are c++
123 au BufNewFile,BufRead *.pde set filetype=cpp
124
4076211d »
2010-03-04 vimrc now under version control, symlink in home
125 function! InsertTabWrapper()
126 let col = col('.') - 1
127 if !col || getline('.')[col - 1] !~ '\k'
128 return "\<tab>"
129 else
130 return "\<c-p>"
131 endif
132 endfunction
c119e172 »
2011-02-14 added arduino specific code
133 inoremap <tab> <c-r>=InsertTabWrapper()<CR>
4076211d »
2010-03-04 vimrc now under version control, symlink in home
134
fa8a3c32 »
2011-05-17 added gundo + vim-coffee-script
135 " fix Vim's horribly broken default regex “handling”
7ffdba0b »
2010-09-22 added a few options
136 nnoremap / /\v
137 vnoremap / /\v
138
e746a473 »
2010-05-19 do not bell! → no urgency hint
139 " enable :W
fa8a3c32 »
2011-05-17 added gundo + vim-coffee-script
140 " stupid typo
a74208c1 »
2010-09-21 boosted my vim setup!
141 command! W w
142
4076211d »
2010-03-04 vimrc now under version control, symlink in home
143 " disable highlights of last search
a74208c1 »
2010-09-21 boosted my vim setup!
144 "imap <F2> <C-O><F2>
145 "map <silent><F2> :nohlsearch<CR>
7ffdba0b »
2010-09-22 added a few options
146 nmap <silent> <leader><space> :nohlsearch<CR>
a74208c1 »
2010-09-21 boosted my vim setup!
147
4076211d »
2010-03-04 vimrc now under version control, symlink in home
148 " simple switch for cursor{line,column}
149 imap <F4> <C-O><F4>
150 imap <F5> <C-O><F5>
151 map <silent><F4> :set invcursorline<CR>
152 map <silent><F5> :set invcursorcolumn<CR>
a74208c1 »
2010-09-21 boosted my vim setup!
153
4076211d »
2010-03-04 vimrc now under version control, symlink in home
154 " apply rot13 for people snooping over shoulder, good fun
a74208c1 »
2010-09-21 boosted my vim setup!
155 map ,8 <ESC>ggg?G``
4076211d »
2010-03-04 vimrc now under version control, symlink in home
156
a74208c1 »
2010-09-21 boosted my vim setup!
157 map <F9> :TlistToggle <CR>
4076211d »
2010-03-04 vimrc now under version control, symlink in home
158 map <F10> :tabnew <CR>
159 map <F12> :NERDTreeToggle<CR>
160
161 " Easy split window navigation
162 " use ALT+ArrowKeys to switch split windows
a74208c1 »
2010-09-21 boosted my vim setup!
163 nmap <silent> <A-Up> :wincmd k<CR>
164 nmap <silent> <A-Down> :wincmd j<CR>
165 nmap <silent> <A-Left> :wincmd h<CR>
4076211d »
2010-03-04 vimrc now under version control, symlink in home
166 nmap <silent> <A-Right> :wincmd l<CR>
a74208c1 »
2010-09-21 boosted my vim setup!
167
168 cmap w!! w !sudo tee % > /dev/null
7ffdba0b »
2010-09-22 added a few options
169
170 nnoremap j gj
171 nnoremap k gk
172
b3cb4699 »
2011-05-18 added :Ack again
173 nnoremap <leader>a :Ack
174
7ffdba0b »
2010-09-22 added a few options
175 " no one needs help
176 inoremap <F1> <ESC>
177 nnoremap <F1> <ESC>
178 vnoremap <F1> <ESC>
Something went wrong with that request. Please try again.