(nvim) fixed clipboard selection

This commit is contained in:
zegonix
2026-04-20 15:22:24 +02:00
parent d362f03534
commit 64d8115fbe
+17 -19
View File
@@ -3,9 +3,7 @@ vim.wo.number = true
vim.o.relativenumber = true
-- sync clipboards of nvim and os
vim.schedule(function()
vim.opt.clipboard = "unnamedplus"
end)
vim.opt.clipboard = "unnamedplus"
-- disable line wrap..
vim.o.wrap = false
@@ -20,21 +18,21 @@ vim.o.autoindent = true
vim.o.smartindent = true
-- search settings
vim.o.hlsearch = true -- enable highlighting of hits with current serch expression
vim.o.incsearch = true -- enable incremental search
vim.o.ignorecase = true -- search ignore case
vim.o.hlsearch = true -- enable highlighting of hits with current serch expression
vim.o.incsearch = true -- enable incremental search
vim.o.ignorecase = true -- search ignore case
vim.o.smartcase = true
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>") -- clear search highlight on `ESC`
-- set tab to 4 spaces and convert tabs to spaces
vim.api.nvim_create_autocmd("FileType", {
pattern = "*",
callback = function()
vim.o.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
vim.o.expandtab = true
end,
pattern = "*",
callback = function()
vim.o.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
vim.o.expandtab = true
end,
})
-- make cursor shy of window border by n lines/characters
@@ -43,10 +41,10 @@ vim.o.sidescrolloff = 8
-- view settings
vim.g.have_nerd_font = false
vim.o.cursorline = true -- highlight current line
vim.o.cursorline = true -- highlight current line
vim.o.termguicolors = true -- enable true colors (rgb)
vim.o.showmode = false -- show current mode (normal, insert, visual)
vim.o.pumheight = 10 -- pop up menu height
vim.o.showmode = false -- show current mode (normal, insert, visual)
vim.o.pumheight = 10 -- pop up menu height
vim.o.cmdheight = 1
vim.o.signcolumn = "yes"
vim.o.updatetime = 250
@@ -72,7 +70,7 @@ vim.o.completeopt = "menuone,noselect"
vim.opt.isfname:append("@-@")
vim.opt.shortmess:append("c") -- don't give |ins-completion-menu| messages
vim.opt.iskeyword:append("-") -- hyphenated words recognized by searches
vim.opt.formatoptions:remove({ "c", "r", "o" }) -- don't insert the current comment leader automatically for auto-wrapping comments using 'textwidth', hitting <Enter> in insert mode, or hitting 'o' or 'O' in normal mode.
vim.opt.shortmess:append("c") -- don't give |ins-completion-menu| messages
vim.opt.iskeyword:append("-") -- hyphenated words recognized by searches
vim.opt.formatoptions:remove({ "c", "r", "o" }) -- don't insert the current comment leader automatically for auto-wrapping comments using 'textwidth', hitting <Enter> in insert mode, or hitting 'o' or 'O' in normal mode.
vim.opt.runtimepath:remove("/usr/share/vim/vimfiles") -- separate vim plugins from neovim in case vim still in use