I don't use `:marks` in any of my plugins, but if I did, I would _much_ 
prefer a function returning them as a list/dict than having to parse the 
output of exectute( 'marks' )

So +1 to this, and +1 to adding one for popups too.

On Friday, May 1, 2020 at 4:52:27 PM UTC+1, yega...@gmail.com wrote:
>
> 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.
>
>
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/762f1d49-c28c-4ac1-a612-a8ba277ea960%40googlegroups.com.

Raspunde prin e-mail lui