/
.vimrc
68 lines (50 loc) · 1.25 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
set nocompatible
syntax on
"set paste
"set smartindent
"
set ai "autoindent
set sm "showmatch
set sw=4 "shifwidth
set ts=4 "tabstop
set et "expandtab
set wrap "set nowrap
"set tw=0
set tw=78 "textwidth
set backspace=indent,eol,start
set incsearch
set hlsearch
" show cursor location
set ruler
set cursorline "show underscore line at cursor
set number "show line number
set autoread "autoreload when file is changed
set fileencoding=utf-8
colorschem desert
let java_highlight_all=1
let java_highlight_functions="style"
let java_allow_cpp_keywords=1
" remember the last position
set viminfo='10,\"100,:20,%,n~/.viminfo
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" Plugin
call pathogen#infect()
"enable code folding
set foldenable
"set foldmethod=indent
set foldmethod=syntax
set foldlevel=100
"set foldopen-=search
"set foldopen-=undo
set showcmd
set showmode
" Update javacompelet
" Only do this part when compiled with support for autocommands.
if has("autocmd")
autocmd Filetype java setlocal omnifunc=javacomplete#Complete
endif
setlocal completefunc=javacomplete#CompleteParamsInfo
inoremap <buffer> <C-X><C-U> <C-X><C-U><C-P>
inoremap <buffer> <C-S-Space> <C-X><C-U><C-P>