The line(".")
, command gets the line in the current buffer. Whats the command to get line in an arbitrary buffer, using buffer numbers?
2
2
The getbufinfo()
returns a list of dictionaries. One of the dictionary key is lnum
- line number. One other key is bufn
- buffer number.
-
Note this function is a rather recent addition to vim's libraries (post 7.4.2204, Aug 2016) – user1138184 Mar 26 '17 at 14:32
:h getbufline()
– Christian Brabandt Mar 21 '17 at 11:19