From 6bda5054922a0c7f9a59574532281d51677b11a3 Mon Sep 17 00:00:00 2001 From: dla Date: Thu, 12 Sep 2024 23:16:22 +0700 Subject: [PATCH] Add C-c --- init.lua | 4 ++-- lua/custom/keymaps.lua | 5 +++-- lua/custom/options.lua | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 7d460709..a57806e2 100644 --- a/init.lua +++ b/init.lua @@ -165,7 +165,7 @@ vim.opt.scrolloff = 10 -- Clear highlights on search when pressing in normal mode -- See `:help hlsearch` -vim.keymap.set('n', '', 'nohlsearch') +-- vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) @@ -924,7 +924,7 @@ require('lazy').setup({ -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.indent_line', require 'kickstart.plugins.lint', require 'kickstart.plugins.autopairs', require 'kickstart.plugins.neo-tree', diff --git a/lua/custom/keymaps.lua b/lua/custom/keymaps.lua index 7c120aa2..799bcf49 100644 --- a/lua/custom/keymaps.lua +++ b/lua/custom/keymaps.lua @@ -1,4 +1,3 @@ --- vim.keymap.set('n', '', 'nohlsearch') vim.keymap.set('n', 'l', ':set hlsearch!', { noremap = true, silent = true, desc = 'Toggle highlight search' }) -- Map Ctrl-s to save the file in normal and insert mode @@ -6,4 +5,6 @@ vim.keymap.set('n', '', ':w', { noremap = true, silent = true }) vim.keymap.set('i', '', ':w', { noremap = true, silent = true }) -- Map Ctrl-c to yank (copy) the selected text in visual mode -vim.api.nvim_set_keymap('v', '', '"+y', { noremap = true, silent = true }) +vim.keymap.set('v', '', '"+y', { noremap = true, silent = true }) + +vim.keymap.set('n', '', '', { noremap = true, silent = true }) diff --git a/lua/custom/options.lua b/lua/custom/options.lua index 0c376db4..38e47d09 100644 --- a/lua/custom/options.lua +++ b/lua/custom/options.lua @@ -5,3 +5,4 @@ vim.opt.expandtab = true -- Convert tabs to spaces vim.opt.smartindent = true -- Enable smart indentation vim.opt.autoindent = true -- Enable auto indentation vim.opt.relativenumber = true +vim.opt.wrap = true