The key difference is the exclamation mark here. :q
will warn you about unsaved changes and will not let you exit. :q!
will not warn you.
See also :help quit
(type that in vim)
Related Contents:
- How do I exit Vim?
- How to duplicate a whole line in Vim?
- How does the vim “write with sudo” trick work?
- What is Vim recording and how can it be disabled?
- Vim: insert the same characters across multiple lines
- How do I list loaded plugins in Vim?
- Why is \r a newline for Vim?
- In Vim, I’d like to go back a word. The opposite of `w`
- Is there any way to view the currently mapped keys in Vim?
- How to go back to lines edited before the last one in Vim?
- In Vim, how do you search for a word boundary character, like the \b in regexp?
- Go to back directory browsing after opening file in vim
- How to add text at the end of each line in Vim?
- Yank entire file
- What are the most-used vim commands/keypresses?
- How can I maximize a split window?
- How can I expand the full path of the current file to pass to a command in Vim?
- How can I make Vim’s `J` and `gq` commands use one space after a period?
- Vim Surround inserts extra space around the word
- How to copy selected lines to clipboard in vim
- Is there a vim command to move the cursor to the parent bracket?
- VIM Super Fast Navigation
- How to delete line(s) below current line in vim?
- When in Vim insert mode, is there a way to add filepath autocompletion?
- How to switch between multiple vim configurations with a command or local vimrc files?
- How do you paste with vim without code being commented?
- Is it possible to visualize the right margin in Vim?
- How do I yank all matching lines into one buffer?
- Vim command: how to select a word under cursor in normal mode
- Returning to previous line with Vim
- Vim: Difficulty setting up ctags. Source in subdirectories don’t see tags file in project root
- How to use NERD Commenter for vim — how to use key
- Fix Vim + Tmux yank/paste on unnamed register
- In vim, is there a way to set “very magic” permanently and globally?
- How to open a file in new tab by default in NERDTree?
- How can I spellcheck in gVim?
- How can I setup my vim-airline or vim-powerline
- Vim, reopen last closed window, that was in split
- how to add c++11 support to syntastic vim plugin?
- In vim, is there a plugin to use % to match the corresponding double quote (“)?
- Why do I need vim in binary mode for ‘noeol’ to work?
- Renaming a file in NERDTREE
- Unsaved buffer warning when switching files/buffers
- How can I make shift+spacebar page up in Vim?
- Is there a way to open multiple files at once from vim?
- Vim: insert text from a file at current cursor position
- Quickest Way to Revert Spaces to TABs in VIM
- Vim: Can you delete a specific line number from another line?
- How to yank from the command line
- Using substitute on a variable