0

I often use my code completely folded just to grasp the main structure. When fixing some error I go directly to the line with nG where n is the line number (sometimes I also use :n, or even nvim +n file), and, as expected I get into a fold, then, I type zO to completely open the fold where the cursor is. Is possible to after executing a jump, if the line landed is folded it auto executes zO?

Using neovim 0.10.4

1
  • Have you considered reading :help folding?
    – romainl
    Commented Mar 31 at 5:01

1 Answer 1

1

I would use the foldopen option namely:

set foldopen+=jump

You could be also interested by:

set foldopen+=jump,quickfix

More information with: :help 'foldopen'

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.