author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 25 Sep 2011 17:13:42 +0300 | |
changeset 210 | d71ad1876c46 |
parent 209 | f236b47efe74 |
child 211 | c6d56d6fbcc2 |
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 |
|
25 | 7 |
syntax on |
8 |
||
178
8f02d11f289d
Disable colorsheme as it can be not present on host.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
161
diff
changeset
|
9 |
" colorscheme delek |
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
10 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
11 |
set sessionoptions=curdir,buffers,tabpages |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
12 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
13 |
set showcmd |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
14 |
" Do not show line numbers. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
15 |
set nonu |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
16 |
" Set command string height. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
17 |
set ch=1 |
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 hidden |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
20 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
21 |
set mouse=a |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
22 |
set mousemodel=popup |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
23 |
set mousehide |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
24 |
|
210
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
25 |
" Number of lines of history to remember |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
26 |
set history=1000 |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
27 |
" Number of levels of undo history |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
28 |
set undolevels=1000 |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
29 |
|
26 | 30 |
" Same as set ts=4, by default - 8, how long TAB. |
25 | 31 |
set tabstop=4 |
26 | 32 |
" Use spaces instead TAB. |
48
514847fa6797
Use spaces instead TAB.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
40
diff
changeset
|
33 |
set expandtab |
25 | 34 |
set shiftwidth=4 |
48
514847fa6797
Use spaces instead TAB.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
40
diff
changeset
|
35 |
set softtabstop=4 |
25 | 36 |
set smarttab |
37 |
set et |
|
38 |
||
26 | 39 |
" Move cursor on RET to previous line indent. |
40 |
set autoindent |
|
41 |
" Indent for C-like languages. |
|
42 |
set smartindent |
|
43 |
||
44 |
" This setting will cause the cursor to very briefly jump to a |
|
45 |
" brace/parenthese/bracket's "match" whenever you type a closing or opening |
|
46 |
" brace/parenthese/bracket. I've had almost no mismatched-punctuation errors |
|
47 |
" since I started using this setting. |
|
48 |
set showmatch |
|
49 |
||
50 |
" Turn on incremental search with ignore case (except explicit caps). |
|
51 |
set incsearch |
|
52 |
set ignorecase |
|
53 |
set smartcase |
|
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
54 |
set hlsearch |
26 | 55 |
|
27
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
56 |
" Have 3 lines of offset (or buffer) when scrolling. |
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
57 |
set scrolloff=3 |
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
58 |
" set scrolljump=3 |
27
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
59 |
|
26 | 60 |
" I find the toolbar in the GUI version of vim (gvim) to be somewhat useless |
61 |
" visual clutter. This option gets rid of the toolbar. |
|
62 |
set guioptions-=T |
|
63 |
||
64 |
||
65 |
" This setting prevents vi from making its annoying beeps when a command |
|
66 |
" doesn't work. Instead, it briefly flashes the screen -- much less annoying. |
|
67 |
set vb t_vb= |
|
68 |
||
69 |
||
70 |
" This setting ensures that each window contains a statusline that displays |
|
71 |
" the current cursor position. |
|
25 | 72 |
set ruler |
73 |
||
26 | 74 |
" By default, search matches are highlighted. I find this annoying most of the |
75 |
" time. This option turns off search highlighting. You can always turn it back |
|
76 |
" on with :set hls. |
|
77 |
set nohls |
|
78 |
||
79 |
" With this nifty option, vim will search for text as you enter it. For |
|
80 |
" instance, if you type /bob to search for bob, vi will go to the first "b" |
|
81 |
" after you type the "b," to the first "bo" after you type the "o," and so on. |
|
82 |
" It makes searching much faster, since if you pay attention you never have to |
|
83 |
" enter more than the minimum number of characters to find your target |
|
84 |
" location. Make sure that you press Enter to accept the match after vim finds |
|
85 |
" the location you want. |
|
86 |
set incsearch |
|
87 |
||
88 |
set ruler |
|
89 |
||
152
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
90 |
" 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
|
91 |
" 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
|
92 |
" through completion options so you can complete the file without further |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
93 |
" keys. |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
94 |
set wildmode=longest,list,full |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
95 |
set wildmenu |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
96 |
|
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
97 |
set complete="" |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
98 |
" From current buffer. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
99 |
set complete+=. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
100 |
" From dictionary. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
101 |
set complete+=k |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
102 |
" From another buffers. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
103 |
set complete+=b |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
104 |
" From tags. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
105 |
set complete+=t |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
106 |
|
210
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
107 |
" Disable these characters as word dividers. |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
108 |
set iskeyword+=_ |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
109 |
|
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
110 |
" Fix <Enter> for comment |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
111 |
" set fo+=cr |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
112 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
113 |
" set termencoding=cp866 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
114 |
" set fileencoding=cp1251 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
115 |
" set fileencodings=cp1251,cp866,utf8 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
116 |
" set encoding=cp1251 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
117 |
|
25 | 118 |
" Local Variables: |
119 |
" mode: fundamental |
|
120 |
" comment-start: "\"" |
|
121 |
" eval: (font-lock-add-keywords nil '( ("^[[:blank:]]*\".*" . font-lock-comment-face) )) |
|
122 |
" End: |