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.
|
25
|
11 |
set shiftwidth=4
|
|
12 |
set smarttab
|
|
13 |
set et
|
|
14 |
|
26
|
15 |
" Move cursor on RET to previous line indent.
|
|
16 |
set autoindent
|
|
17 |
" Indent for C-like languages.
|
|
18 |
set smartindent
|
|
19 |
|
|
20 |
" This setting will cause the cursor to very briefly jump to a
|
|
21 |
" brace/parenthese/bracket's "match" whenever you type a closing or opening
|
|
22 |
" brace/parenthese/bracket. I've had almost no mismatched-punctuation errors
|
|
23 |
" since I started using this setting.
|
|
24 |
set showmatch
|
|
25 |
|
|
26 |
" Turn on incremental search with ignore case (except explicit caps).
|
|
27 |
set incsearch
|
|
28 |
set ignorecase
|
|
29 |
set smartcase
|
|
30 |
|
|
31 |
" I find the toolbar in the GUI version of vim (gvim) to be somewhat useless
|
|
32 |
" visual clutter. This option gets rid of the toolbar.
|
|
33 |
set guioptions-=T
|
|
34 |
|
|
35 |
|
|
36 |
" This setting prevents vi from making its annoying beeps when a command
|
|
37 |
" doesn't work. Instead, it briefly flashes the screen -- much less annoying.
|
|
38 |
set vb t_vb=
|
|
39 |
|
|
40 |
|
|
41 |
" This setting ensures that each window contains a statusline that displays
|
|
42 |
" the current cursor position.
|
25
|
43 |
set ruler
|
|
44 |
|
26
|
45 |
" By default, search matches are highlighted. I find this annoying most of the
|
|
46 |
" time. This option turns off search highlighting. You can always turn it back
|
|
47 |
" on with :set hls.
|
|
48 |
set nohls
|
|
49 |
|
|
50 |
" With this nifty option, vim will search for text as you enter it. For
|
|
51 |
" instance, if you type /bob to search for bob, vi will go to the first "b"
|
|
52 |
" after you type the "b," to the first "bo" after you type the "o," and so on.
|
|
53 |
" It makes searching much faster, since if you pay attention you never have to
|
|
54 |
" enter more than the minimum number of characters to find your target
|
|
55 |
" location. Make sure that you press Enter to accept the match after vim finds
|
|
56 |
" the location you want.
|
|
57 |
set incsearch
|
|
58 |
|
|
59 |
|
|
60 |
" By default, vim doesn't let the cursor stray beyond the defined text. This
|
|
61 |
" setting allows the cursor to freely roam anywhere it likes in command mode.
|
|
62 |
" It feels weird at first but is quite useful.
|
|
63 |
set virtualedit=all
|
|
64 |
|
|
65 |
set ruler
|
|
66 |
|
|
67 |
" Informative status line
|
|
68 |
set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\ [%l/%L\ (%p%%)]
|
|
69 |
|
25
|
70 |
" Local Variables:
|
|
71 |
" mode: fundamental
|
|
72 |
" comment-start: "\""
|
|
73 |
" eval: (font-lock-add-keywords nil '( ("^[[:blank:]]*\".*" . font-lock-comment-face) ))
|
|
74 |
" End:
|