{
    "url": "https://delaparra-services.nl/knowledge-hub/wq-write-quit",
    "locale": "en",
    "title": ":wq (write & quit): Knowledge hub | DeLaParra Services",
    "description": "Vim: save the file and close the editor. The legendary \"how do I exit Vim\" answer.",
    "alternates": {
        "en": "https://delaparra-services.nl/knowledge-hub/wq-write-quit",
        "nl": "https://delaparra-services.nl/nl/kennisbank/wq-write-quit"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.csv",
        "md": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.md",
        "json": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.json",
        "zip": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.zip",
        "pdf": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.csv",
            "encodingFormat": "text/csv",
            "name": "wq-write-quit.csv"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.json",
            "encodingFormat": "application/json",
            "name": "wq-write-quit.json"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.md",
            "encodingFormat": "text/markdown",
            "name": "wq-write-quit.md"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.pdf",
            "encodingFormat": "application/pdf",
            "name": "wq-write-quit.pdf"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.zip",
            "encodingFormat": "application/zip",
            "name": "wq-write-quit.zip"
        }
    ],
    "markdown": "1. [Home](<https://delaparra-services.nl/>) \n1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) \n1. [:wq (write & quit)](<https://delaparra-services.nl/knowledge-hub/wq-write-quit>)\n\n  \n\nCategory: Keyboard shortcuts \n\n# :wq (write & quit)\n\n  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    \n\n## What is :wq (write & quit)?\n\n \n\n:wq (write & quit): Vim: save the file and close the editor. The legendary \"how do I exit Vim\" answer. ` :wq ` is the Vim command to write the file and quit. You press Escape to make sure you are in normal mode, type ` :wq `, and press Enter. ` :q! ` quits without saving, and ` :x ` saves only when something changed.\n\n \n\nDefinition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)\n\n \n\n## Frequently asked questions about :wq (write & quit)\n\n  \n\n### How is :wq (write & quit) used in practice?\n\n \n\nMost developers meet Vim by accident. Git opens it for a commit message or during a rebase, and suddenly the keyboard does not behave as expected. Knowing these three commands gets you out safely.\n\n    \n\n### What should you keep in mind with :wq (write & quit)?\n\n \n\nIf you would rather use another editor, tell Git so. ` git config --global core.editor \"code --wait\" ` makes Git open VS Code and wait until you close the tab. Setting the ` EDITOR ` variable in your shell does the same for most other tools. That said, basic Vim is worth an hour of practice, because it is installed on nearly every server you will ever log into.\n\n \n\n## At a glance\n\n   CategoryKeyboard shortcuts Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026\n\n \n\n## More Keyboard shortcuts terms\n\n \n\n- [/search](<https://delaparra-services.nl/knowledge-hub/search>) \n- [Add Cursor Above / Below](<https://delaparra-services.nl/knowledge-hub/add-cursor-above-below>) \n- [Add Cursor at Click](<https://delaparra-services.nl/knowledge-hub/add-cursor-at-click>) \n- [Autocomplete](<https://delaparra-services.nl/knowledge-hub/autocomplete>) \n- [Cancel / Interrupt (SIGINT)](<https://delaparra-services.nl/knowledge-hub/cancel-interrupt-sigint>) \n- [ciw (change inner word)](<https://delaparra-services.nl/knowledge-hub/ciw-change-inner-word>)\n\n \n\n[All terms starting with a number or symbol](<https://delaparra-services.nl/knowledge-hub#letter-other>)\n\n \n\n## Skills\n\n \n\n- ### Editor shortcuts (VS Code / Cursor and Vim)\n\n \n\nUse when a user asks how to do something faster in VS Code (or Cursor) or Vim, asks what a keyboard shortcut does (e.g. Ctrl+D, Ctrl+Shift+P, F12, gg, dd, yy, ciw, :wq), wants to customise keybindings, or is stuck in Vim. Gives the correct shortcut for their operating system and can write keybindings.json entries.\n\n [View skill](<https://delaparra-services.nl/skills/editor-shortcuts>) [Download zip](<https://delaparra-services.nl/skills/editor-shortcuts/download>)\n\n \n\n## Manuals\n\n \n\n- [Keyboard shortcuts in VS Code and the terminal](<https://delaparra-services.nl/manuals/sneltoetsen-in-vs-code>) \n- [Installing Visual Studio Code](<https://delaparra-services.nl/manuals/visual-studio-code-installeren>)\n\n \n\n## Need any help?\n\n \n\nStuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.\n\n  [Get in touch](<https://delaparra-services.nl/availability>)\n\n[HTML version](https://delaparra-services.nl/knowledge-hub/wq-write-quit)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "FAQPage",
                "@id": "https://delaparra-services.nl/knowledge-hub/wq-write-quit#webpage",
                "url": "https://delaparra-services.nl/knowledge-hub/wq-write-quit",
                "name": ":wq (write & quit): Knowledge hub | DeLaParra Services",
                "description": "Vim: save the file and close the editor. The legendary \"how do I exit Vim\" answer.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@type": "DefinedTerm",
                    "@id": "https://delaparra-services.nl/knowledge-hub/wq-write-quit#term",
                    "name": ":wq (write & quit)",
                    "description": "Vim: save the file and close the editor. The legendary \"how do I exit Vim\" answer.",
                    "termCode": "wq-write-quit",
                    "url": "https://delaparra-services.nl/knowledge-hub/wq-write-quit",
                    "inLanguage": "en",
                    "keywords": "Keyboard shortcuts",
                    "dateModified": "2026-11-25T17:46:23+00:00",
                    "inDefinedTermSet": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#terms"
                    },
                    "isPartOf": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#dataset"
                    },
                    "subjectOf": [
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/wq-write-quit#webpage"
                        },
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/wq-write-quit#dataset"
                        }
                    ]
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/wq-write-quit#breadcrumb"
                },
                "mainEntity": [
                    {
                        "@type": "Question",
                        "name": "What is :wq (write & quit)?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "Vim: save the file and close the editor. The legendary \"how do I exit Vim\" answer. :wq is the Vim command to write the file and quit. You press Escape to make sure you are in normal mode, type :wq, and press Enter. :q! quits without saving, and :x saves only when something changed."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "How is :wq (write & quit) used in practice?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "Most developers meet Vim by accident. Git opens it for a commit message or during a rebase, and suddenly the keyboard does not behave as expected. Knowing these three commands gets you out safely."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What should you keep in mind with :wq (write & quit)?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "If you would rather use another editor, tell Git so. git config --global core.editor \"code --wait\" makes Git open VS Code and wait until you close the tab. Setting the EDITOR variable in your shell does the same for most other tools. That said, basic Vim is worth an hour of practice, because it is installed on nearly every server you will ever log into."
                        }
                    }
                ],
                "author": {
                    "@id": "https://delaparra-services.nl/#person"
                },
                "mentions": [
                    {
                        "@id": "https://delaparra-services.nl/skills/editor-shortcuts#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/sneltoetsen-in-vs-code#article"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/visual-studio-code-installeren#article"
                    }
                ]
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/knowledge-hub/wq-write-quit#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Knowledge hub",
                        "item": "https://delaparra-services.nl/knowledge-hub"
                    },
                    {
                        "@type": "ListItem",
                        "position": 3,
                        "name": ":wq (write & quit)"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/knowledge-hub/wq-write-quit#dataset",
                "name": ":wq (write & quit)",
                "description": "Vim: save the file and close the editor. The legendary \"how do I exit Vim\" answer.",
                "url": "https://delaparra-services.nl/knowledge-hub/wq-write-quit",
                "identifier": "https://delaparra-services.nl/knowledge-hub/wq-write-quit#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/wq-write-quit#term"
                },
                "creator": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://creativecommons.org/licenses/by/4.0/",
                "creditText": "Coders Lingo (https://coderslingo.com/resources/open-dataset/), CC BY 4.0",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "keywords": "Keyboard shortcuts",
                "version": "2026-11-25",
                "dateModified": "2026-11-25T17:46:23+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#dataset",
                    "name": "IT terms from A to Z",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "wq-write-quit.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:23+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "wq-write-quit.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:23+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "wq-write-quit.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:23+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "wq-write-quit.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:23+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "wq-write-quit.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/wq-write-quit.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:23+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    }
                ]
            }
        ]
    }
}