2024-05-29 18:20:25 +05:00
|
|
|
local opt = vim.opt
|
|
|
|
local g = vim.g
|
|
|
|
|
|
|
|
-- [[ set tabs ]] --
|
|
|
|
-- Set the numbers of whitespace characters when shifting with "<" or ">".
|
|
|
|
-- In fact, in spite of expandtab, the terminal still displays whitespace charaters,
|
|
|
|
-- so let's set the number of whitespace characters for ones press of these buttons.
|
2024-11-30 03:32:37 +05:00
|
|
|
opt.shiftwidth = 4
|
2024-05-29 18:20:25 +05:00
|
|
|
|
|
|
|
-- one tab == two whitespace characters in new line.
|
|
|
|
-- Pressing <CR> will insert tabs. Tabs are drawn as whitespace.
|
|
|
|
-- that's why we have to set that each tab on a new line is two whitespace.
|
2024-11-30 03:32:37 +05:00
|
|
|
opt.tabstop = 4
|
2024-05-29 18:20:25 +05:00
|
|
|
|
2024-11-30 03:32:37 +05:00
|
|
|
-- Adjust new line to the previous indentation.
|
2024-05-29 18:20:25 +05:00
|
|
|
opt.smartindent = true
|
|
|
|
|
2024-11-30 03:32:37 +05:00
|
|
|
-- On pressing tab, insert 4 spaces.
|
|
|
|
opt.expandtab = true
|
2024-05-29 18:20:25 +05:00
|
|
|
opt.smarttab = true
|
|
|
|
opt.scrolloff = 8
|
|
|
|
|
2024-11-30 03:32:37 +05:00
|
|
|
-- Show unprintable.
|
2024-05-29 18:20:25 +05:00
|
|
|
opt.list = true
|
|
|
|
opt.listchars = {tab = '⁞ ', eol = '¬', trail = '·'}
|