43 lines
1.0 KiB
Lua
43 lines
1.0 KiB
Lua
-- Filetypes and compatibility
|
|
vim.opt.compatible = false
|
|
vim.cmd("filetype on")
|
|
vim.cmd("filetype plugin on")
|
|
vim.cmd("syntax on")
|
|
|
|
-- Spell
|
|
vim.opt.spell = true
|
|
vim.opt.spl = "en_us,de_de"
|
|
vim.opt.sps = "fast,timeout:100"
|
|
|
|
-- Editor configuration
|
|
vim.opt.number = true
|
|
vim.opt.tabstop = 4
|
|
vim.opt.shiftwidth = 4
|
|
vim.opt.expandtab = true
|
|
vim.opt.splitright = true
|
|
vim.opt.splitbelow = true
|
|
vim.g.mapleader = ","
|
|
vim.cmd("set clipboard+=unnamedplus")
|
|
vim.cmd("autocmd! CursorHold,CursorHoldI *.md write")
|
|
|
|
-- GUI
|
|
vim.opt.cursorline = true
|
|
vim.opt.hlsearch = true
|
|
vim.opt.encoding = "UTF-8"
|
|
vim.g.tex_flavor = "latex"
|
|
vim.opt.conceallevel = 2
|
|
vim.opt.showmatch = true
|
|
vim.o.guifont = "Source Code Pro:h13"
|
|
|
|
-- set color scheme
|
|
vim.opt.termguicolors = true
|
|
vim.cmd("colorscheme slate")
|
|
vim.keymap.set("n", "<M-+>", ":colo tokyonight-day<CR>")
|
|
vim.keymap.set("n", "<M-->", ":colo tokyonight-moon<CR>")
|
|
|
|
vim.opt.mouse = ""
|
|
|
|
-- set copy mode
|
|
vim.keymap.set("n", "<leader>ll", ":set nonumber<cr>")
|
|
vim.keymap.set("n", "<leader>lm", ":set number<cr>")
|