ChowSinWon / highlight-selected

Highlights the current word selected when double clicking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Highlight Selected

Build Status

Double click on a word to highlight it throughout the open file.

This is something hacky I've put together as I missed the functionality that Sublime gave.

Some code and has been taken from Atom's find and replace package

Please log any issues and pull requests are more than welcome!

Gif in action

Change the following CSS in your StyleSheet to change the colours to suit your theme. Either set the light theme check box in settings to be able to toggle between styles or just overwrite the default box/background.

atom-text-editor, atom-text-editor::shadow {
  // Box
  .highlights .highlight-selected .region {
    border-color: #ddd;
  }
  // Background
  .highlights .highlight-selected.background .region {
    background-color: rgba(155, 149, 0, 0.6);
  }
  // Light theme box (set in settings)
  .highlights .highlight-selected.light-theme .region {
    border-color: rgba(255, 128, 64, 0.4);
  }
  // Light theme background (set in settings)
  .highlights .highlight-selected.light-theme.background .region {
    background-color: rgba(255, 128, 64, 0.2);
  }
}

Issues and Todo

  • Should we highlight symbols?
  • Merge this feature in the find-and-replace package

About

Highlights the current word selected when double clicking

License:MIT License


Languages

Language:CoffeeScript 90.8%Language:CSS 6.0%Language:Ruby 3.2%