Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 98 lines (73 sloc) 2.249 kb
36f5668 Add more awesome to the vimrc
Carl Lerche authored
1 set nocompatible
e65d7a2 Add a Rake task to fetch the latest version of nerdtree
Carl Lerche authored
2
36f5668 Add more awesome to the vimrc
Carl Lerche authored
3 set number
6274fd1 Tweak the vimrc
Carl Lerche authored
4 set ruler
36f5668 Add more awesome to the vimrc
Carl Lerche authored
5 syntax on
e65d7a2 Add a Rake task to fetch the latest version of nerdtree
Carl Lerche authored
6
36f5668 Add more awesome to the vimrc
Carl Lerche authored
7 " Whitespace stuff
6274fd1 Tweak the vimrc
Carl Lerche authored
8 set nowrap
36f5668 Add more awesome to the vimrc
Carl Lerche authored
9 set tabstop=2
10 set shiftwidth=2
11 set expandtab
447452a @tmm1 use better trailing character
tmm1 authored
12 set list listchars=tab:\ \ ,trail:·
36f5668 Add more awesome to the vimrc
Carl Lerche authored
13
14 " Searching
15 set hlsearch
16 set incsearch
17 set ignorecase
18 set smartcase
19
20 " Tab completion
21 set wildmode=list:longest,list:full
22 set wildignore+=*.o,*.obj,.git,*.rbc
23
24 " Status bar
25 set laststatus=2
26
27 " NERDTree configuration
28 let NERDTreeIgnore=['\.rbc$', '\~$']
1d03e53 @tmm1 bind <Leader>n to toggle project tree (thx @pointcom)
tmm1 authored
29 map <Leader>n :NERDTreeToggle<CR>
af1ae23 Add a binding to rerun ctags
Carl Lerche authored
30
48976d5 @wuputah limit commandT window to 20 lines
wuputah authored
31 " Command-T configuration
32 let g:CommandTMaxHeight=20
33
f936138 @tmm1 ZoomWin readme + <Leader>z mapping
tmm1 authored
34 " ZoomWin configuration
35 map <Leader>z :ZoomWin<CR>
36
af1ae23 Add a binding to rerun ctags
Carl Lerche authored
37 " CTags
38 map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
001c8f3 @wycats Update the vimrc with some settings from my old vimrc
wycats authored
39
1a844c8 @tmm1 remember cursor position in file
tmm1 authored
40 " Remember last location in file
41 if has("autocmd")
42 au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
43 \| exe "normal g'\"" | endif
44 endif
45
43661f3 Move setting word wrapping to a function
Carl Lerche authored
46 function s:setupWrapping()
47 set wrap
48 set wm=2
49 set textwidth=72
50 endfunction
51
52 function s:setupMarkup()
66d6601 @tmm1 fix typo causing recursive function
tmm1 authored
53 call s:setupWrapping()
43661f3 Move setting word wrapping to a function
Carl Lerche authored
54 map <buffer> <Leader>p :Mm <CR>
55 endfunction
56
001c8f3 @wycats Update the vimrc with some settings from my old vimrc
wycats authored
57 " make and python use real tabs
4dd1d06 @wycats I guess markdown comes with an ftdetect plugin
wycats authored
58 au FileType make set noexpandtab
59 au FileType python set noexpandtab
3585c73 @wycats Add markdown preview
wycats authored
60
61 " Thorfile, Rakefile and Gemfile are Ruby
8ea9fcb Autoset config.ru filetype to ruby
Joe Fiorini authored
62 au BufRead,BufNewFile {Gemfile,Rakefile,Thorfile,config.ru} set ft=ruby
3585c73 @wycats Add markdown preview
wycats authored
63
64 " md, markdown, and mk are markdown and define buffer-local preview
43661f3 Move setting word wrapping to a function
Carl Lerche authored
65 au BufRead,BufNewFile *.{md,markdown,mdown,mkd,mkdn} call s:setupMarkup()
66
67 au BufRead,BufNewFile *.txt call s:setupWrapping()
001c8f3 @wycats Update the vimrc with some settings from my old vimrc
wycats authored
68
69 " allow backspacing over everything in insert mode
70 set backspace=indent,eol,start
71
72 " load the plugin and indent settings for the detected filetype
73 filetype plugin indent on
74
75 " Opens an edit command with the path of the currently edited file filled in
76 " Normal mode: <Leader>e
77 map <Leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
78
79 " Opens a tab edit command with the path of the currently edited file filled in
80 " Normal mode: <Leader>t
81 map <Leader>te :tabe <C-R>=expand("%:p:h") . "/" <CR>
82
83 " Inserts the path of the currently edited file into a command
84 " Command mode: Ctrl+P
85 cmap <C-P> <C-R>=expand("%:p:h") . "/" <CR>
86
2ac3922 @tmm1 dont highlight tabs + look for modelines
tmm1 authored
87 " Use modeline overrides
88 set modeline
89 set modelines=10
90
7286b91 @tmm1 pick default colors I like for console/gui - change them in your .loc…
tmm1 authored
91 " Default color scheme
92 color desert
93
de02cb7 @tmm1 load user local settings from ~/.vimrc.local
tmm1 authored
94 " Include user's local vim config
95 if filereadable(expand("~/.vimrc.local"))
96 source ~/.vimrc.local
97 endif
Something went wrong with that request. Please try again.