Getting the current row number?
问题 Is there any key mapping that outputs the current row number of the line being edited? Or, even better yet, can we do formulas based on the output of the key mapping? I want to get the row number and add 1 to the current text being edited. 回答1: Ctrl + G will tell you the line number and even the column the cursor is in. If you mean output it as text to your document, then not that I know of. 回答2: What do you mean by "output"? You can do: :echo line(".") + 1 To display the current line number