Hi all,
Currently we have the line(), col(), virtcol() and getpos() functions
to get the position of a particular mark. But we don't have a
function to get the list of local/global marks (information displayed
by the :marks command). A plugin needs to call the above functions
in a loop for various supported local/global marks to create this list.
What do you think about adding a getmarklist() function which will
return the List of placed global/local marks? The help text for this function
is below.
We have similar functions for returning the following:
argument list: argv()
buffers in a tabpage: tabpagebuflist()
buffers: getbufinfo()
change list: getchangelist()
jump list: getjumplist()
location list: getloclist()
matches: getmatches()
quickfix list: getqflist()
signs: sign_getdefined(), sign_getplaced()
tabpages: gettabinfo()
tags: taglist()
terminals: term_list()
timers: timer_info()
windows: getwininfo()
Thanks,
Yegappan
======================================================
getmarklist([{expr}]
Returns a |List| with information about the global marks or the
local marks placed in a buffer. |mark|
The optional {expr} argument specifies a buffer. For the use
of {expr}, see |bufname()|. If specified, returns the
local marks defined in buffer {expr}. If the {expr} argument
is not supplied, then returns information about all the global
marks.
Each item in the retuned List is a |Dict| with the following:
name - name of the mark prefixed by "'"
pos - a |List| with the position of the mark:
[bufnum, lnum, col, off]
Refer to |getpos()| for more information.
file - file name
Refer to |getpos()| for getting information about a specific
mark.