author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Tue, 20 Oct 2015 21:22:47 +0300 | |
changeset 757 | 70dae9e483aa |
parent 609 | 0474cf9957c9 |
child 925 | 8a010eb167ff |
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 |
|
606
f21480ec9818
Beep instead of blink.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
547
diff
changeset
|
19 |
" Show mode in last line of screen. |
f21480ec9818
Beep instead of blink.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
547
diff
changeset
|
20 |
set showmode |
f21480ec9818
Beep instead of blink.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
547
diff
changeset
|
21 |
" Show last command in last line of screen. |
f21480ec9818
Beep instead of blink.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
547
diff
changeset
|
22 |
set showcmd |
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
23 |
" Do not show line numbers. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
24 |
set nonu |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
25 |
" Set command string height. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
26 |
set ch=1 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
27 |
|
607
db8b30e73baf
Highlight line with cursor.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
606
diff
changeset
|
28 |
" Highlight line with cursor. |
db8b30e73baf
Highlight line with cursor.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
606
diff
changeset
|
29 |
set cursorline |
609
0474cf9957c9
Show long lines... Substitude all matches in line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
608
diff
changeset
|
30 |
" Show long lines... |
0474cf9957c9
Show long lines... Substitude all matches in line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
608
diff
changeset
|
31 |
set colorcolumn=120 |
607
db8b30e73baf
Highlight line with cursor.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
606
diff
changeset
|
32 |
|
211 | 33 |
" Hide buffers instead of closing them. |
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
34 |
set hidden |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
35 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
36 |
set mouse=a |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
37 |
set mousemodel=popup |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
38 |
set mousehide |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
39 |
|
210
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
40 |
" Number of lines of history to remember |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
41 |
set history=1000 |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
42 |
" Number of levels of undo history |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
43 |
set undolevels=1000 |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
44 |
|
26 | 45 |
" Same as set ts=4, by default - 8, how long TAB. |
25 | 46 |
set tabstop=4 |
26 | 47 |
" Use spaces instead TAB. |
48
514847fa6797
Use spaces instead TAB.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
40
diff
changeset
|
48 |
set expandtab |
25 | 49 |
set shiftwidth=4 |
48
514847fa6797
Use spaces instead TAB.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
40
diff
changeset
|
50 |
set softtabstop=4 |
25 | 51 |
set smarttab |
52 |
set et |
|
53 |
||
26 | 54 |
" Move cursor on RET to previous line indent. |
55 |
set autoindent |
|
56 |
" Indent for C-like languages. |
|
57 |
set smartindent |
|
58 |
||
59 |
" This setting will cause the cursor to very briefly jump to a |
|
60 |
" brace/parenthese/bracket's "match" whenever you type a closing or opening |
|
61 |
" brace/parenthese/bracket. I've had almost no mismatched-punctuation errors |
|
62 |
" since I started using this setting. |
|
63 |
set showmatch |
|
64 |
||
65 |
" Turn on incremental search with ignore case (except explicit caps). |
|
66 |
set incsearch |
|
67 |
set ignorecase |
|
68 |
set smartcase |
|
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
69 |
set hlsearch |
26 | 70 |
|
609
0474cf9957c9
Show long lines... Substitude all matches in line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
608
diff
changeset
|
71 |
" Substitude all matches in line. |
0474cf9957c9
Show long lines... Substitude all matches in line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
608
diff
changeset
|
72 |
set gdefault |
0474cf9957c9
Show long lines... Substitude all matches in line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
608
diff
changeset
|
73 |
nnoremap / /\v |
0474cf9957c9
Show long lines... Substitude all matches in line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
608
diff
changeset
|
74 |
vnoremap / /\v |
0474cf9957c9
Show long lines... Substitude all matches in line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
608
diff
changeset
|
75 |
|
606
f21480ec9818
Beep instead of blink.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
547
diff
changeset
|
76 |
" Beep instead of blink. |
212
6608c5b29815
No audio or visual bell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
77 |
set novisualbell |
6608c5b29815
No audio or visual bell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
78 |
set noerrorbells |
6608c5b29815
No audio or visual bell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
79 |
|
27
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
80 |
" Have 3 lines of offset (or buffer) when scrolling. |
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
81 |
set scrolloff=3 |
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
82 |
" set scrolljump=3 |
27
55688ec975f9
Remove custom status line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
26
diff
changeset
|
83 |
|
26 | 84 |
" I find the toolbar in the GUI version of vim (gvim) to be somewhat useless |
85 |
" visual clutter. This option gets rid of the toolbar. |
|
86 |
set guioptions-=T |
|
87 |
||
608
817b345c30a5
Always show statusline. Remove duplicate code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
88 |
" Statusline displays the current cursor position. |
25 | 89 |
set ruler |
608
817b345c30a5
Always show statusline. Remove duplicate code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
90 |
" Always show statusline. |
817b345c30a5
Always show statusline. Remove duplicate code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
91 |
set laststatus=2 |
25 | 92 |
|
26 | 93 |
" By default, search matches are highlighted. I find this annoying most of the |
94 |
" time. This option turns off search highlighting. You can always turn it back |
|
95 |
" on with :set hls. |
|
96 |
set nohls |
|
97 |
||
152
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
98 |
" 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
|
99 |
" 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
|
100 |
" through completion options so you can complete the file without further |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
101 |
" keys. |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
102 |
set wildmode=longest,list,full |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
103 |
set wildmenu |
7fe989d9decb
Bash like completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
104 |
|
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
105 |
set complete="" |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
106 |
" From current buffer. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
107 |
set complete+=. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
108 |
" From dictionary. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
109 |
set complete+=k |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
110 |
" From another buffers. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
111 |
set complete+=b |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
112 |
" From tags. |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
113 |
set complete+=t |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
114 |
|
210
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
115 |
" Disable these characters as word dividers. |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
116 |
set iskeyword+=_ |
d71ad1876c46
Disable these characters as word dividers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
209
diff
changeset
|
117 |
|
211 | 118 |
" Allow backspacing over autoindent, line breaks (join lines), start of insert |
119 |
set backspace=indent,eol,start |
|
120 |
||
121 |
" Affects the output of :TOhtml. |
|
122 |
:let html_use_css = 1 |
|
123 |
:let use_xhtml = 1 |
|
124 |
||
547 | 125 |
filetype plugin on |
126 |
||
545
3cbd32a78761
Add Python settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
224
diff
changeset
|
127 |
au FileType python setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4 |
3cbd32a78761
Add Python settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
224
diff
changeset
|
128 |
|
161
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
129 |
" Fix <Enter> for comment |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
130 |
" set fo+=cr |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
131 |
|
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
132 |
" set termencoding=cp866 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
133 |
" set fileencoding=cp1251 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
134 |
" set fileencodings=cp1251,cp866,utf8 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
135 |
" set encoding=cp1251 |
feeb41993549
Add Kryshtop settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
136 |
|
25 | 137 |
" Local Variables: |
138 |
" mode: fundamental |
|
139 |
" comment-start: "\"" |
|
140 |
" eval: (font-lock-add-keywords nil '( ("^[[:blank:]]*\".*" . font-lock-comment-face) )) |
|
141 |
" End: |