How do I display the buffer number of the current buffer/file?

You can use 2<CTRL-G> command to display the buffer number for the current file/buffer. Note the use of count before the CTRL-G command. If the count is greater than 1, then Vim will display the buffer number. You can also use the following command to display the current buffer number:

    :echo bufnr("%")

You can also include the “%n” field to the ‘statusline’ option to display the current buffer number on the statusline.

Read free Software Algorithms and Computer Science Books by CodeAhoy Learn.

Introduction to Recursion and Backtracking

Sorting Algorithms

Introduction to C Programming Language

And More...

Speak Your Mind