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