Skip to content

⚡️📋 VSCode extension to briefly flash and highlight the selected text that has been copied

License

Notifications You must be signed in to change notification settings

rcoopr/highlight-on-copy

 
 

Repository files navigation


Highlight on Copy

⚡️📋 Briefly flash and highlight the selected text that has been copied

This is a VSCode extension inspired by the Vim plugin vim-highlightedyank and the Neovim built-in highlight yanked region feature.

Configuration 🛠️

The extension works out of the box when triggering your default copy to clipboard shortcut (Ctrl + C, Cmd + C).

If you wish to change the default keybinding, you can do it in your Keyboard Shortcuts:

  1. Open Command Palette.
  2. On Windows and Linux, press Ctrl + Shift + P. On macOS, press Cmd + Shift + P.
  3. Search for Open Keyboard Shortcuts and search for the `highlightOnCopy.run" command and remap the shortcut to your needs.

Also, you can customize the color and the duration of the highlight with these entries in your settings.json:

  1. Open Command Palette.
  2. On Windows and Linux, press Ctrl + Shift + P. On macOS, press Cmd + Shift + P.
  3. Search for Open User Settings (JSON) and select it from the list. This command takes you directly to the settings.json file where all your settings are defined.
  4. You can now add your custom settings for the extension. Add the following and adjust them to your liking.:
{
    "highlightOnCopy.backgroundColor": "rgba(230, 97, 89, 0.7)",
    // by default the foreground text color it's undefined, meaning the actual color won't be modified
    "highlightOnCopy.foregroundColor": "#fff",
    "highlightOnCopy.timeout": 200
}

 License 📄

This project is licensed under the MIT License.

 Author 🙋🏽‍♂️

I'm Marc Güell Segarra, a freelance software developer at Ondori.dev.

 Buy Me a Coffee ☕

If you found this extension useful, consider buying me a coffee!

About

⚡️📋 VSCode extension to briefly flash and highlight the selected text that has been copied

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.9%
  • JavaScript 2.1%