-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
68 lines (48 loc) · 1.34 KB
/
.vimrc
File metadata and controls
68 lines (48 loc) · 1.34 KB
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
syntax on
filetype plugin indent on
filetype on
set number
set nowrap
set hls
set bg=dark
set autoindent
set tabstop=8
set shiftwidth=8
set expandtab
set smarttab
set backspace=indent,eol,start
set nocursorline
set nofixendofline
if has('mouse')
set mouse=a
endif
filetype plugin on
set omnifunc=syntaxcomplete#Complete
"set completeopt=longest
"set completeopt=menuone,longest,preview
"inoremap <C-Space> <C-x><C-o>
"inoremap <C-@> <C-Space>
" Highlight characters over 80 on one line.
autocmd BufRead,BufNewFile *.cc,*.h,*.py,*.cpp,*.sh,*.conf,*.help syntax match Error "\(^.\{80\}.*\)\@<=."
" Highlight trailing whitespaces.
autocmd BufRead,BufNewFile * syntax match Error "\s\+$"
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
call cursor(l, c)
endfun
autocmd FileType c,cpp,java,php,ruby,python,javascript,sql autocmd BufWritePre <buffer> :call <SID>StripTrailingWhitespaces()
highlight Pmenu ctermfg=black ctermbg=white
highlight PmenuSel ctermfg=white ctermbg=darkblue
hi Visual term=reverse cterm=reverse guibg=Grey
" Code folding plugin.
set foldmethod=indent
set foldlevel=99
set laststatus=2
set statusline=%t[%{strlen(&fenc)?&fenc:'none'},%{&ff}]%h%m%r%y%=%c,%l/%L\ %P
" Extended mouse handling in terminal.
"set ttym=urxvt
set timeoutlen=1000 ttimeoutlen=0
noremap j gj
noremap k gk