auto-highlight

Highlight text automatically on cursor(even without selection).

davideuler

4,065

1

0.14.0

MIT

GitHub

This package provides the following services:

This package consumes the following services:

Auto-highlight Build Status

Commands

And following two operator for vim-mode-plus user.

Keymap

No default keymap.

e.g.

'atom-workspace atom-text-editor:not([mini])':
  'cmd-k m': 'auto-highlight:toggle'
  'cmd-k M': 'auto-highlight:clear'
'atom-text-editor.vim-mode-plus.normal-mode, atom-text-editor.vim-mode-plus.visual-mode':
  'space m': 'vim-mode-plus-user:auto-highlight-word'
  'space M': 'auto-highlight:clear'
  'g m': 'vim-mode-plus-user:auto-highlight'

Modify highlight style

You can override style in you style.less. See example below.

@import "syntax-variables";

// For selection color
//=======================
atom-text-editor .auto-highlight.box-selection .region {
  border-width: 1px;
  background-color: transparent;
  border-color: @syntax-text-color;
}

// Make underline manual highlight prioritized(come front) over other highlight
//=======================
// Mixin to set z-index of auto-highlight manual color
.auto-highlight-z-index(@name, @value) {
  .auto-highlight.@{name} .region {
    z-index: @value;
  }
}

// auto-highlight use 0 to 7 color
//  for box style, use box-01 to box-07
//  for highlight style, use highlight-01 to highlight-07
.auto-highlight-z-index(underline-01, 1);
.auto-highlight-z-index(underline-02, 1);
.auto-highlight-z-index(underline-03, 1);
.auto-highlight-z-index(underline-04, 1);
.auto-highlight-z-index(underline-05, 1);
.auto-highlight-z-index(underline-06, 1);
.auto-highlight-z-index(underline-07, 1);

vim-mode-plus operator

You can auto-highlight with combination of any motion, text-object.
Since it's operator, yes can repeat by ..

e.g.

Display found count on StatusBar

By default, when you highlight new text by auto-highlight:toggle, found count is displayed on StatusBar.
You can configure CSS class to use with countDisplayStyles.
See. styleguide:show for available style classes.

e.g.

TODO