*errormarker* Plugin to highlight error positions v0.1.11 ERROR MARKER REFERENCE MANUAL ~ 1. Usage |errormarker-usage| 2. Customization |errormarker-customization| 3. Credits |errormarker-credits| 4. Changelog |errormarker-changelog| This plugin is only available if Vim was compiled with the |+signs| feature and 'compatible' is not set. ============================================================================== 1. USAGE *errormarker-usage* This plugin hooks the quickfix command |QuickFixCmdPost| and generates error markers for every line that contains an error. Vim has to be compiled with |+signs| for this to work. Additionally, a tooltip with the error message is shown when you hover with the mouse over a line with an error (only available when compiled with the |+balloon_eval| feature). The functionality mentioned here is a plugin, see |add-plugin|. This plugin is only available if 'compatible' is not set and Vim was compiled with |+signs| support. You can avoid loading this plugin by setting the "loaded_errormarker" variable in your |vimrc| file: > :let loaded_errormarker = 1 ============================================================================== 2. CUSTOMIZATION *errormarker-customization* You can customize the signs that are used by Vim to mark warnings and errors (see |:sign-define| for details). *errormarker_erroricon* *errormarker_warningicon* The icons that are used for the warnings and error signs in the GUI version of Vim can be set by > :let errormarker_erroricon = "/path/to/error/icon/name.png" :let errormarker_warningicon = "/path/to/warning/icon/name.png" If an icon is not found, text-only markers are displayed instead. The bitmap should fit into the place of two characters. You must use full paths for these variables, for icons in your home directory expand the paths in your .vimrc with something like > :let errormarker_erroricon = expand ("~/.vim/icons/error.png") To get working icons on Microsoft Windows, place icons for errors and warnings (you can use Google at http://images.google.com/images?q=error&imgsz=icon to find some nice ones) as error.bmp and warning.bmp in your home directory at C:\Documents and Settings\\vimfiles\icons. *errormarker_errortext* *errormarker_warningtext* The text that is displayed without a GUI or if the icon files can not be found can be set by > :let errormarker_errortext = "Er" :let errormarker_warningtext = "Wa" The maximum length is two characters. *errormarker_errorgroup* *errormarker_warninggroup* The hightlighting groups that are used to mark the lines that contain warnings and errors can be set by > :let errormarker_errorgroup = "ErrorMsg" :let errormarker_warninggroup = "Todo" < *errormarker_warningtypes* If the compiler reports a severity for the error messages this can be used to distinguish between warnings and errors. Vim uses a single character error type that can be parsed with |errorformat| (%t). The error types that should be treated as warnings can be set by > let errormarker_warningtypes = "wWiI" For example, the severity of error messages from gcc averagergui.cpp|18 warning| unused parameter ‘file’ ~ averagergui.cpp|33 error| expected class-name before ‘I’ ~ can be parsed by adding the following lines to your .vimrc > let &errorformat="%f:%l: %t%*[^:]:%m," . &errorformat let &errorformat="%f:%l:%c: %t%*[^:]:%m," . &errorformat let errormarker_warningtypes = "wW" If you use a different locale than English, this may be also needed: > set makeprg=LANGUAGE=C\ make ============================================================================== 3. CREDITS *errormarker-credits* Author: Michael Hofmann ============================================================================== 4. CHANGELOG *errormarker-changelog* 0.1.11 - changelog fix 0.1.10 - removes accidental dependency on NerdEcho 0.1.9 - fixes Win32 icon display 0.1.8 - check for Vim version 0.1.7 - fixes gcc error message parsing example 0.1.6 - support for GetLatestVimScripts (vimscript#642) 0.1.5 - clarified documentation about paths 0.1.4 - fixes icon name and variable escaping 0.1.3 - customizable signs - distinguishes between warnings and errors 0.1.2 - documentation 0.1.1 - handles nonexistent icons gracefully - tooltips only used if Vim has balloon-eval support 0.1 - initial release ============================================================================== vim:tw=78:ts=8:ft=help:norl: