How can I close the quickfix window and go back to the file I was editing Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Using GNU GLOBAL and gtags-cscope in vimMake cnext and cprevious loop back to the beginingWhy the result file of cscope found in quickfix window can't be showed in file explorer?More error context in the QuickFix window?Enable cursorline and cursorcolumn after Quickfix window is openedHow to show quickfix without jumping to quickfix window?How to go to quickfix window?How to synchronize between NORMAL and Quickfix window?How to differentiate quickfix window buffers and location list buffers?Close multiple quickfix windows

Raising a bilingual kid. When should we introduce the majority language?

How to find the stem of any word?

Double-nominative constructions and “von”

As an international instructor, should I openly talk about my accent?

Suing a Police Officer Instead of the Police Department

Crossed out red box fitting tightly around image

How do I check if a string is entirely made of the same substring?

How long after the last departure shall the airport stay open for an emergency return?

std::unique_ptr of base class holding reference of derived class does not show warning in gcc compiler while naked pointer shows it. Why?

Putting Ant-Man on house arrest

Was Dennis Ritchie being too modest in this quote about C and Pascal?

Should the Product Owner dictate what info the UI needs to display?

How would this chord from "Rocket Man" be analyzed?

Is accepting an invalid credit card number a security issue?

Implementing 3DES algorithm in Java: is my code secure?

Contradiction proof for inequality of P and NP?

Map material from china not allowed to leave the country

First instead of 1 when referencing

What to do with someone that cheated their way through university and a PhD program?

Is this homebrew arcane communication device abusable?

Is there really no use for MD5 anymore?

The weakest link

How to find if a column is referenced in a computed column?

How much cash can I safely carry into the USA and avoid civil forfeiture?



How can I close the quickfix window and go back to the file I was editing



Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Using GNU GLOBAL and gtags-cscope in vimMake cnext and cprevious loop back to the beginingWhy the result file of cscope found in quickfix window can't be showed in file explorer?More error context in the QuickFix window?Enable cursorline and cursorcolumn after Quickfix window is openedHow to show quickfix without jumping to quickfix window?How to go to quickfix window?How to synchronize between NORMAL and Quickfix window?How to differentiate quickfix window buffers and location list buffers?Close multiple quickfix windows










2















I use gutentags and gutentags-plus for generating and managing tag files. When I use the key combinations setup by them ( cX usually ), it opens the relevant lines in a quickfix window and I can use :cnext etc for navigation. But how do I close them quickfix window and go back to the file I was editing after I have gone through the lines found in cscope?



PS: Actually I am using global instead of cscope but I guess on VIM side it should not matter.










share|improve this question









New contributor




Osada Lakmal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 3





    I'm not sure what your PS means. However I think you're looking for :cclose :h :cclose?

    – statox
    6 hours ago











  • Corrected and added a link to clarify. Sorry about that!

    – Osada Lakmal
    5 hours ago











  • Ok I get it now, but my solution still stands: is :cclose the command you're looking for?

    – statox
    4 hours ago















2















I use gutentags and gutentags-plus for generating and managing tag files. When I use the key combinations setup by them ( cX usually ), it opens the relevant lines in a quickfix window and I can use :cnext etc for navigation. But how do I close them quickfix window and go back to the file I was editing after I have gone through the lines found in cscope?



PS: Actually I am using global instead of cscope but I guess on VIM side it should not matter.










share|improve this question









New contributor




Osada Lakmal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 3





    I'm not sure what your PS means. However I think you're looking for :cclose :h :cclose?

    – statox
    6 hours ago











  • Corrected and added a link to clarify. Sorry about that!

    – Osada Lakmal
    5 hours ago











  • Ok I get it now, but my solution still stands: is :cclose the command you're looking for?

    – statox
    4 hours ago













2












2








2








I use gutentags and gutentags-plus for generating and managing tag files. When I use the key combinations setup by them ( cX usually ), it opens the relevant lines in a quickfix window and I can use :cnext etc for navigation. But how do I close them quickfix window and go back to the file I was editing after I have gone through the lines found in cscope?



PS: Actually I am using global instead of cscope but I guess on VIM side it should not matter.










share|improve this question









New contributor




Osada Lakmal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I use gutentags and gutentags-plus for generating and managing tag files. When I use the key combinations setup by them ( cX usually ), it opens the relevant lines in a quickfix window and I can use :cnext etc for navigation. But how do I close them quickfix window and go back to the file I was editing after I have gone through the lines found in cscope?



PS: Actually I am using global instead of cscope but I guess on VIM side it should not matter.







quickfix tags cscope global






share|improve this question









New contributor




Osada Lakmal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Osada Lakmal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 5 hours ago







Osada Lakmal













New contributor




Osada Lakmal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 6 hours ago









Osada LakmalOsada Lakmal

1112




1112




New contributor




Osada Lakmal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Osada Lakmal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Osada Lakmal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 3





    I'm not sure what your PS means. However I think you're looking for :cclose :h :cclose?

    – statox
    6 hours ago











  • Corrected and added a link to clarify. Sorry about that!

    – Osada Lakmal
    5 hours ago











  • Ok I get it now, but my solution still stands: is :cclose the command you're looking for?

    – statox
    4 hours ago












  • 3





    I'm not sure what your PS means. However I think you're looking for :cclose :h :cclose?

    – statox
    6 hours ago











  • Corrected and added a link to clarify. Sorry about that!

    – Osada Lakmal
    5 hours ago











  • Ok I get it now, but my solution still stands: is :cclose the command you're looking for?

    – statox
    4 hours ago







3




3





I'm not sure what your PS means. However I think you're looking for :cclose :h :cclose?

– statox
6 hours ago





I'm not sure what your PS means. However I think you're looking for :cclose :h :cclose?

– statox
6 hours ago













Corrected and added a link to clarify. Sorry about that!

– Osada Lakmal
5 hours ago





Corrected and added a link to clarify. Sorry about that!

– Osada Lakmal
5 hours ago













Ok I get it now, but my solution still stands: is :cclose the command you're looking for?

– statox
4 hours ago





Ok I get it now, but my solution still stands: is :cclose the command you're looking for?

– statox
4 hours ago










1 Answer
1






active

oldest

votes


















3














To close the quickfix window, you use :cclose, as @statox mentioned in the comments.



This won't affect which code buffer you're viewing, though. Vim doesn't distinguish between the buffer you were looking at originally and the buffers you navigated to via the quickfix, so to go back you are going to have to use Vim's regular buffer switching commands. If you know the name or number of the original buffer, :b is probably quickest.



If not, you could try mashing Ctrl-O to jump backwards through the jumplist till you reach the right buffer, or you might want to set up some mappings* (or a plugin) for faster buffer navigation.



If you want something automated, how about adding something like following to your .vimrc?



nmap cX mAcX
nnoremap <leader>b :cclose<CR>`A


The first mapping changes the behaviour of cX to first set up an uppercase mark 'A and then call the original mapping. Note that the original cX mapping must already exist when this mapping is created, and that we use the recursive form nmap rather than the usual nnoremap in order that the original mapping will be invoked from our new one.



The second creates a new mapping that closes the quickfix and then returns to the marked position.



* Make sure you read as far down as the EDIT, because it's after that that the juicy details are included.






share|improve this answer

























  • Or faster solution would be to create a new tab with the current buffer so that he can just close the tabpage with the quickfix window altogether and go back to the newly created tagpage. But he has to remember to do <C-w>T every time. Or maybe an autocmd trigger with QuickFixCmdPost etc. to open the quickfix window after creating a new tab? That could also work, right?

    – klaus
    2 hours ago












  • @klaus Not sure if you saw my edit with the new mappings? Your idea is good too, though!

    – Rich
    2 hours ago











  • No, you just edited it after I commented. That mapping makes more sense because of automation. Good stuff!

    – klaus
    2 hours ago











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "599"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Osada Lakmal is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f19738%2fhow-can-i-close-the-quickfix-window-and-go-back-to-the-file-i-was-editing%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














To close the quickfix window, you use :cclose, as @statox mentioned in the comments.



This won't affect which code buffer you're viewing, though. Vim doesn't distinguish between the buffer you were looking at originally and the buffers you navigated to via the quickfix, so to go back you are going to have to use Vim's regular buffer switching commands. If you know the name or number of the original buffer, :b is probably quickest.



If not, you could try mashing Ctrl-O to jump backwards through the jumplist till you reach the right buffer, or you might want to set up some mappings* (or a plugin) for faster buffer navigation.



If you want something automated, how about adding something like following to your .vimrc?



nmap cX mAcX
nnoremap <leader>b :cclose<CR>`A


The first mapping changes the behaviour of cX to first set up an uppercase mark 'A and then call the original mapping. Note that the original cX mapping must already exist when this mapping is created, and that we use the recursive form nmap rather than the usual nnoremap in order that the original mapping will be invoked from our new one.



The second creates a new mapping that closes the quickfix and then returns to the marked position.



* Make sure you read as far down as the EDIT, because it's after that that the juicy details are included.






share|improve this answer

























  • Or faster solution would be to create a new tab with the current buffer so that he can just close the tabpage with the quickfix window altogether and go back to the newly created tagpage. But he has to remember to do <C-w>T every time. Or maybe an autocmd trigger with QuickFixCmdPost etc. to open the quickfix window after creating a new tab? That could also work, right?

    – klaus
    2 hours ago












  • @klaus Not sure if you saw my edit with the new mappings? Your idea is good too, though!

    – Rich
    2 hours ago











  • No, you just edited it after I commented. That mapping makes more sense because of automation. Good stuff!

    – klaus
    2 hours ago















3














To close the quickfix window, you use :cclose, as @statox mentioned in the comments.



This won't affect which code buffer you're viewing, though. Vim doesn't distinguish between the buffer you were looking at originally and the buffers you navigated to via the quickfix, so to go back you are going to have to use Vim's regular buffer switching commands. If you know the name or number of the original buffer, :b is probably quickest.



If not, you could try mashing Ctrl-O to jump backwards through the jumplist till you reach the right buffer, or you might want to set up some mappings* (or a plugin) for faster buffer navigation.



If you want something automated, how about adding something like following to your .vimrc?



nmap cX mAcX
nnoremap <leader>b :cclose<CR>`A


The first mapping changes the behaviour of cX to first set up an uppercase mark 'A and then call the original mapping. Note that the original cX mapping must already exist when this mapping is created, and that we use the recursive form nmap rather than the usual nnoremap in order that the original mapping will be invoked from our new one.



The second creates a new mapping that closes the quickfix and then returns to the marked position.



* Make sure you read as far down as the EDIT, because it's after that that the juicy details are included.






share|improve this answer

























  • Or faster solution would be to create a new tab with the current buffer so that he can just close the tabpage with the quickfix window altogether and go back to the newly created tagpage. But he has to remember to do <C-w>T every time. Or maybe an autocmd trigger with QuickFixCmdPost etc. to open the quickfix window after creating a new tab? That could also work, right?

    – klaus
    2 hours ago












  • @klaus Not sure if you saw my edit with the new mappings? Your idea is good too, though!

    – Rich
    2 hours ago











  • No, you just edited it after I commented. That mapping makes more sense because of automation. Good stuff!

    – klaus
    2 hours ago













3












3








3







To close the quickfix window, you use :cclose, as @statox mentioned in the comments.



This won't affect which code buffer you're viewing, though. Vim doesn't distinguish between the buffer you were looking at originally and the buffers you navigated to via the quickfix, so to go back you are going to have to use Vim's regular buffer switching commands. If you know the name or number of the original buffer, :b is probably quickest.



If not, you could try mashing Ctrl-O to jump backwards through the jumplist till you reach the right buffer, or you might want to set up some mappings* (or a plugin) for faster buffer navigation.



If you want something automated, how about adding something like following to your .vimrc?



nmap cX mAcX
nnoremap <leader>b :cclose<CR>`A


The first mapping changes the behaviour of cX to first set up an uppercase mark 'A and then call the original mapping. Note that the original cX mapping must already exist when this mapping is created, and that we use the recursive form nmap rather than the usual nnoremap in order that the original mapping will be invoked from our new one.



The second creates a new mapping that closes the quickfix and then returns to the marked position.



* Make sure you read as far down as the EDIT, because it's after that that the juicy details are included.






share|improve this answer















To close the quickfix window, you use :cclose, as @statox mentioned in the comments.



This won't affect which code buffer you're viewing, though. Vim doesn't distinguish between the buffer you were looking at originally and the buffers you navigated to via the quickfix, so to go back you are going to have to use Vim's regular buffer switching commands. If you know the name or number of the original buffer, :b is probably quickest.



If not, you could try mashing Ctrl-O to jump backwards through the jumplist till you reach the right buffer, or you might want to set up some mappings* (or a plugin) for faster buffer navigation.



If you want something automated, how about adding something like following to your .vimrc?



nmap cX mAcX
nnoremap <leader>b :cclose<CR>`A


The first mapping changes the behaviour of cX to first set up an uppercase mark 'A and then call the original mapping. Note that the original cX mapping must already exist when this mapping is created, and that we use the recursive form nmap rather than the usual nnoremap in order that the original mapping will be invoked from our new one.



The second creates a new mapping that closes the quickfix and then returns to the marked position.



* Make sure you read as far down as the EDIT, because it's after that that the juicy details are included.







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 2 hours ago









RichRich

15.5k12066




15.5k12066












  • Or faster solution would be to create a new tab with the current buffer so that he can just close the tabpage with the quickfix window altogether and go back to the newly created tagpage. But he has to remember to do <C-w>T every time. Or maybe an autocmd trigger with QuickFixCmdPost etc. to open the quickfix window after creating a new tab? That could also work, right?

    – klaus
    2 hours ago












  • @klaus Not sure if you saw my edit with the new mappings? Your idea is good too, though!

    – Rich
    2 hours ago











  • No, you just edited it after I commented. That mapping makes more sense because of automation. Good stuff!

    – klaus
    2 hours ago

















  • Or faster solution would be to create a new tab with the current buffer so that he can just close the tabpage with the quickfix window altogether and go back to the newly created tagpage. But he has to remember to do <C-w>T every time. Or maybe an autocmd trigger with QuickFixCmdPost etc. to open the quickfix window after creating a new tab? That could also work, right?

    – klaus
    2 hours ago












  • @klaus Not sure if you saw my edit with the new mappings? Your idea is good too, though!

    – Rich
    2 hours ago











  • No, you just edited it after I commented. That mapping makes more sense because of automation. Good stuff!

    – klaus
    2 hours ago
















Or faster solution would be to create a new tab with the current buffer so that he can just close the tabpage with the quickfix window altogether and go back to the newly created tagpage. But he has to remember to do <C-w>T every time. Or maybe an autocmd trigger with QuickFixCmdPost etc. to open the quickfix window after creating a new tab? That could also work, right?

– klaus
2 hours ago






Or faster solution would be to create a new tab with the current buffer so that he can just close the tabpage with the quickfix window altogether and go back to the newly created tagpage. But he has to remember to do <C-w>T every time. Or maybe an autocmd trigger with QuickFixCmdPost etc. to open the quickfix window after creating a new tab? That could also work, right?

– klaus
2 hours ago














@klaus Not sure if you saw my edit with the new mappings? Your idea is good too, though!

– Rich
2 hours ago





@klaus Not sure if you saw my edit with the new mappings? Your idea is good too, though!

– Rich
2 hours ago













No, you just edited it after I commented. That mapping makes more sense because of automation. Good stuff!

– klaus
2 hours ago





No, you just edited it after I commented. That mapping makes more sense because of automation. Good stuff!

– klaus
2 hours ago










Osada Lakmal is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Osada Lakmal is a new contributor. Be nice, and check out our Code of Conduct.












Osada Lakmal is a new contributor. Be nice, and check out our Code of Conduct.











Osada Lakmal is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Vi and Vim Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f19738%2fhow-can-i-close-the-quickfix-window-and-go-back-to-the-file-i-was-editing%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Oświęcim Innehåll Historia | Källor | Externa länkar | Navigeringsmeny50°2′18″N 19°13′17″Ö / 50.03833°N 19.22139°Ö / 50.03833; 19.2213950°2′18″N 19°13′17″Ö / 50.03833°N 19.22139°Ö / 50.03833; 19.221393089658Nordisk familjebok, AuschwitzInsidan tro och existensJewish Community i OświęcimAuschwitz Jewish Center: MuseumAuschwitz Jewish Center

Valle di Casies Indice Geografia fisica | Origini del nome | Storia | Società | Amministrazione | Sport | Note | Bibliografia | Voci correlate | Altri progetti | Collegamenti esterni | Menu di navigazione46°46′N 12°11′E / 46.766667°N 12.183333°E46.766667; 12.183333 (Valle di Casies)46°46′N 12°11′E / 46.766667°N 12.183333°E46.766667; 12.183333 (Valle di Casies)Sito istituzionaleAstat Censimento della popolazione 2011 - Determinazione della consistenza dei tre gruppi linguistici della Provincia Autonoma di Bolzano-Alto Adige - giugno 2012Numeri e fattiValle di CasiesDato IstatTabella dei gradi/giorno dei Comuni italiani raggruppati per Regione e Provincia26 agosto 1993, n. 412Heraldry of the World: GsiesStatistiche I.StatValCasies.comWikimedia CommonsWikimedia CommonsValle di CasiesSito ufficialeValle di CasiesMM14870458910042978-6

Typsetting diagram chases (with TikZ?) Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to define the default vertical distance between nodes?Draw edge on arcNumerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themHow to place nodes in an absolute coordinate system in tikzCommutative diagram with curve connecting between nodesTikz with standalone: pinning tikz coordinates to page cmDrawing a Decision Diagram with Tikz and layout manager