Am 18.09.2019 um 17:18 schrieb Yegappan Lakshmanan:
Hi all,

Currently the following Vim built-in functions are available to get
information about individual marks: getpos(), line() and col().

But we don't have a function to get the list of marks placed in a
buffer or the list of global marks (similar to the list displayed by
the :marks command).

What do you think about adding a getmarks() function that returns
the list of global marks or the list of marks placed in a buffer?

What do you mean by "a buffer" -- "the current buffer" or "any given buffer"?

Getting global marks or marks of the current buffer is trivial

:echo filter(split('ABCDEFGHIJKLMNOPQRSTUVWXYZ', '\m'), 'line("''". v:val) >= 
1')
:echo filter(split('abcdefghijklmnopqrstuvwxyz', '\m'), 'line("''". v:val) >= 
1')
" (some other special marks omitted)

but I wouldn't know how to get marks from any given buffer without
making that buffer current.  Anyway I'm not sure if I ever asked for
the local marks of a non-current buffer.

--
Andy

--
--
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/5D825175.9000602%40yahoo.de.

Raspunde prin e-mail lui