author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Wed, 25 Apr 2012 19:42:00 +0300 | |
changeset 434 | c66a176a8af9 |
parent 224 | c73d2512617d |
child 545 | 3cbd32a78761 |
permissions | -rw-r--r-- |
25 | 1 |
" On loding VIM search for /etc/vimrc, ~/.vimrc. |
2 |
||
209
f236b47efe74
This must be first, because it changes other options as side effect.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
178
diff
changeset
|
3 |
" Do not emulate old vi bug. |
f236b47efe74
This must be first, because it changes other options as side effect.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
178
diff
changeset
|
4 |
" This must be first, because it changes other options as side effect. |
f236b47efe74
This must be first, because it changes other options as side effect.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
178
diff
changeset
|
5 |
set nocompatible |
f236b47efe74
This must be first, because it changes other options as side effect.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
178
diff
changeset
|
6 |
|
211 | 7 |
" Switch syntax highlighting on, when the terminal has colors |
8 |
if &t_Co > 2 || has("gui_running") |
|
9 |
syntax on |
|
10 |
endif |
|
25 | 11 |
|
211 | 12 |
" A 256 color scheme. |
13 |
if &t_Co >= 256 || has("gui_running") |
|
224
c73d2512617d
use delek color schema
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
213
diff
changeset
|
14 |
colorscheme delek |
211 | 15 |
endif |
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
16 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
17 |
set sessionoptions=curdir,buffers,tabpages |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
18 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
19 |
set showcmd |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
20 |
" Do not show line numbers. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
21 |
set nonu |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
22 |
" Set command string height. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
23 |
set ch=1 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
24 |
|
211 | 25 |
" Hide buffers instead of closing them. |
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
26 |
set hidden |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
27 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
28 |
set mouse=a |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
29 |
set mousemodel=popup |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
30 |
set mousehide |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
31 |
|
210
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
32 |
" Number of lines of history to remember |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
33 |
set history=1000 |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
34 |
" Number of levels of undo history |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
35 |
set undolevels=1000 |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
36 |
|
26 | 37 |
" Same as set ts=4, by default - 8, how long TAB. |
25 | 38 |
set tabstop=4 |
26 | 39 |
" Use spaces instead TAB. |
48
514847fa6797
Use spaces instead TAB.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
40
diff
changeset
|
40 |
set expandtab |
25 | 41 |
set shiftwidth=4 |
48
514847fa6797
Use spaces instead TAB.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
40
diff
changeset
|
42 |
set softtabstop=4 |
25 | 43 |
set smarttab |
44 |
set et |
|
45 |
||
26 | 46 |
" Move cursor on RET to previous line indent. |
47 |
set autoindent |
|
48 |
" Indent for C-like languages. |
|
49 |
set smartindent |
|
50 |
||
51 |
" This setting will cause the cursor to very briefly jump to a |
|
52 |
" brace/parenthese/bracket's "match" whenever you type a closing or opening |
|
53 |
" brace/parenthese/bracket. I've had almost no mismatched-punctuation errors |
|
54 |
" since I started using this setting. |
|
55 |
set showmatch |
|
56 |
||
57 |
" Turn on incremental search with ignore case (except explicit caps). |
|
58 |
set incsearch |
|
59 |
set ignorecase |
|
60 |
set smartcase |
|
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
61 |
set hlsearch |
26 | 62 |
|
212
6608c5b29815
No audio or visual bell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
63 |
" No audio or visual bell. |
6608c5b29815
No audio or visual bell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
64 |
set novisualbell |
6608c5b29815
No audio or visual bell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
65 |
set noerrorbells |
6608c5b29815
No audio or visual bell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
66 |
|
27
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
67 |
" Have 3 lines of offset (or buffer) when scrolling. |
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
68 |
set scrolloff=3 |
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
69 |
" set scrolljump=3 |
27
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
70 |
|
26 | 71 |
" I find the toolbar in the GUI version of vim (gvim) to be somewhat useless |
72 |
" visual clutter. This option gets rid of the toolbar. |
|
73 |
set guioptions-=T |
|
74 |
||
75 |
||
76 |
" This setting prevents vi from making its annoying beeps when a command |
|
77 |
" doesn't work. Instead, it briefly flashes the screen -- much less annoying. |
|
78 |
set vb t_vb= |
|
79 |
||
80 |
||
81 |
" This setting ensures that each window contains a statusline that displays |
|
82 |
" the current cursor position. |
|
25 | 83 |
set ruler |
84 |
||
26 | 85 |
" By default, search matches are highlighted. I find this annoying most of the |
86 |
" time. This option turns off search highlighting. You can always turn it back |
|
87 |
" on with :set hls. |
|
88 |
set nohls |
|
89 |
||
90 |
" With this nifty option, vim will search for text as you enter it. For |
|
91 |
" instance, if you type /bob to search for bob, vi will go to the first "b" |
|
92 |
" after you type the "b," to the first "bo" after you type the "o," and so on. |
|
93 |
" It makes searching much faster, since if you pay attention you never have to |
|
94 |
" enter more than the minimum number of characters to find your target |
|
95 |
" location. Make sure that you press Enter to accept the match after vim finds |
|
96 |
" the location you want. |
|
97 |
set incsearch |
|
98 |
||
152
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
99 |
" When you type the first tab hit will complete as much as possible, the |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
100 |
" second tab hit will provide a list, the third and subsequent tabs will cycle |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
101 |
" through completion options so you can complete the file without further |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
102 |
" keys. |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
103 |
set wildmode=longest,list,full |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
104 |
set wildmenu |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
105 |
|
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
106 |
set complete="" |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
107 |
" From current buffer. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
108 |
set complete+=. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
109 |
" From dictionary. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
110 |
set complete+=k |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
111 |
" From another buffers. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
112 |
set complete+=b |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
113 |
" From tags. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
114 |
set complete+=t |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
115 |
|
210
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
116 |
" Disable these characters as word dividers. |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
117 |
set iskeyword+=_ |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
118 |
|
211 | 119 |
" Allow backspacing over autoindent, line breaks (join lines), start of insert |
120 |
set backspace=indent,eol,start |
|
121 |
||
122 |
" Affects the output of :TOhtml. |
|
123 |
:let html_use_css = 1 |
|
124 |
:let use_xhtml = 1 |
|
125 |
||
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
126 |
" Fix <Enter> for comment |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
127 |
" set fo+=cr |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
128 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
129 |
" set termencoding=cp866 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
130 |
" set fileencoding=cp1251 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
131 |
" set fileencodings=cp1251,cp866,utf8 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
132 |
" set encoding=cp1251 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
133 |
|
25 | 134 |
" Local Variables: |
135 |
" mode: fundamental |
|
136 |
" comment-start: "\"" |
|
137 |
" eval: (font-lock-add-keywords nil '( ("^[[:blank:]]*\".*" . font-lock-comment-face) )) |
|
138 |
" End: |