66 lines
1.3 KiB
Lua
66 lines
1.3 KiB
Lua
-- [[ Basic Keymaps ]]
|
|
vim.o.relativenumber = true
|
|
|
|
-- Make line numbers default
|
|
vim.wo.number = true
|
|
|
|
-- Enable mouse mode
|
|
vim.o.mouse = 'a'
|
|
|
|
-- Enable break indent
|
|
vim.o.breakindent = true
|
|
|
|
-- Save undo history
|
|
vim.o.undofile = true
|
|
|
|
-- Case-insensitive searching UNLESS \C or capital in search
|
|
vim.o.ignorecase = true
|
|
vim.o.smartcase = true
|
|
|
|
-- Keep signcolumn on by default
|
|
vim.wo.signcolumn = 'yes'
|
|
|
|
-- Decrease update time
|
|
--[[ vim.o.timeoutlen = 300 ]]
|
|
|
|
-- Set completeopt to have a better completion experience
|
|
vim.o.completeopt = 'menuone,noselect'
|
|
|
|
-- NOTE: You should make sure your terminal supports this
|
|
vim.o.termguicolors = true
|
|
|
|
vim.opt.tabstop = 4
|
|
vim.opt.softtabstop = 4
|
|
vim.opt.shiftwidth = 4
|
|
vim.opt.expandtab = true
|
|
|
|
vim.opt.swapfile = false
|
|
vim.opt.backup = false
|
|
vim.opt.undodir = os.getenv 'HOME' .. '/.vim/undodir'
|
|
|
|
vim.opt.smartindent = true
|
|
|
|
vim.opt.wrap = false
|
|
|
|
vim.opt.hlsearch = false
|
|
vim.opt.incsearch = true
|
|
|
|
vim.opt.scrolloff = 8
|
|
vim.opt.signcolumn = 'yes'
|
|
vim.opt.isfname:append '@-@'
|
|
|
|
vim.opt.updatetime = 50
|
|
|
|
vim.opt.colorcolumn = '100'
|
|
|
|
-- [[ Highlight on yank ]]
|
|
-- See `:help vim.highlight.on_yank()`
|
|
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
|
callback = function()
|
|
vim.highlight.on_yank()
|
|
end,
|
|
group = highlight_group,
|
|
pattern = '*',
|
|
})
|