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

Why do distances seem to matter in the Foundation world?

Why must Chinese maps be obfuscated?

What *exactly* is electrical current, voltage, and resistance?

Double-nominative constructions and “von”

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?

"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?

How to have a sharp product image?

finding a tangent line to a parabola

How does the mezzoloth's teleportation work?

Which big number is bigger?

My bank got bought out, am I now going to have to start filing tax returns in a different state?

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

Putting Ant-Man on house arrest

Co-worker works way more than he should

Older movie/show about humans on derelict alien warship which refuels by passing through a star

Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?

Is Electric Central Heating worth it if using Solar Panels?

Air bladders in bat-like skin wings for better lift?

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

What makes accurate emulation of old systems a difficult task?

Bayes factor vs P value

How do I reattach a shelf to the wall when it ripped out of the wall?

Check if a string is entirely made of the same substring

Is this homebrew arcane communication device abusable?



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
    5 hours ago











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

    – Osada Lakmal
    4 hours ago











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

    – statox
    3 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
    5 hours ago











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

    – Osada Lakmal
    4 hours ago











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

    – statox
    3 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 4 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 5 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
    5 hours ago











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

    – Osada Lakmal
    4 hours ago











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

    – statox
    3 hours ago












  • 3





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

    – statox
    5 hours ago











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

    – Osada Lakmal
    4 hours ago











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

    – statox
    3 hours ago







3




3





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

– statox
5 hours ago





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

– statox
5 hours ago













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

– Osada Lakmal
4 hours ago





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

– Osada Lakmal
4 hours ago













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

– statox
3 hours ago





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

– statox
3 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
    1 hour ago












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

    – Rich
    1 hour ago











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

    – klaus
    1 hour 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
    1 hour ago












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

    – Rich
    1 hour ago











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

    – klaus
    1 hour 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
    1 hour ago












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

    – Rich
    1 hour ago











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

    – klaus
    1 hour 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 1 hour ago

























answered 1 hour 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
    1 hour ago












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

    – Rich
    1 hour ago











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

    – klaus
    1 hour 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
    1 hour ago












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

    – Rich
    1 hour ago











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

    – klaus
    1 hour 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
1 hour 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
1 hour ago














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

– Rich
1 hour ago





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

– Rich
1 hour ago













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

– klaus
1 hour ago





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

– klaus
1 hour 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

Log på Navigationsmenu

Creating second map without labels using QGIS?How to lock map labels for inset map in Print Composer?How to Force the Showing of Labels of a Vector File in QGISQGIS Valmiera, Labels only show for part of polygonsRemoving duplicate point labels in QGISLabeling every feature using QGIS?Show labels for point features outside map canvasAbbreviate Road Labels in QGIS only when requiredExporting map from composer in QGIS - text labels have moved in output?How to make sure labels in qgis turn up in layout map?Writing label expression with ArcMap and If then Statement?

Nuuk Indholdsfortegnelse Etyomologi | Historie | Geografi | Transport og infrastruktur | Politik og administration | Uddannelsesinstitutioner | Kultur | Venskabsbyer | Noter | Eksterne henvisninger | Se også | Navigationsmenuwww.sermersooq.gl64°10′N 51°45′V / 64.167°N 51.750°V / 64.167; -51.75064°10′N 51°45′V / 64.167°N 51.750°V / 64.167; -51.750DMI - KlimanormalerSalmonsen, s. 850Grønlands Naturinstitut undersøger rensdyr i Akia og Maniitsoq foråret 2008Grønlands NaturinstitutNy vej til Qinngorput indviet i dagAntallet af biler i Nuuk må begrænsesNy taxacentral mødt med demonstrationKøreplan. Rute 1, 2 og 3SnescootersporNuukNord er for storSkoler i Kommuneqarfik SermersooqAtuarfik Samuel KleinschmidtKangillinguit AtuarfiatNuussuup AtuarfiaNuuk Internationale FriskoleIlinniarfissuaq, Grønlands SeminariumLedelseÅrsberetning for 2008Kunst og arkitekturÅrsberetning for 2008Julie om naturenNuuk KunstmuseumSilamiutGrønlands Nationalmuseum og ArkivStatistisk ÅrbogGrønlands LandsbibliotekStore koncerter på stribeVandhund nummer 1.000.000Kommuneqarfik Sermersooq – MalikForsidenVenskabsbyerLyngby-Taarbæk i GrønlandArctic Business NetworkWinter Cities 2008 i NuukDagligt opdaterede satellitbilleder fra NuukområdetKommuneqarfik Sermersooqs hjemmesideTurist i NuukGrønlands Statistiks databankGrønlands Hjemmestyres valgresultaterrrWorldCat124325457671310-5