Problem with VI editor task solving

Dears,

I have problem with task in 24.Lab LFCS. Actually, I’m supposed to delete 1000 lines from testfile and when I did 1000dd and save file the result is wrong. When I try the same command on my local CLI everything is ok. I am not able to solve the rest of tasks because there are 2 or 3 tasks which depends of this.Could you help me please ?

Hi @Armin08

   That’s strange as you said. Try this: In normal mode (press esc key) press : to execute commands, then write “set number.” without the “” .You will see numbers in your vim editor. then press : again and write 1000 to go to the 1000 line. Then press v to enter visual mode and then gg to select from the line 1000 to the first one. After that press dd to delete all that lines of code.

   Tell me if helps

Have a nice day.

Hi @carlos140 I did 1000dd and I saw lines are deleted. But when I clikc on “check” button to verify result I got wrong result. So, 2 or 3 ruthermore tasks depends of the testfile file and of course result of those tasks wasn’t correct. I’m gonna try to follow your instructions to solve this lab. Thank you @carlos140.

I take it you are saving the file after you delete the lines?

@al1 I saved it but I don’t know what happened. Probably I made mistake in steps for sure. Anyway, thank you for help.

Let us know if you solve your problem.

Have a nice day

1 Like

Problem solved. It seems I made mistake first time.