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