Git Product home page Git Product logo

vim-codepainter's Introduction

vim-codepainter ๐ŸŽจ๐Ÿ–Œ

A plugin for Vim to color different parts of code making the use of Highlights

This plugin is made to manage the different "colors" that you can assign to the code. The idea is as simple as to pre-append a delimeter like #0# before each line and then add a matching rule to highlight that lines.

Demo

How to use

Once installed (I highly recommend vim-plug), you need to set a color (or use default), select the area you want to "paint" and press F2 (default key-binding) to paint it.

If you had something already painted, selecting and applying the same color will result on removing it (removing the tags and the match rule if there is no other marker for that color).

Changing between colors

There are 10 colors definend on the plugin source, you can change them as you like. In order to change between them, you should run :PainterPickColor <n> where n is an integer from 0-9.

Changing the delimiter

In case the default delimiter makes a conflict with your code, you can change it via the command :PainterChangeDelimiter <arg> , where arg should be a string and should have one character "d" which will represent the color.

So if I wanted to change the default delimiter to "$$d" I'll run :PainterChangeDelimiter "$$d"

Cleaning everything

If you want to remove every marker and every match rule, you should run the command :PainterEraseAll

Known issues

If you first paint something with a color and then apply another color to the same selection, it will result in an error. In this case, you should first unpaint the desired area with the paint color it already has and then apply the new color.

Contributions

In case you find a bug and want to fix it or add new features, feel free to fork the repo and create a pull request!

vim-codepainter's People

Contributors

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