Skip to content
Proyectos

winston0410/range-highlight.nvim

Ver en GitHub

Acerca de

An extremely lightweight plugin (~ 120loc) that hightlights ranges you have entered in commandline.

Herramientas de desarrollo

Cómo se miden estas cifras

What you can do

  • Single line range highlight (:10)
  • Absolute range highlight (:20,15)
  • Semicolon separated range highlight (:20;15)
  • Backward range highlight (:20,15)

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

range-highlight.nvim

An extremely lightweight plugin (~ 120loc) that highlights ranges you have entered in command line.

Demo for using range-highlight

Features

  • Single line range highlight (:10)

  • Absolute range highlight (:20,15)

  • Semicolon separated range highlight (:20;15)

  • Backward range highlight (:20,15)

  • Shorthand range highlight (:,15)

  • Dot range highlight (:.,-2, :5,.)

  • Relative range highlight (:+5,-2)

  • Multiple relative range highlight (:10+5--,5+3-2)

  • Mark range highlight (:'a,20)

  • Last line and whole file highlight (:4,$, :%)

  • Pattern range highlight (:/hello/d, ?world?d)

Installation

range-highlight.nvim requires a minimum version of NeoVim 0.10.0.

You can install it using any NeoVim package manager. For example:

lazy.nvim

require("lazy").setup({
    {
        "winston0410/range-highlight.nvim",
        event = { "CmdlineEnter" },
        opts = {},
    }
})
,

Configuration

This is the default configuration. It is likely that you don't need to change anything.

require("range-highlight").setup({ 
	highlight = {
		group = "Visual",
		priority = 10,
		-- if you want to highlight empty line, set it to true
		to_eol = false,
	},
	-- disable range highlight, if the cmd is matched here. Value here does not accept shorthand
	excluded = { cmd = {} },
	debounce = {
		-- how long to debounce, set to 0 to disable
		wait = 100,
	},
})

Disable highlight when you run :%s

If you want to prevent range highlighting, when using a substitute command, you can use the following exclusion list.

require("range-highlight").setup({ 
	excluded = { cmd = { "substitute" } },
})

Explorar proyectos relacionados

Cargando…