Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 159 lines (123 sloc) 3.608 kb
b8bdc09 @stevepsharpe Initial commit
authored
1 " No Vi Compatibility. That just sucks.
2 set nocompatible
3
4 " change the mapleader from \ to ,
5 let mapleader=','
6
bb5edc4 @stevepsharpe updates to vimrc
authored
7 " vim configs with pathogen
b8bdc09 @stevepsharpe Initial commit
authored
8 call pathogen#runtime_append_all_bundles()
9 call pathogen#helptags()
10
bb5edc4 @stevepsharpe updates to vimrc
authored
11 filetype plugin indent on
12 set autoindent
13 set smartindent
14 au FileType php set omnifunc=phpcomplete#CompletePHP
15 let php_sql_query=1
16 let php_htmlInStrings=1
17 syntax enable " Turn on syntax highlighting.
b8bdc09 @stevepsharpe Initial commit
authored
18
bb5edc4 @stevepsharpe updates to vimrc
authored
19 " Tabs converted to 4 spaces
20 set shiftwidth=4
21 set tabstop=4
22 set expandtab
23 set smarttab
b8bdc09 @stevepsharpe Initial commit
authored
24 set backspace=indent,eol,start
dc582bf @stevepsharpe config updates and remove snip mate-snippets as it conflicts
authored
25 set nowrap " don't wrap lines
b8bdc09 @stevepsharpe Initial commit
authored
26
27 set history=1000 " remember more commands and search history
28 set undolevels=1000 " use many muchos levels of undo
29 set visualbell " don't beep
30 set noerrorbells " don't beep
31
32 " Enable mouse everywhere
33 set mouse=a
34
35 " Hide mouse pointer while typing
36 set mousehide
37 set mousemodel=popup
38
bb5edc4 @stevepsharpe updates to vimrc
authored
39 " Disable the F1 help key
40 map <F1> <Esc>
41 imap <F1> <Esc>
42
43 " http://vim.wikia.com/wiki/Move_cursor_by_display_lines_when_wrapping
44 nnoremap <silent> j gj
45 nnoremap <silent> k gk
46 vnoremap <silent> j gj
47 vnoremap <silent> k gk
b8bdc09 @stevepsharpe Initial commit
authored
48
bb5edc4 @stevepsharpe updates to vimrc
authored
49 " Minimal number of screen lines to keep above and below the cursor.
50 " This keeps the cursor always in the vertical middle of the screen.
51 set scrolloff=999
52
53 " Use UTF-8
54 set encoding=utf-8
55
56 " Solarized
57 set guifont=Menlo\ Regular:h12
b8bdc09 @stevepsharpe Initial commit
authored
58 set background=dark
59 let g:solarized_termtrans=1
60 let g:solarized_termcolors=256
61 let g:solarized_contrast="high"
62 let g:solarized_visibility="high"
63 colorscheme solarized
64
65 " Activate a permanent ruler
66 set ruler
67
68 " Disable Toolbar, Scrollbar
69 set guioptions-=T
70 set guioptions-=r
71
72 " Highlight current line
bb5edc4 @stevepsharpe updates to vimrc
authored
73 set cursorline
b8bdc09 @stevepsharpe Initial commit
authored
74
bb5edc4 @stevepsharpe updates to vimrc
authored
75 " Show line number, cursor position.
76 set ruler
b8bdc09 @stevepsharpe Initial commit
authored
77
bb5edc4 @stevepsharpe updates to vimrc
authored
78 " Display incomplete commands.
79 set showcmd
b8bdc09 @stevepsharpe Initial commit
authored
80
bb5edc4 @stevepsharpe updates to vimrc
authored
81 " Search as you type.
b8bdc09 @stevepsharpe Initial commit
authored
82 set incsearch
83
bb5edc4 @stevepsharpe updates to vimrc
authored
84 " Ignore case while searching
85 set ignorecase
b8bdc09 @stevepsharpe Initial commit
authored
86
bb5edc4 @stevepsharpe updates to vimrc
authored
87 " Bundle 'scrooloose/syntastic'
88 let g:syntastic_enable_signs=1
b8bdc09 @stevepsharpe Initial commit
authored
89
bb5edc4 @stevepsharpe updates to vimrc
authored
90 " Source the vimrc file after saving it
91 if has("autocmd")
92 autocmd! bufwritepost .vimrc source $MYVIMRC
93 endif
b8bdc09 @stevepsharpe Initial commit
authored
94
bb5edc4 @stevepsharpe updates to vimrc
authored
95 if exists(":Tabularize")
96 nmap <Leader>a= :Tabularize /=<CR>
97 vmap <Leader>a= :Tabularize /=<CR>
98 nmap <Leader>a: :Tabularize /:<CR>
99 vmap <Leader>a: :Tabularize /:<CR>
100 endif
b8bdc09 @stevepsharpe Initial commit
authored
101
bb5edc4 @stevepsharpe updates to vimrc
authored
102 " Quickly edit/reload the vimrc file
103 nmap <silent> <leader>ev :e $MYVIMRC<CR>
104 nmap <silent> <leader>sv :so $MYVIMRC<CR>
b8bdc09 @stevepsharpe Initial commit
authored
105
bb5edc4 @stevepsharpe updates to vimrc
authored
106 " Tagbar
107 nmap <F8> :TagbarToggle<CR>
b8bdc09 @stevepsharpe Initial commit
authored
108
bb5edc4 @stevepsharpe updates to vimrc
authored
109 " NERDTree
110 map <leader>d :execute 'NERDTreeToggle ' . getcwd()<CR>
111
112 " disable arrow keys
113 nnoremap <up> <nop>
114 nnoremap <down> <nop>
115 nnoremap <left> <nop>
116 nnoremap <right> <nop>
117 inoremap <up> <nop>
118 inoremap <down> <nop>
119 inoremap <left> <nop>
120 inoremap <right> <nop>
121 nnoremap j gj
122 nnoremap k gk
123
124 " Resize current window automatically to fill the max. available space
125 " Space is set by the variables above
126 map <leader>f :call CenterCurrentWindow()<cr>
127 map <leader>= <c-w>
b8bdc09 @stevepsharpe Initial commit
authored
128
bb5edc4 @stevepsharpe updates to vimrc
authored
129 function! CenterCurrentWindow()
130 resize
131 vertical resize
132 endfunction
b8bdc09 @stevepsharpe Initial commit
authored
133
bb5edc4 @stevepsharpe updates to vimrc
authored
134 " User space key to make highlighted search results disappear
135 nnoremap <space> :nohlsearch<CR>/<BS>
dc582bf @stevepsharpe config updates and remove snip mate-snippets as it conflicts
authored
136
137 " Disable temp and backup files
138 set wildignore+=*.swp,*~,._*
139
140 ""
141 "" Backup and swap files
142 ""
143
144 set backupdir=~/.vim/_backup// " where to put backup files.
145 set directory=~/.vim/_temp// " where to put swap files.
146
147 "let g:Powerline_symbols = 'fancy'
148
149 if has("statusline") && !&cp
150 set laststatus=2 " always show the status bar
151
152 " Start the status line
153 "set statusline=%f\ %m\ %r
154 "set statusline+=Line:%l/%L[%p%%]
155 "set statusline+=Col:%v
156 "set statusline+=Buf:#%n
157 "set statusline+=[%b][0x%B]
158 endif
Something went wrong with that request. Please try again.