blob: 2f4a200570bac868b8a323448e693054a8163f28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
local opt = vim.opt
local cmd = vim.cmd
-- Syntax and colors
opt.termguicolors = true
opt.background = "dark"
opt.signcolumn = "yes"
cmd("syntax on")
-- Line Numbers
opt.number = true
opt.relativenumber = true
-- Tabs
opt.expandtab = false -- Use tabs instead of spaces
opt.tabstop = 4 -- Number of spaces a tab counts for
opt.shiftwidth = 4 -- Number of spaces for auto-indentation
opt.softtabstop = 4 -- Spaces used when hitting Tab or Backspace
opt.smartindent = true
opt.autoindent = true
cmd("match TabChar /\t/")
vim.opt.list = true
vim.opt.listchars = { tab = ".." }
-- File type detection
vim.cmd("filetype on")
vim.cmd("filetype plugin on")
-- Mouse and clipboard
vim.opt.mouse = ""
vim.opt.clipboard = "unnamedplus"
vim.api.nvim_set_keymap('v', 'yy', ':w !xclip -selection clipboard<CR><CR>',
{ noremap = true, silent = true })
-- MISC
opt.swapfile = false
opt.backup = false
vim.opt.encoding = "utf-8"
|