" ============================================================================== " Name: ShowMarks " Description: Visually displays the location of marks local to a buffer. " Authors: Anthony Kruize " Michael Geddes " Version: 1.3 " Modified: 20 May 2002 " License: Released into the public domain. " ChangeLog: 1.3 - Fixed toggling ShowMarks not responding immediately. " Added user commands for toggling/hiding marks. " Added ability to disable ShowMarks by default. " 1.2 - Added a check that Vim was compiled with +signs support. " Added the ability to define which marks are shown. " Removed debugging code I accidently left in. " 1.1 - Added support for the A-Z marks. " Fixed sign staying placed if the line it was on is deleted. " Clear autocommands before making new ones. " 1.0 - First release. " " Usage: Copy this file into the plugins directory so it will be " automatically sourced. " " Default keymappings are: " mt - Toggles ShowMarks on and off. " mh - Hides a mark. " " Hiding a mark doesn't actually remove it, it simply moves it " to line 1 and hides it visually. " " Configuration: The following variables can be used to customize the " behavior of ShowMarks. Simply include them in your vimrc " file with the desired settings. " " showmarks_enable (Default: 1) " Defines whether ShowMarks is enabled by default or not. " Example: let showmarks_enable=0 " showmarks_include (Default: "a-zA-Z") " Defines which marks will be shown. " Example: let showmarks_include="a-dmtuA-E" " ============================================================================== " Check if we should continue loading if exists( "loaded_showmarks" ) finish endif let loaded_showmarks = 1 " Bail out if Vim isn't compiled with signs support. if has( "signs" ) == 0 echohl ErrorMsg echo "ShowMarks requires Vim to have +signs support." echohl None finish endif " Enable showmarks by default. if !exists('g:showmarks_enable') let g:showmarks_enable = 1 endif " Show all marks by default. if !exists('g:showmarks_include') let g:showmarks_include = "a-zA-Z" endif " Commands com! -nargs=0 ShowMarksToggle :silent call ShowMarksToggle() com! -nargs=0 ShowMarksHideMark :silent call ShowMarksHideMark() " Mappings if !hasmapto( 'ShowmarksShowMarksToggle' ) map mt ShowmarksShowMarksToggle endif if !hasmapto( 'ShowmarksHideMark' ) map mh ShowmarksShowMarksHideMark endif noremap