1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
local O = vim.o
local OPT = vim.opt
local my_env = require('vimrc.my_env')
-- Moving around, searching and patterns {{{1
O.wrapscan = false
O.ignorecase = true
O.smartcase = true
-- Displaying text {{{1
O.scrolloff = 7
O.linebreak = true
O.breakindent = true
OPT.breakindentopt:append('sbr')
O.showbreak = '> '
O.sidescrolloff = 20
OPT.fillchars = {
vert = ' ',
fold = ' ',
diff = ' ',
}
O.cmdheight = 1
O.list = true
OPT.listchars = {
eol = '\xc2\xac', -- u00ac
tab = '\xe2\x96\xb8 ', -- u25b8
trail = '\xc2\xb7', -- u00b7
extends = '\xc2\xbb', -- u00bb
precedes = '\xc2\xab', -- u00ab
}
O.concealcursor = 'cnv'
-- Syntax, highlighting and spelling {{{1
O.background = 'dark'
O.synmaxcol = 500
O.hlsearch = true
O.termguicolors = true
O.colorcolumn = '+1'
OPT.spelloptions:append('camel')
-- Statusline {{{1
O.laststatus = 3
-- Multiple windows {{{1
O.winminheight = 0
O.hidden = true
O.switchbuf = 'usetab'
-- Terminal {{{1
O.title = false
-- Using the mouse {{{1
O.mouse = ''
-- Messages and info {{{1
OPT.shortmess:append('asIc')
O.showmode = false
O.report = 999
O.confirm = true
-- Selecting text {{{1
O.clipboard = 'unnamed'
-- Prefer 'tmux' to 'wl-copy' or 'pbcopy' if in tmux.
if vim.env.TMUX then
vim.g.clipboard = 'tmux'
end
-- Editing text {{{1
O.undofile = true
O.textwidth = 0
OPT.completeopt:remove('preview')
O.pumheight = 10
OPT.matchpairs:append('<:>')
O.joinspaces = false
OPT.nrformats:append('unsigned')
-- Tabs and indenting {{{1
-- Note: you should also set them for each file types.
-- These following settings are used for unknown file types.
O.tabstop = 4
O.shiftwidth = 4
O.softtabstop = 4
O.expandtab = true
O.autoindent = true
O.smartindent = true
O.copyindent = true
O.preserveindent = true
-- Folding {{{1
O.foldlevelstart = 0
OPT.foldopen:append('insert')
O.foldmethod = 'marker'
-- Diff mode {{{1
OPT.diffopt:append('vertical')
OPT.diffopt:append('foldcolumn:3')
-- Mapping {{{1
O.maxmapdepth = 10
O.timeout = false
-- Reading and writing files {{{1
O.fixendofline = false
O.fileformats = 'unix,dos'
O.backup = true
O.backupdir = my_env.backup_dir
O.autowrite = true
-- Command line editing {{{1
OPT.wildignore:append('*.o')
OPT.wildignore:append('*.obj')
OPT.wildignore:append('*.lib')
O.wildignorecase = true
-- Executing external commands {{{1
O.shell = 'fish'
O.keywordprg = ''
-- Encoding {{{1
O.fileencodings = 'utf-8,cp932,euc-jp'
-- Misc. {{{1
O.exrc = true
|