GithubHelp home page GithubHelp logo

confirm_quit.vim's Introduction

This project is considered stable

Ask for confirmation before quitting Vim.

I originally wrote this as an answer on vi Stack Exchange.

The idea is based on the "ConfirmQuit" script.

To use it you'll need to remap keys that "quit" Vim as there's no other way to prevent Vim from quitting. This plugin comes with the following mappings by default:

cnoremap <silent> q<CR>  :call confirm_quit#confirm(0, 'last')<CR>
cnoremap <silent> wq<CR> :call confirm_quit#confirm(1, 'last')<CR>
cnoremap <silent> x<CR>  :call confirm_quit#confirm(1, 'last')<CR>
nnoremap <silent> ZZ     :call confirm_quit#confirm(1, 'last')<CR>

See :help confirm-quit for the full documentation.

confirm_quit.vim's People

Contributors

arp242 avatar thomasnyman avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

confirm_quit.vim's Issues

Confirmation prompt incorrectly shown when empty windows open

If one or more empty windows are open in Vim the confirmation prompt is shown when closing a window even if the when parameter is set to 'last' and Vim is not going to quit.

Steps to reproduce:

  1. Setup confirm_quit plugin with default mappings.
  2. Open Vim instance with two empty windows, e.g. using :split
  3. Close one of the empty windows.

A confirmation prompt is shown even though Vim is not going to quit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.