-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathvimrc
124 lines (95 loc) · 2.48 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
" VIM 7 configuration file
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
" URL: https://github.com/hdima/vim-scripts/blob/master/vimrc
" Last Change: 2012-02-23
" Not compatible with Vi
set nocompatible
" GUI options
if has("gui_running")
" Make gvim looks more like vim
set guioptions+=acghi
set guioptions-=e
set guioptions-=mrLtT
set guifont=DejaVu\ Sans\ Mono\ 9
" Disable pasting text on mouse middle button click
map <MiddleMouse> <Nop>
imap <MiddleMouse> <Nop>
map <2-MiddleMouse> <Nop>
imap <2-MiddleMouse> <Nop>
map <3-MiddleMouse> <Nop>
imap <3-MiddleMouse> <Nop>
map <4-MiddleMouse> <Nop>
imap <4-MiddleMouse> <Nop>
set columns=169
set lines=999
endif
" Automatically insert comment character if we need to
set formatoptions+=ntcroq21
" Highlight and autocomplete search
set hlsearch
set incsearch
" Some automatic cursor moving
set autoindent
set nostartofline
" Don't make chaos on my display
set nowrap
set backspace=indent,eol,start
set nojoinspaces
" Some information is always good...
set showfulltag
set showcmd
set wildmode=list:longest
set laststatus=2
set statusline=%f%=\ %Y\ %c%V,%l/%L\ %P\ [%M%n%W]:%{tabpagenr()}/%{tabpagenr('$')}
" ...but not too much
set report=0
set shortmess+=asWAI
set showtabline=0
set noshowmode
set helpheight=12
set winminheight=0
set sidescroll=15
" Nice :list and :set list
set listchars=tab:>-,trail:.,extends:+,eol:$,precedes:+
set fillchars="vert: ,fold: "
" Fold options
set foldmethod=syntax
set foldnestmax=1
set nofoldenable
" Diff options
set diffopt=filler,context:3
set virtualedit=block
" Always save some info for next time
set history=100
set viminfo='100,h,%
set sessionoptions+=winpos
" Don't save options to session file - it's possibly buggy
set sessionoptions-=options
" Pretty select with mouse and shifted special keys
behave mswin
" ...but not reset selection with not-shifted special keys
set keymodel-=stopsel
set selection=inclusive
set number
set numberwidth=4
set wildignore=*.swp,*.swo,*.beam,*.pyc,*.*~
" Turn off backup files
set nobackup
" Turn off swap files
set updatecount=0
" It's not an MS Word clone
set secure
" Color scheme
color peachpuff
" Highlight syntax
syntax enable
filetype plugin indent on
" Indent commands
com SpaceIndent :set tabstop=4| set shiftwidth=4| set expandtab
com TabIndent :set tabstop=8| set shiftwidth=8| set noexpandtab
" 4 space indent by default
SpaceIndent
" GUI options
if has("gui_running")
vsplit
endif