author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 01 Aug 2011 11:53:45 +0300 | |
changeset 158 | 1df00afab192 |
parent 152 | 7fe989d9decb |
child 161 | feeb41993549 |
permissions | -rw-r--r-- |
25 | 1 |
" On loding VIM search for /etc/vimrc, ~/.vimrc. |
2 |
||
3 |
syntax on |
|
4 |
||
26 | 5 |
" Do not emulate old vi bug. |
25 | 6 |
set nocompatible |
7 |
||
26 | 8 |
" Same as set ts=4, by default - 8, how long TAB. |
25 | 9 |
set tabstop=4 |
26 | 10 |
" Use spaces instead TAB. |
48
514847fa6797
Use spaces instead TAB.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
40
diff
changeset
|
11 |
set expandtab |
25 | 12 |
set shiftwidth=4 |
48
514847fa6797
Use spaces instead TAB.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
40
diff
changeset
|
13 |
set softtabstop=4 |
25 | 14 |
set smarttab |
15 |
set et |
|
16 |
||
26 | 17 |
" Move cursor on RET to previous line indent. |
18 |
set autoindent |
|
19 |
" Indent for C-like languages. |
|
20 |
set smartindent |
|
21 |
||
22 |
" This setting will cause the cursor to very briefly jump to a |
|
23 |
" brace/parenthese/bracket's "match" whenever you type a closing or opening |
|
24 |
" brace/parenthese/bracket. I've had almost no mismatched-punctuation errors |
|
25 |
" since I started using this setting. |
|
26 |
set showmatch |
|
27 |
||
28 |
" Turn on incremental search with ignore case (except explicit caps). |
|
29 |
set incsearch |
|
30 |
set ignorecase |
|
31 |
set smartcase |
|
32 |
||
27
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
33 |
" Have 3 lines of offset (or buffer) when scrolling. |
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
34 |
set scrolloff=3 |
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
35 |
|
26 | 36 |
" I find the toolbar in the GUI version of vim (gvim) to be somewhat useless |
37 |
" visual clutter. This option gets rid of the toolbar. |
|
38 |
set guioptions-=T |
|
39 |
||
40 |
||
41 |
" This setting prevents vi from making its annoying beeps when a command |
|
42 |
" doesn't work. Instead, it briefly flashes the screen -- much less annoying. |
|
43 |
set vb t_vb= |
|
44 |
||
45 |
||
46 |
" This setting ensures that each window contains a statusline that displays |
|
47 |
" the current cursor position. |
|
25 | 48 |
set ruler |
49 |
||
26 | 50 |
" By default, search matches are highlighted. I find this annoying most of the |
51 |
" time. This option turns off search highlighting. You can always turn it back |
|
52 |
" on with :set hls. |
|
53 |
set nohls |
|
54 |
||
55 |
" With this nifty option, vim will search for text as you enter it. For |
|
56 |
" instance, if you type /bob to search for bob, vi will go to the first "b" |
|
57 |
" after you type the "b," to the first "bo" after you type the "o," and so on. |
|
58 |
" It makes searching much faster, since if you pay attention you never have to |
|
59 |
" enter more than the minimum number of characters to find your target |
|
60 |
" location. Make sure that you press Enter to accept the match after vim finds |
|
61 |
" the location you want. |
|
62 |
set incsearch |
|
63 |
||
64 |
set ruler |
|
65 |
||
152
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
66 |
" 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
|
67 |
" 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
|
68 |
" through completion options so you can complete the file without further |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
69 |
" keys. |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
70 |
set wildmode=longest,list,full |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
71 |
set wildmenu |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
72 |
|
25 | 73 |
" Local Variables: |
74 |
" mode: fundamental |
|
75 |
" comment-start: "\"" |
|
76 |
" eval: (font-lock-add-keywords nil '( ("^[[:blank:]]*\".*" . font-lock-comment-face) )) |
|
77 |
" End: |