Created
May 3, 2009 23:38
-
-
Save fishman/106199 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:Marker = {} | |
let s:Marker.revlookup = {} | |
function! s:Marker.addRevlookup(lnum, index, istab) | |
" get current list of tabstops per line | |
if !exists('s:Marker.revlookup[a:lnum]') | |
if a:istab | |
let lookupList = {'tab': [a:index], 'ph': []} | |
else | |
let lookupList = {'tab': [], 'ph': [a:index]} | |
endif | |
let s:Marker.revlookup[a:lnum] = lookupList | |
else | |
if a:istab | |
key = 'tab' | |
else | |
key = 'ph' | |
endif | |
let tabList = s:Marker.revlookup[a:lnum][key] | |
let s:Marker.revlookup[a:lnum][key] = add(tabList, a:index) | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment