2024-06-22 02:52:21 +00:00
|
|
|
local set = vim.opt
|
2024-10-18 04:04:03 +00:00
|
|
|
set.tabstop = 8
|
|
|
|
set.softtabstop = 8
|
|
|
|
set.shiftwidth = 8
|
|
|
|
set.expandtab = false
|
2024-06-22 02:52:21 +00:00
|
|
|
set.mouse = "a"
|
|
|
|
set.clipboard = "unnamedplus"
|
|
|
|
set.hlsearch = true
|
|
|
|
set.autoindent = true
|
|
|
|
set.ttyfast = true
|
|
|
|
set.number = true
|
|
|
|
set.relativenumber = true
|
|
|
|
set.rnu = true
|
|
|
|
set.swapfile = false
|
|
|
|
|
2024-10-28 21:40:49 +00:00
|
|
|
-- expand tabs in the following files
|
|
|
|
vim.api.nvim_create_autocmd({ "BufNewFile" }, {
|
|
|
|
pattern = { "*.scm" },
|
|
|
|
command = 'silent :set expandtab=true'
|
|
|
|
})
|
|
|
|
|
2024-06-22 02:52:21 +00:00
|
|
|
vim.filetype.add({
|
|
|
|
pattern = {
|
|
|
|
['.*%.pl'] = 'prolog',
|
|
|
|
['.*%.prolog'] = 'prolog',
|
|
|
|
['.*%.php.m4'] = 'php',
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
2024-10-18 04:04:03 +00:00
|
|
|
pattern = { "*" },
|
|
|
|
command = [[%s/\s\+$//e]],
|
2024-06-22 02:52:21 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
2024-10-18 04:04:03 +00:00
|
|
|
pattern = { "*.md" },
|
|
|
|
command = 'silent !pandoc % --output=/home/freya/.temp.pdf'
|
2024-06-22 02:52:21 +00:00
|
|
|
})
|