-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc
126 lines (102 loc) · 3.33 KB
/
vimrc
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
" vim: ts=4 sw=4 sts=0
if has('win32') || has('win64')
let &runtimepath = substitute(&runtimepath, '\(Documents and Settings\|Users\)[\\/][^\\/,]*[\\/]\zsvimfiles\>', '.vim','g')
endif
runtime bundle/pathogen/autoload/pathogen.vim
call pathogen#infect()
set nocompatible
set nobackup nowritebackup
set hidden
set autowrite
set wildmenu wildmode=longest:full,full
set background=dark
let mapleader = ","
let g:mapleader = ","
syntax on
set viewoptions=folds,options,cursor,unix,slash
set virtualedit=block
set history=1000
"set spell
" User Interface
set tabpagemax=15
set showmode
set ttyfast
if has('gui_running')
if has('win32') || has('win64')
set guifont=Consolas:h11
else
set guifont=Monaco:h15
endif
set guioptions-=T
set lines=40
endif
if has('cmdline_info')
set ruler
"set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%)
set showcmd
endif
if has('statusline')
set laststatus=2
set statusline=[%n]\ %<%.99f\ %h%w%m%r%{SL('CapsLockStatusline')}%y%{SL('fugitive#statusline')}%#ErrorMsg#%{SL('SyntasticStatuslineFlag')}%*%=%-14.(%l,%c%V%)\ %P
endif
if has('mouse')
set mouse=a
endif
colorscheme inkpot
set cursorline
set number
set backspace=indent,eol,start
set list
set listchars=tab:.>,trail:.,extends:#,nbsp:.
" Formatting
let g:SimpleJsIndenter_BriefMode = 1
set nowrap
set autoindent
set shiftwidth=4
set expandtab
set tabstop=4
set softtabstop=4
" Search and Replace
set ic
set smartcase
set gdefault
if has('extra_search')
set hlsearch
set incsearch
endif
" Filetype
if has('autocmd')
filetype on
filetype plugin indent on
autocmd FileType c,cpp,java,perl,slang set noexpandtab shiftwidth=8 tabstop=8
autocmd FileType javascript set shiftwidth=2 tabstop=2
autocmd FileType html,xhtml set expandtab shiftwidth=4 tabstop=4
autocmd FileType php set expandtab shiftwidth=4 tabstop=4
autocmd FileType c if has('eval') || has('insert_expand') | set omnifunc=ccomplete#Complete | endif
autocmd FileType javascript if has('eval') || has('insert_expand') | set omnifunc=javascriptcomplete#CompleteJS | endif
autocmd FileType php if has('eval') || has('insert_expand') | set omnifunc=phpcomplete#CompletePHP | endif
autocmd FileType python if has('eval') || has('insert_expand') | set omnifunc=pythoncomplete#Complete | endif
autocmd FileType ruby if has('eval') || has('insert_expand') | set omnifunc=rubycomplete#Complete | endif
autocmd FileType sql if has('eval') || has('insert_expand') | set omnifunc=sqlcomplete#Complete | endif
autocmd FileType xml if has('eval') || has('insert_expand') | set omnifunc=xmlcomplete#CompleteTags | endif
autocmd Filetype css if has('smartindent') | set smartindent | endif
autocmd FileType css if has('eval') || has('insert_expand') | set omnifunc=csscomplete#CompleteCSS | endif
autocmd FileType html,xhtml if has('eval') || has('insert_expand') | set omnifunc=htmlcomplete#CompleteTags | endif
autocmd FileType css,html,xhtml set noexpandtab shiftwidth=2 tabstop=2
endif
" Key mappings
map <F2> :NERDTreeToggle<CR>
map <F3> :TagbarToggle<CR>
map <Leader>t :TagbarToggle<CR>
map <Leader>f :NERDTreeToggle<CR>
map <Leader>n :nohl<CR>
" Commands
if has("eval")
function! SL(function)
if exists('*'.a:function)
return call(a:function,[])
else
return ''
endif
endfunction
endif