Code Monkey home page Code Monkey logo

wholelinecolor's Introduction

vim-wholelinecolor

vim plugin for changing background color of lines

Summary

Have you ever wanted to mark lines or groups of lines in a way that is easy to see and be be able to jump to those markings? The WholeLineColor plugin lets you do just that. Using Vim's signs feature, the background color of lines can be changed with convenient mappings. Groups of lines can be marked in visual mode with the same mappings. There are also mappings to go to the next and previous group of marked lines.

Functionality

<Space>bu

Remove set color from current (or selected) lines.

<Space>bn

Set background of current or selected lines to green.

<Space>bg

Set background of current or selected lines to grey.

<Space>bl

Set background of current or selected lines to blue.

<Space>bp

Set background of current or selected lines to purple.

<Space>br

Set background of current or selected lines to red.

<Space>bb

Set background of current or selected lines to black.

The above mappings work in both normal and visual mode and take a count just like built in commands.

If you have the vim-repeat plugin installed, you can also repeat any of the above mappings with dot, '.'.

<Space>bK

Delete all lines that don't have background color set (keep only lines with background color set).

<Space>bD

Delete all lines with background color set.

<Space>bU

Remove all set background colors.

<c-n>

Go to next group of lines with background color set.

<c-p>

Go to previous group of lines with background color set.

Options

g:wholelinecolor_leader

The key used as the leader to the mappings. The default is <Space>.

g:wholeline_sign_num

Starting sign id. The default is 373700. Change this if this is conflicting with other sign ids, e.g. sign ids coming from other plugins.

g:wholelinecolor_next

The keystroke used to go to the next group of lines with background color set. The default is <c-n>.

g:wholelinecolor_prev

The keystroke used to go to the previous group of lines with background color set. The default is <c-p>.

These are the default highlight settings. Change them to suit your preferences.

    highlight WLCBlackBackground  ctermbg=233 guibg=#121212
    highlight WLCRedBackground    ctermbg=52  guibg=#882323
    highlight WLCBlueBackground   ctermbg=17  guibg=#003366
    highlight WLCPurpleBackground ctermbg=53  guibg=#732c7b
    highlight WLCGreyBackground   ctermbg=238 guibg=#464646
    highlight WLCGreenBackground  ctermbg=22  guibg=#005500

Credits

The starting point of this plugin was the numsign plugin created by Jinjing He. Some of the original code remains.

License

The WholeLineColor plugin is released under Vim's license.

wholelinecolor's People

Contributors

scottupdike avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

elig0n

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.