chore: update options
* Ignore case and use smart case for searches * Turn on line wrap, linebreak, breakindent * Inverse splits positions * Turn off --- more --- display
This commit is contained in:
parent
2a266755a3
commit
1c69d73784
2 changed files with 45 additions and 24 deletions
|
|
@ -17,6 +17,17 @@ vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
||||||
-- Escape terminal mode
|
-- Escape terminal mode
|
||||||
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>")
|
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>")
|
||||||
|
|
||||||
|
-- Toggle hlsearch if it's on, otherwise just do "enter"
|
||||||
|
vim.keymap.set("n", "<CR>", function()
|
||||||
|
---@diagnostic disable-next-line: undefined-field
|
||||||
|
if vim.v.hlsearch == 1 then
|
||||||
|
vim.cmd.nohl()
|
||||||
|
return ""
|
||||||
|
else
|
||||||
|
return vim.keycode "<CR>"
|
||||||
|
end
|
||||||
|
end, { expr = true })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>bd", "<cmd>bd<CR>")
|
vim.keymap.set("n", "<leader>bd", "<cmd>bd<CR>")
|
||||||
|
|
||||||
-- Thanks to Mr. Primeagen
|
-- Thanks to Mr. Primeagen
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,43 @@
|
||||||
vim.opt.number = true
|
local opt = vim.opt
|
||||||
vim.opt.relativenumber = true
|
|
||||||
|
|
||||||
vim.opt.tabstop = 4
|
opt.number = true
|
||||||
vim.opt.softtabstop = 4
|
opt.relativenumber = true
|
||||||
vim.opt.shiftwidth = 4
|
|
||||||
vim.opt.expandtab = false
|
|
||||||
vim.opt.smartindent = true
|
|
||||||
vim.opt.cursorline = true
|
|
||||||
|
|
||||||
vim.opt.wrap = false
|
opt.tabstop = 4
|
||||||
|
opt.softtabstop = 4
|
||||||
|
opt.shiftwidth = 4
|
||||||
|
opt.expandtab = false
|
||||||
|
opt.smartindent = true
|
||||||
|
opt.cursorline = true
|
||||||
|
|
||||||
vim.opt.swapfile = false
|
opt.wrap = true
|
||||||
vim.opt.backup = false
|
opt.linebreak = true
|
||||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
opt.breakindent = true
|
||||||
vim.opt.undofile = true
|
opt.showbreak = "> "
|
||||||
|
|
||||||
vim.opt.hlsearch = false
|
opt.inccommand = "split"
|
||||||
vim.opt.incsearch = true
|
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
opt.incsearch = true
|
||||||
|
opt.smartcase = true
|
||||||
|
opt.ignorecase = true
|
||||||
|
|
||||||
vim.opt.scrolloff = 8
|
opt.splitbelow = true
|
||||||
vim.opt.sidescrolloff = 16
|
opt.splitright = true
|
||||||
|
|
||||||
vim.opt.updatetime = 100
|
opt.formatoptions:remove "o"
|
||||||
vim.opt.list = true
|
|
||||||
vim.opt.listchars = "tab: ,extends:›,precedes:‹,nbsp:·,trail:·"
|
|
||||||
|
|
||||||
vim.g.python3_host_prog = "/usr/bin/python3"
|
opt.swapfile = false
|
||||||
|
opt.backup = false
|
||||||
|
opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
|
opt.undofile = true
|
||||||
|
|
||||||
-- Always use system clipboard (I might regret this)
|
opt.termguicolors = true
|
||||||
vim.opt.clipboard = "unnamedplus"
|
|
||||||
|
opt.scrolloff = 8
|
||||||
|
opt.updatetime = 100
|
||||||
|
opt.list = true
|
||||||
|
opt.listchars = "tab: ,extends:›,precedes:‹,nbsp:·,trail:·"
|
||||||
|
|
||||||
|
opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
|
opt.more = false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue