Skip to content

himanshugoswamiii/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chezmoi

Machine to Machine Differences

Neovim

.tmpl file for Neovim

It requies osc program to be installed

{{- if eq .chezmoi.hostname "hac-himkumar-1" }}

-- **************  YEXT YANK using OSC  **************************
-- Define the function to pipe yanked content to the osc script
local function pipe_yanked_text()
  local yanked_text = vim.fn.getreg('"') -- get the yanked text from the unnamed register

  local command = string.format("echo %s | osc copy", vim.fn.shellescape(yanked_text))
  os.execute(command)
end

-- Setup an autocmd to call the function whenever text is yanked
vim.api.nvim_create_autocmd("TextYankPost", {
  desc = "Copy text using osc copy",
  callback = pipe_yanked_text,
})
{{- end }}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published