sponsor Vim development Vim logo Vim Book Ad

HiCurLine : Highlights the current line

 script karma  Rating 96/70, Downloaded by 4790  Comments, bugs, improvements  Vim wiki

created by
Charles Campbell
script type
This script has a number of maps that intercept various motions and cause the current line to be highlighted.  It is a variant of <HiMtchBrkt.vim> (vimtip#177).

    \hcli : initiate HiCurLine operation
    \hcls : stop HiCurLine operation

(see vimtip#411 to have HiCurLine automatically begin highlighting)

HiCurLine.vim uses the HL_HiCurLine highlighting group (by default) to specify the highlighting of the current line.  One may change the highlighting group HiCurLine uses with the g:HL_HiCurLine variable.  By default,

let g:HL_HiCurLine= "HL_HiCurLine"

and <HiCurLine.vim> will specify that group internally.  Otherwise, one may change the group used to whatever one wishes:

let g:HL_HiCurLine= "Search"
let g:HL_HiCurLine= "Function"

etc.  The default highlighting is: (background is a setting, see :he 'bg')

background == dark : blue text on cyan background
background == light: cyan text on blue background

(alpha/beta version available at http://www.drchip.org/astronaut/vim/index.html#HICURLINE)
install details
1. Put into your .vim/plugin or
   _vimfiles\plugin directory (Unix/Windows)
2. \hcli (actually <Leader> hcli) will
   begin the highlighting.
3. \hcls will terminate HiCurLine activity, restoring any previous maps, etc. (actually <Leader>hcls)
   (see :he mapleader for more on how to customize the leading characters of mappings)


rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
HiCurLine.vim.gz 6 2005-11-22 6.0 Charles Campbell * \hclt and :HCL now toggles [HiCurLine] mode
* Cursorhold/FocusGained update time now set to 200ms
* go =~ 'm' now used in test to see if menus are to be generated
HiCurLine.vim.bz2 5 2004-07-16 6.0 Charles Campbell Several small improvements this time: HiCurLine now uses CursorHold to update its highlighting when the colorscheme has been changed.  More motion support: gg and G.  The highlighting group HL_HiCurLine is used, thereby permitting the user to override it.  The g:HL_HiCurLine variable is "HL_HiCurLine" by default, but the user may change that (ex. let g:HL_HiCurLine="Search").
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.