At the end of a file I have these lines, line 19 is actually a beginning of a 4 line fold.

Now if I want to add a new line after the fold, i.e a new line number 24, I usually type 'A' and enter which takes me to the beginning of a new line. But this fails when I have a fold. What happens is vim opens the fold and I get directed to the end of the first line.

What should be done to begin a new line without opening the fold

Also is there any better way to open a few line at the end of the document, what I do is I type 'A' that takes me to the end of the line and then press 'Enter'.

Thank you for your time.

18 Palatable:
19 +--  4 lines: adj 1: acceptable to the taste------------------------

Use the o command to add a new line below the current one. That will work with folds, and insert a line below the fold.

See :help o for more details on this command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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