Put configuration elements in different files

This commit is contained in:
Yorick Barbanneau 2022-01-03 23:45:30 +01:00
parent d6a419cfdd
commit 0fcc53b2cf
6 changed files with 171 additions and 170 deletions

View file

@ -0,0 +1,67 @@
-- General Option
vim.opt.autoindent = true
vim.opt.background = 'dark'
vim.opt.backupdir = os.getenv("HOME") .. '/.local/tmp/nvim'
vim.opt.clipboard = 'unnamedplus' --Use system clipboard
vim.opt.colorcolumn = '80'
vim.opt.directory = os.getenv("HOME") .. '/.local/tmp/nvim'
vim.opt.expandtab = true
vim.opt.foldmethod = 'syntax'
vim.opt.gdefault = true -- search: all occurrences by default
vim.opt.hlsearch = true -- search: hightlight terms
vim.opt.ignorecase = true
vim.opt.incsearch = true
vim.opt.laststatus = 1
-- show special character
vim.opt.listchars = {tab = '', trail = '', eol = '', extends = '' }
vim.opt.number = true
vim.opt.shiftwidth = 4
vim.opt.showmatch = true
vim.opt.smartcase = true -- search: try :to be smart about cases
vim.opt.smartindent = true
vim.opt.tabstop = 4
vim.opt.termguicolors = true -- 24 bits color support
vim.opt.wildmenu = true -- activate enhanced user menu
vim.opt.wildmode = 'lastused:full,list' -- enhance menu
-- Options than need vim.cmd
vim.cmd('syntax on')
vim.cmd('colorscheme base16-classic-dark')
-- -- Code Fold
-- "Load and save view atomatocally (save and restore fold)
vim.cmd('au BufWinLeave *.* mkview')
vim.cmd('au BufWinEnter *.* silent! loadview')
-- inoremap <silent><expr><tab> pumvisible()? "\<c-n>" : "\<tab>"
-- inoremap <silent><expr><s-tab> pumvisible()? "\<c-p>" : "\<s-tab>"
-- Autotype
vim.cmd('au BufRead,BufNewFile *.md setlocal textwidth=80')
vim.cmd('au BufRead,BufNewFile *.tex setlocal textwidth=80')
vim.cmd('au BufNewFile,BufRead /tmp/neomutt* set tw=72 fo=awq comments+=nb:> noautoindent filetype=mail')
-- Ignore these filenames during enhanced command line completion.
vim.opt.wildignore = {
'*.bak',
'*.class',
'*.aux',
'*.out',
'*.toc',
'*.jpg',
'*.bmp',
'*.gif',
'*.png',
'*.luac',
'*.o',
'*.obj',
'*.exe',
'*.dll',
'*.manifest',
'*.pyc',
'*.spl',
'*.sw?'
}