Add more options from old configuraion

This commit is contained in:
Sonny Bakker 2021-11-24 12:17:10 +01:00
parent ee4de626ad
commit 52ce124894

View file

@ -3,6 +3,11 @@
--fix different locale settings when ssh'ing
vim.o.encoding = 'utf-8'
vim.o.syntax = 'on'
--display all matching files when we tab complete
vim.o.wildmenu = true
--replace vertical split pipe character with space
vim.o.fillchars = 'vert:|,fold: '
@ -19,7 +24,7 @@ vim.o.hidden = true
--fold indents
vim.o.foldmethod = 'indent'
--Don't open folds when jumping over one with (, {, [[ or [{
--don't open folds when jumping over one with (, {, [[ or [{
vim.opt.foldopen = vim.opt.foldopen - { 'block' }
--search down into subfolders
@ -51,6 +56,30 @@ vim.o.termguicolors = true
vim.o.background = 'dark'
vim.cmd('colorscheme space_vim_theme')
--activate statusbar
--enable statusbar
vim.o.laststatus = 2
vim.o.statusline = ' %F %m%r%w %= %{hostname()} %{strlen(&ft)?&ft:"none"} %{(&bomb?",BOM":"")} %{&ff} %l/%L %c %P'
--open folds by default
vim.cmd('autocmd Syntax * normal zR')
--file specific formatting
vim.cmd[[
autocmd Filetype python,bash,sh,java,php,json
\ setlocal tabstop=4 softtabstop=4 shiftwidth=4
\ expandtab autoindent fileformat=unix
]]
vim.cmd[[
autocmd Filetype css,scss,html,htmldjango,javascript,yaml
\ setlocal tabstop=2 softtabstop=2 shiftwidth=2
\ expandtab autoindent
]]
--Color trailing spaces with red color
vim.cmd('highlight ExtraWhitespace ctermbg=green guibg=green')
vim.cmd('match ExtraWhitespace /s+$/')
vim.cmd('autocmd BufWinEnter * match ExtraWhitespace /s+$/')
vim.cmd('autocmd InsertEnter * match ExtraWhitespace /s+%#@<!$/')
vim.cmd('autocmd InsertLeave * match ExtraWhitespace /s+$/')
vim.cmd('autocmd BufWinLeave * call clearmatches()')