Giter Site home page Giter Site logo

moyiz / command-and-cursor.nvim Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 0.0 159 KB

Highlight cursor and visual selections in current buffer when entering command mode.

License: BSD 3-Clause "New" or "Revised" License

Lua 100.00%
neovim neovim-plugin nvim nvim-lua nvim-plugin

command-and-cursor.nvim's Introduction

command-and-cursor.nvim

Highlight cursor and visual selections when entering command mode (experimental).

Demo

command-and-cursor-2024-04-18_13.31.53.webm

Features

  • Highlight cursor in active buffer when entering command mode (:/?).
  • Highlight visual selections and include cursor location by default (inclusive).
  • Highlight initial visual selection prior to its expansion with incremental search.
  • Configure highlight group.

Motivation

  • In normal mode, cursor "disappears" from buffer when entering cmdline.
  • Visual selection highlight is not inclusive (cursor).
  • Visual selection highlight might be too subtle in a colorful "big" terminal.
  • When expanding a visual selection with incremental search, there is no indication of the original selection.

Installation

Use your favorite plugin manager:

Lazy

{
  "moyiz/command-and-cursor.nvim",
  event = "VeryLazy",
  opts = {},
}

Options

M.defaults = {
  hl_group = "TermCursor", -- The highlight group to use.
  hl_priority = 300,       -- Priority of highlight
  inclusive = true,        -- Highlight cursor with visual selection.
  debug_position = false,  -- Show start and end positions with `vim.notify`.
}

License

See LICENSE.

command-and-cursor.nvim's People

Contributors

moyiz avatar

Stargazers

Ajay Mamtora avatar Waldemar avatar Iain Simmons avatar Cenk Kılıç avatar Oliver Tzeng avatar Bartek Łuka avatar Taken avatar Tom avatar Hugo Lewenhaupt avatar Mostafa Qanbaryan avatar Marc Jakobi avatar robin avatar Matthieu Coudron avatar Chaz avatar Ofir Gal avatar Yuta Katayama avatar

Watchers

 avatar  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.