I want to copy paste some lines in `vi`.

I have a text like

```
python class1 def:
   code code code
   ...
   code code code
   last line class1

python class2 def:
   code code code
   ...
   code code code

```

I want to copy the whole `class1`. I was trying to do it with `yNy`, so I needed to get `N`, that is, to count the number of lines the class has.

Then I thought it would be good to get the line number of `python class1 def:` (let's say X) and the `last line class1` (Y), calculate `N=Y-X`, go to the first line of the class and do the `yNy`. However, I could not figure out how I can get the line numbers.

So, is there any way to know which line I am in? And in general, is there any other way to copy paste a whole block like the one I indicated?

This is my `vi` version:

```
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 26 2012 16:44:45)
Included patches: 1-547

```