Giter VIP home page Giter VIP logo

vital-neon's Introduction

vital-Neon logo

A vital module to highlight text dynamically.

Requirements

Usage

Blink text that matches a specified pattern

let s:blink_flow = [
      \   ['DiffDelete', 300],
      \   ['NONE', 300],
      \ ]
call s:Neon.add(s:blink_flow, '\[\zs[^]]*\ze\],', {'repeat': -1})

demo-blink

Create a mapping that glows the cursor line

highlight MyGlow1 ctermbg=236 guibg=#161821
highlight MyGlow2 ctermbg=237 guibg=#222428
highlight MyGlow3 ctermbg=238 guibg=#2e3130
highlight MyGlow4 ctermbg=239 guibg=#393d37
highlight MyGlow5 ctermbg=240 guibg=#45493e
let s:glow_flow = [
      \   ['MyGlow1', 200],
      \   ['MyGlow2', 200],
      \   ['MyGlow3', 200],
      \   ['MyGlow4', 200],
      \   ['MyGlow5', -1],
      \ ]
function s:glow_cursorline() abort
  let cursorlnum = line('.')
  call s:Neon.add(s:glow_flow, [cursorlnum])
endfunction
nnoremap <F7> <Cmd>call <SID>glow_cursorline()<CR>

demo-glow

Create a mapping that flashes the lines indented by = operator

highlight MyFlash1 ctermbg=240 guibg=#384851
highlight MyFlash2 ctermbg=239 guibg=#303c45
highlight MyFlash3 ctermbg=238 guibg=#273039
highlight MyFlash4 ctermbg=237 guibg=#1f242d
highlight MyFlash5 ctermbg=236 guibg=#161821
let s:flash_flow = [
      \   ['MyFlash1', 50],
      \   ['MyFlash2', 50],
      \   ['MyFlash3', 50],
      \   ['MyFlash4', 50],
      \   ['MyFlash5', 50],
      \ ]
function s:set_operatorfunc() abort
  let &operatorfunc = get(funcref('s:hl_indent'), 'name')
  return ''
endfunction
function s:hl_indent(_) abort
  normal! =g']
  call s:Neon.add(s:flash_flow, range(line("'["), line("']")))
endfunction
nnoremap <expr> = <SID>set_operatorfunc() .. 'g@'
xnoremap <expr> = <SID>set_operatorfunc() .. 'g@'

demo-flash

License

NYSL Version 0.9982

vital-neon's People

Contributors

obcat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.