Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
169 views
in Technique[技术] by (71.8m points)

How to quit Vim quickfix?

I know that when you run :make in Vim, you can use commands to go through each error like :cn and :cp. However, I often find myself scrolling through warnings that I don't need to fix. Is there a way to quit scrolling through the errors/warnings and resume editing? (I have heard that you can set Vim to ignore warnings, but I've been told it's difficult so I'm looking for something easier).

question from:https://stackoverflow.com/questions/3262037/how-to-quit-vim-quickfix

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can close the quickfix window by running:

:ccl[ose]

If you want to open the quickfix window again (without having to run :make) you can run:

:cope[n]

Even if the quickfix window is not visible, you can still move forwards and backwards through the items in it with the commands :cn and :cp.

Personally, I find the :cn and :cp commands quite laborious to type, so I would recommend mapping them to something more convenient if you use them often. The unimpaired plugin provides sensible mappings for moving through the quickfix list:

[q   :cprevious
]q   :cnext
[Q   :cfirst
]Q   :clast

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...