" ============================================================================== " 4-21-12: fixed cursor jumping after marking using 'm' " extended ShowMarks function to outside, for the reason below " added example of auto session+marks loading/saving " 4-21-12: moved (activated) key mapping. " made the marker tag shorter by '>' " " This is definitely a copy of sowmarks.vim, modified, crude " For now, it works similar to MS utilities " " Desire to configure to (the effort is shown at the end of this file): " ^: toggle a bookmark " : goto next bookmark " shift-: goto prev. bookmark " ^-shift-: clear all bookmark " all other marker command: as it was (like m, ', `, and etc.) " " Functions: " ShowMarksToggle: Toggles a bookmark at the cursor line " ShowMarksClearAll: Clears all bookmarks " ShowMarks: To show the bookmarks, for initial loading " " ============================================================================== " Check if we should continue loading if exists( "loaded_showmarks" ) finish endif let loaded_showmarks = 1 " Bail 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 " Options: Set up some nice defaults if !exists('g:showmarks_ignore_type' ) | let g:showmarks_ignore_type = "hq" | endif let s:all_marks = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" " Commands command! -nargs=0 -bar ShowMarksClearAll call s:ShowMarksClearAll() command! -nargs=0 -bar ShowMarksToggle call s:ShowMarksToggle() command! -nargs=0 -bar ShowMarks call s:_ShowMarks() noremap