make shiftwidth and tabstop configurable (#818)

This commit is contained in:
Abouzar Parvan 2021-07-09 22:56:42 +04:30 committed by GitHub
parent 79fe019da8
commit 986da71d30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -18,6 +18,8 @@ O = {
number = true, number = true,
relative_number = false, relative_number = false,
number_width = 4, number_width = 4,
shift_width = 2,
tab_stop = 2,
cmdheight = 2, cmdheight = 2,
cursorline = true, cursorline = true,
shell = "bash", shell = "bash",

View file

@ -47,9 +47,9 @@ opt.undofile = true -- enable persisten undo
opt.updatetime = 300 -- faster completion opt.updatetime = 300 -- faster completion
opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
opt.expandtab = true -- convert tabs to spaces opt.expandtab = true -- convert tabs to spaces
opt.shiftwidth = 2 -- the number of spaces inserted for each indentation opt.shiftwidth = O.shift_width -- the number of spaces inserted for each indentation
opt.shortmess:append "c" opt.shortmess:append "c"
opt.tabstop = 2 -- insert 4 spaces for a tab opt.tabstop = O.tab_stop -- insert 4 spaces for a tab
opt.cursorline = O.cursorline -- highlight the current line opt.cursorline = O.cursorline -- highlight the current line
opt.number = O.number -- set numbered lines opt.number = O.number -- set numbered lines
opt.relativenumber = O.relative_number -- set relative numbered lines opt.relativenumber = O.relative_number -- set relative numbered lines