This commit is contained in:
ldraney 2024-03-24 13:36:25 -06:00
parent dbba54cfd8
commit 6380f390ea
26 changed files with 2704 additions and 0 deletions

View file

@ -0,0 +1,21 @@
-- **DEPRECATED**
-- I had to do a bash script isntead, since the sudo thing didn't work
--
--
--This function is useful so that I don't accidentally forget to use
--"sudoedit" when editing VMShare.
--fullFilePath = vim.api.nvim_buf_get_name(0)
---- check if filePath is VMShare. If it is, then force the save
--function saveSudoCheck()
--if (string.find(fullFilePath, "hgfs")) then
--vim.cmd [[w !echo 'Asdfjkl7&' | sudo -S tee % >/dev/null]]
--else
--print("bye mom")
--vim.cmd [[w]]
--end
--end
----set the keymap to s
--local opts = { noremap=true, silent=true }
--vim.api.nvim_set_keymap('n', '<C-s>', "<cmd>lua saveSudoCheck()<CR>", opts)