2

The line("."), command gets the line in the current buffer. Whats the command to get line in an arbitrary buffer, using buffer numbers?

1

1 Answer 1

2

The getbufinfo() returns a list of dictionaries. One of the dictionary key is lnum - line number. One other key is bufn - buffer number.

1
  • Note this function is a rather recent addition to vim's libraries (post 7.4.2204, Aug 2016) Mar 26, 2017 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.