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------------------------

1 Answer 1


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.

  • 1
    VSCode Vim user here. When I "o", the cursor opens the fold and inserts new line on the first inner-most line of the fold. Any idea how I could fix this?
    – ZenVentzi
    May 7, 2022 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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