Code Monkey home page Code Monkey logo

vim-hl-var's Introduction

Vim plugin to highlight variables in Perl

This Vim plugin will highlight all instances of the Perl variable under the cursor. It is a fork of Sandeep.c.r's plugin to do the same for PHP.

Imgur

(Image credit: Ovid)

Perl variables, of all types, will be highlighted, as will methods.

Installation

If you are using a package manager such as Vundle or Pathogen, this plugin should be installed in the standard manner. If you are not (why not?), you could just copy hl-var.vim into your ~/.vim/plugins directory.

Requires Vim version 7.3 or later.

Configuration

The variables will be highlighted after you have not performed any action for a certain length of time. That time is controlled by the updatetime setting. (See :help updatetime.) The default value is 4000, which is four seconds. That value is too large for this plugin, so I recommend adjusting it to 500, which is half a second. You can experiment with the value which works best for you.

set updatetime=500

You can customise the highlighting applied by this plugin by using the hlvarhl global variable. This can be set in your .vimrc file:

let g:hlvarhl="ctermbg=black ctermfg=red guifg=#ff0000 guibg=#000000 gui=bold"

If you don't want the variable under cursor to be highlighted, you can disable it by setting variable g:hlvarcurrent to 1.

let g:hlvarcurrent = 1

Licence

This code is released under the MIT licence, as is Sandeep's original code. See hl-var.vim for the full licence.

Authors

This version was forked from Sandeep's repository, with his blessing. Curtis "Ovid" Poe hacked it to support Perl. It is currently being maintained by Paul Johnson.

vim-hl-var's People

Contributors

mannih avatar mattoates avatar pjcj avatar rgs 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.