aboutsummaryrefslogtreecommitdiff
path: root/Common
diff options
context:
space:
mode:
Diffstat (limited to 'Common')
-rwxr-xr-xCommon/nvim/lua/basic.lua10
-rwxr-xr-xCommon/nvim/lua/helper_functions.lua1
2 files changed, 11 insertions, 0 deletions
diff --git a/Common/nvim/lua/basic.lua b/Common/nvim/lua/basic.lua
index 3749310..d1b0901 100755
--- a/Common/nvim/lua/basic.lua
+++ b/Common/nvim/lua/basic.lua
@@ -226,6 +226,16 @@ if vim.fn.has("mac") or vim.fn.has("macunix") then
map('v', '<D-k>', '<M-k>', silentnoremap)
end
+-- Interact with system clipboard
+map('v', '<leader>y', '"+y', noremap)
+map('n', '<leader>Y', '"+yg_', noremap)
+map('n', '<leader>y', '"+y', noremap)
+
+map('v', '<leader>p', '"+p', noremap)
+map('v', '<leader>P', '"+P', noremap)
+map('n', '<leader>p', '"+p', noremap)
+map('n', '<leader>P', '"+P', noremap)
+
-- Delete trailing whitespace on save
--vim.api.nvim_create_autocmd("BufWritePre", {
-- pattern = { "*" },
diff --git a/Common/nvim/lua/helper_functions.lua b/Common/nvim/lua/helper_functions.lua
index 515854f..1b9ac50 100755
--- a/Common/nvim/lua/helper_functions.lua
+++ b/Common/nvim/lua/helper_functions.lua
@@ -1,5 +1,6 @@
-- opts that replicate the nore part of noremap
silentnoremap = { noremap = true, silent = true }
+noremap = { noremap = true, silent = false }
-- Just to make the map function "shorter"
function map(kind, lhs, rhs, opts)