summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSam Tay <sam.chong.tay@gmail.com>2020-06-22 21:59:20 -0700
committerSam Tay <sam.chong.tay@gmail.com>2020-06-23 19:22:49 -0700
commit0c4bafb3eb996b0e70707a32c11e8a1a2f9572ba (patch)
tree6b90e68fd3db4e8b8c6334882ec2872f12402109 /test
parentfdc4092d0276259c47a14cf2cc52c933fec633e4 (diff)
Add duckduckgo search engine
Diffstat (limited to 'test')
-rw-r--r--test/bad-user-agent.html1
-rw-r--r--test/exit-vim.html1745
2 files changed, 1746 insertions, 0 deletions
diff --git a/test/bad-user-agent.html b/test/bad-user-agent.html
new file mode 100644
index 0000000..89c4aaa
--- /dev/null
+++ b/test/bad-user-agent.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html lang="en_US" class="no-js has-zcm no-theme "><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><title>(site:stackoverflow.com) how do I exit nvim at DuckDuckGo</title><link rel="stylesheet" href="/s1905.css" type="text/css"><link rel="stylesheet" href="/r1905.css" type="text/css"><meta name="robots" content="noindex,nofollow"><meta name="referrer" content="origin"><meta name="apple-mobile-web-app-title" content="(site:stackoverflow.com) how do I exit nvim"><link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /><link id="icon60" rel="apple-touch-icon" href="/assets/icons/meta/DDG-iOS-icon_60x60.png?v=2"/><link id="icon76" rel="apple-touch-icon" sizes="76x76" href="/assets/icons/meta/DDG-iOS-icon_76x76.png?v=2"/><link id="icon120" rel="apple-touch-icon" sizes="120x120" href="/assets/icons/meta/DDG-iOS-icon_120x120.png?v=2"/><link id="icon152" rel="apple-touch-icon" sizes="152x152" href="/assets/icons/meta/DDG-iOS-icon_152x152.png?v=2"/><link rel="image_src" href="/assets/icons/meta/DDG-icon_256x256.png"/><script type="text/javascript">var ct,fd,fq,it,iqa,iqm,iqs,iqp,iqq,qw,dl,ra,rv,rad,r1hc,r1c,r2c,r3c,rfq,rq,rds,rs,rt,rl,y,y1,ti,tig,iqd,locale,settings_js_version='s2475.js',is_twitter='',rpl=1;fq=0;fd=1;it=0;iqa=0;iqbi=0;iqm=0;iqs=1;iqp=0;iqq=0;qw=6;dl='en';ct='US';iqd=0;r1hc=0;r1c=0;r3c=0;rq='(site%3Astackoverflow.com)%20how%20do%20I%20exit%20nvim';rqd="(site:stackoverflow.com) how do I exit nvim";rfq=0;rt='';ra='';rv='';rad='';rds=30;rs=0;spice_version='2000';spice_paths='{}';locale='en_US';settings_url_params={"kh":"-1","kz":"-1"};rl='us-en';rlo=0;df='';ds='';sfq='(how%20do%20I%20exit%20nvim%20SITE%3Astackoverflow.com)';iar='';vqd='3-88941791805106005388209340599888603291-149382371238630188221044527126906250971';safe_ddg=0;show_covid=0;</script><meta name="viewport" content="width=device-width, initial-scale=1" /><meta name="HandheldFriendly" content="true" /><meta name="apple-mobile-web-app-capable" content="no" /></head><body class="body--serp"><input id="state_hidden" name="state_hidden" type="text" size="1"><span class="hide">Ignore this box please.</span><div id="spacing_hidden_wrapper"><div id="spacing_hidden"></div></div><script type="text/javascript" src="/lib/l118.js"></script><script type="text/javascript" src="/locale/en_US/duckduckgo14.js"></script><script type="text/javascript" src="/util/u459.js"></script><script type="text/javascript" src="/d2814.js"></script><div class="site-wrapper js-site-wrapper"><div class="welcome-wrap js-welcome-wrap"></div><div id="header_wrapper" class="header-wrap js-header-wrap"><div id="header" class="header cw"><div class="header__search-wrap"><a tabindex="-1" href="/?kz=%2D1&kh=%2D1" class="header__logo-wrap js-header-logo"><span class="header__logo js-logo-ddg">DuckDuckGo</span></a><div class="header__content header__search"><form id="search_form" class="search--adv search--header js-search-form" name="x" action="/"><input type="text" name="q" tabindex="1" autocomplete="off" id="search_form_input" class="search__input search__input--adv js-search-input" value="(site:stackoverflow.com) how do I exit nvim"><input id="search_form_input_clear" class="search__clear js-search-clear" type="button" tabindex="3" value="X"/><input id="search_button" class="search__button js-search-button" type="submit" tabindex="2" value="S" /><a id="search_dropdown" class="search__dropdown" href="javascript:;" tabindex="4"></a><div id="search_elements_hidden" class="search__hidden js-search-hidden"></div></form></div></div><div id="duckbar" class="zcm-wrap zcm-wrap--header is-noscript-hidden"></div></div><div class="header--aside js-header-aside"></div></div><div id="zero_click_wrapper" class="zci-wrap"></div><div id="vertical_wrapper" class="verticals"></div><div id="web_content_wrapper" class="content-wrap "><div class="serp__top-right js-serp-top-right"></div><div class="serp__bottom-right js-serp-bottom-right"><div class="js-feedback-btn-wrap"></div></div><div class="cw"><div id="links_wrapper" class="serp__results js-serp-results"><div class="results--main"><div class="search-filters-wrap"><div class="js-search-filters search-filters"></div></div><noscript><meta http-equiv="refresh" content="0;URL=/html?q=(site%3Astackoverflow.com)%20how%20do%20I%20exit%20nvim"><link href="/css/noscript.css" rel="stylesheet" type="text/css"><div class="msg msg--noscript"><p class="msg-title--noscript">You are being redirected to the non-JavaScript site.</p>Click <a href="/html/?q=(site%3Astackoverflow.com)%20how%20do%20I%20exit%20nvim">here</a> if it doesn't happen automatically.</div></noscript><div id="message" class="results--message"></div><div class="ia-modules js-ia-modules"></div><div id="ads" class="results--ads results--ads--main is-invisible js-results-ads"></div><div id="links" class="results is-invisible js-results"></div></div><div class="results--sidebar js-results-sidebar"><div class="sidebar-modules js-sidebar-modules"></div><div class="is-invisible js-sidebar-ads"></div></div></div></div></div><div id="bottom_spacing2"> </div></div><script type="text/javascript"></script><script type="text/JavaScript">function nrji() {nrj('/t.js?q=(site%3Astackoverflow.com)%20how%20do%20I%20exit%20nvim&l=us-en&s=0&dl=en&ct=US&ss_mkt=us&p_ent=&ex=-1&kz=1');nrj('/d.js?q=(site%3Astackoverflow.com)%20how%20do%20I%20exit%20nvim&l=us-en&s=0&dl=en&ct=US&ss_mkt=us&vqd=3-88941791805106005388209340599888603291-149382371238630188221044527126906250971&p_ent=&ex=-1&kz=1&sp=1');;};DDG.ready(nrji, 1);</script><script src="/g2359.js"></script><script type="text/javascript">DDG.page = new DDG.Pages.SERP({ showSafeSearch: 0, instantAnswerAds: false });</script><div id="z2"> </div><div id="z"></div></body></html>
diff --git a/test/exit-vim.html b/test/exit-vim.html
new file mode 100644
index 0000000..a4f7a4a
--- /dev/null
+++ b/test/exit-vim.html
@@ -0,0 +1,1745 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<!--[if IE 6]><html class="ie6" xmlns="http://www.w3.org/1999/xhtml"><![endif]-->
+<!--[if IE 7]><html class="lt-ie8 lt-ie9" xmlns="http://www.w3.org/1999/xhtml"><![endif]-->
+<!--[if IE 8]><html class="lt-ie9" xmlns="http://www.w3.org/1999/xhtml"><![endif]-->
+<!--[if gt IE 8]><!--><html xmlns="http://www.w3.org/1999/xhtml"><!--<![endif]-->
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=3.0, user-scalable=1" />
+ <meta name="referrer" content="origin" />
+ <meta name="HandheldFriendly" content="true" />
+ <meta name="robots" content="noindex, nofollow" />
+ <title>(site:https://stackoverflow.com OR site:https://askubuntu.com) how do I exit nvim at DuckDuckGo</title>
+ <link title="DuckDuckGo (HTML)" type="application/opensearchdescription+xml" rel="search" href="/opensearch_html.xml" />
+ <link href="/favicon.ico" rel="shortcut icon" />
+ <link rel="apple-touch-icon" href="/assets/logo_icon128.v101.png"/>
+ <link rel="image_src" href="/assets/logo_homepage.normal.v101.png"/>
+ <link type="text/css" media="handheld, all" href="/h1905.css" rel="stylesheet" />
+</head>
+
+<body class="body--html">
+ <a name="top" id="top"></a>
+
+ <form action="/html/" method="post">
+ <input type="text" name="state_hidden" id="state_hidden" />
+ </form>
+
+ <div>
+ <div class="site-wrapper-border"></div>
+
+ <div id="header" class="header cw header--html">
+ <a title="DuckDuckGo" href="/html/" class="header__logo-wrap"></a>
+
+
+ <form name="x" class="header__form" action="/html/" method="post">
+
+ <div class="search search--header">
+ <input name="q" autocomplete="off" class="search__input" id="search_form_input_homepage" type="text" value="(site:https://stackoverflow.com OR site:https://askubuntu.com) how do I exit nvim" />
+ <input name="b" id="search_button_homepage" class="search__button search__button--html" value="" title="Search" alt="Search" type="submit" />
+ </div>
+
+
+
+
+
+
+ <input name="kh" value="-1" type="hidden">
+
+
+
+ <div class="frm__select">
+ <select name="kl">
+
+ <option value="" >All Regions</option>
+
+ <option value="ar-es" >Argentina</option>
+
+ <option value="au-en" >Australia</option>
+
+ <option value="at-de" >Austria</option>
+
+ <option value="be-fr" >Belgium (fr)</option>
+
+ <option value="be-nl" >Belgium (nl)</option>
+
+ <option value="br-pt" >Brazil</option>
+
+ <option value="bg-bg" >Bulgaria</option>
+
+ <option value="ca-en" >Canada</option>
+
+ <option value="ca-fr" >Canada (fr)</option>
+
+ <option value="ct-ca" >Catalonia</option>
+
+ <option value="cl-es" >Chile</option>
+
+ <option value="cn-zh" >China</option>
+
+ <option value="co-es" >Colombia</option>
+
+ <option value="hr-hr" >Croatia</option>
+
+ <option value="cz-cs" >Czech Republic</option>
+
+ <option value="dk-da" >Denmark</option>
+
+ <option value="ee-et" >Estonia</option>
+
+ <option value="fi-fi" >Finland</option>
+
+ <option value="fr-fr" >France</option>
+
+ <option value="de-de" >Germany</option>
+
+ <option value="gr-el" >Greece</option>
+
+ <option value="hk-tzh" >Hong Kong</option>
+
+ <option value="hu-hu" >Hungary</option>
+
+ <option value="in-en" >India</option>
+
+ <option value="id-id" >Indonesia</option>
+
+ <option value="id-en" >Indonesia (en)</option>
+
+ <option value="ie-en" >Ireland</option>
+
+ <option value="il-he" >Israel</option>
+
+ <option value="it-it" >Italy</option>
+
+ <option value="jp-jp" >Japan</option>
+
+ <option value="kr-kr" >Korea</option>
+
+ <option value="lv-lv" >Latvia</option>
+
+ <option value="lt-lt" >Lithuania</option>
+
+ <option value="my-ms" >Malaysia</option>
+
+ <option value="my-en" >Malaysia (en)</option>
+
+ <option value="mx-es" >Mexico</option>
+
+ <option value="nl-nl" >Netherlands</option>
+
+ <option value="nz-en" >New Zealand</option>
+
+ <option value="no-no" >Norway</option>
+
+ <option value="pe-es" >Peru</option>
+
+ <option value="ph-en" >Philippines</option>
+
+ <option value="pl-pl" >Poland</option>
+
+ <option value="pt-pt" >Portugal</option>
+
+ <option value="ro-ro" >Romania</option>
+
+ <option value="ru-ru" >Russia</option>
+
+ <option value="xa-ar" >Saudi Arabia</option>
+
+ <option value="sg-en" >Singapore</option>
+
+ <option value="sk-sk" >Slovakia</option>
+
+ <option value="sl-sl" >Slovenia</option>
+
+ <option value="za-en" >South Africa</option>
+
+ <option value="es-es" >Spain</option>
+
+ <option value="es-ca" >Spain (ca)</option>
+
+ <option value="se-sv" >Sweden</option>
+
+ <option value="ch-de" >Switzerland (de)</option>
+
+ <option value="ch-fr" >Switzerland (fr)</option>
+
+ <option value="ch-it" >Switzerland (it)</option>
+
+ <option value="tw-tzh" >Taiwan</option>
+
+ <option value="th-th" >Thailand</option>
+
+ <option value="tr-tr" >Turkey</option>
+
+ <option value="us-en" >US (English)</option>
+
+ <option value="us-es" >US (Spanish)</option>
+
+ <option value="uk-en" >United Kingdom</option>
+
+ <option value="vn-vi" >Vietnam</option>
+
+ </select>
+ </div>
+
+ <div class="frm__select frm__select--last">
+ <select class="" name="df">
+
+ <option value="" selected>Any Time</option>
+
+ <option value="d" >Past Day</option>
+
+ <option value="w" >Past Week</option>
+
+ <option value="m" >Past Month</option>
+
+ <option value="y" >Past Year</option>
+
+ </select>
+ </div>
+
+ </form>
+
+ </div>
+
+
+
+
+
+<!-- Web results are present -->
+
+ <div>
+ <div class="serp__results">
+ <div id="links" class="results">
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F11828270%2Fhow%2Ddo%2Di%2Dexit%2Dthe%2Dvim%2Deditor">vi - <b>How</b> <b>do</b> <b>I</b> <b>exit</b> the Vim editor? - Stack Overflow</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F11828270%2Fhow%2Ddo%2Di%2Dexit%2Dthe%2Dvim%2Deditor">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F11828270%2Fhow%2Ddo%2Di%2Dexit%2Dthe%2Dvim%2Deditor">
+ stackoverflow.com/questions/11828270/how-do-i-exit-the-vim-editor
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F11828270%2Fhow%2Ddo%2Di%2Dexit%2Dthe%2Dvim%2Deditor">In order to <b>exit</b> Vim, you can <b>exit</b> while you are in either the ex mode or in the command mode. You cannot <b>exit</b> Vim when you are in input mode. Exiting from ex mode. You need to be sure that you are in the Command mode. To do that, simply press the Esc key. Go to the ex mode by pressing the : key. Use any of the following combinations in ex mode ...</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Faskubuntu.com%2Fquestions%2F24406%2Fhow%2Dto%2Dclose%2Dvim%2Dfrom%2Dthe%2Dcommand%2Dline"><b>How</b> to close vim from the command line? - Ask Ubuntu</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Faskubuntu.com%2Fquestions%2F24406%2Fhow%2Dto%2Dclose%2Dvim%2Dfrom%2Dthe%2Dcommand%2Dline">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/askubuntu.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Faskubuntu.com%2Fquestions%2F24406%2Fhow%2Dto%2Dclose%2Dvim%2Dfrom%2Dthe%2Dcommand%2Dline">
+ askubuntu.com/questions/24406/how-to-close-vim-from-the-command-line
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Faskubuntu.com%2Fquestions%2F24406%2Fhow%2Dto%2Dclose%2Dvim%2Dfrom%2Dthe%2Dcommand%2Dline">As alluded to by Benoit, this answer confusingly uses the term &quot;command mode&quot; to refer to what the vim documentation calls &quot;normal mode&quot;. The vim docs consider command mode to be what you enter by pressing : in normal mode. If you hit esc, you return to normal mode.-1 for being misleading to people trying to learn the standard terminology (and to consequently be able to make sense of the help ...</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F9171356%2Fhow%2Ddo%2Di%2Dexit%2Dfrom%2Dthe%2Dtext%2Dwindow%2Din%2Dgit">vim - <b>How</b> <b>do</b> <b>I</b> <b>exit</b> from the text window in Git? - Stack ...</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F9171356%2Fhow%2Ddo%2Di%2Dexit%2Dfrom%2Dthe%2Dtext%2Dwindow%2Din%2Dgit">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F9171356%2Fhow%2Ddo%2Di%2Dexit%2Dfrom%2Dthe%2Dtext%2Dwindow%2Din%2Dgit">
+ stackoverflow.com/questions/9171356/how-do-i-exit-from-the-text-window-in-git
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F9171356%2Fhow%2Ddo%2Di%2Dexit%2Dfrom%2Dthe%2Dtext%2Dwindow%2Din%2Dgit">Since you are learning Git, know that this has little to do with git but with the text editor configured for use. In vim, you can press i to start entering text and save by pressing esc and :wq and enter, this will commit with the message you typed.In your current state, to just come out without committing, you can do :q instead of the :wq as mentioned above.</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F47315349%2Fhow%2Dto%2Dexit%2Dthe%2Dvim%2Deditor%2Dwhen%2Dq%2Dor%2Dx%2Ddoesnt%2Dwork">vi - <b>How</b> to <b>exit</b> the Vim editor when :q or :x doesn&#x27;t work ...</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F47315349%2Fhow%2Dto%2Dexit%2Dthe%2Dvim%2Deditor%2Dwhen%2Dq%2Dor%2Dx%2Ddoesnt%2Dwork">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F47315349%2Fhow%2Dto%2Dexit%2Dthe%2Dvim%2Deditor%2Dwhen%2Dq%2Dor%2Dx%2Ddoesnt%2Dwork">
+ stackoverflow.com/questions/47315349/how-to-exit-the-vim-editor-when-q-or-x-doesnt-work
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F47315349%2Fhow%2Dto%2Dexit%2Dthe%2Dvim%2Deditor%2Dwhen%2Dq%2Dor%2Dx%2Ddoesnt%2Dwork">:q should work, unless the file hasn&#x27;t been saved.:q! will work.:wq will attempt to save and quit, but won&#x27;t quit if it can&#x27;t save.:wq! will attempt to save, and then quit whether or not it can save. E: Credit to @GregoryNisbet for reminding me: if you have multiple files open, there is a series of &#x27;all&#x27; quit commands::qa should quit all buffers (open files, more or less).</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F27439656%2Fhow%2Dto%2Dexit%2Dfrom%2Dvim%2Dy%2Din%2Dconsole">linux - <b>How</b> to <b>exit</b> from &quot;vim -y&quot; in console? - Stack Overflow</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F27439656%2Fhow%2Dto%2Dexit%2Dfrom%2Dvim%2Dy%2Din%2Dconsole">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F27439656%2Fhow%2Dto%2Dexit%2Dfrom%2Dvim%2Dy%2Din%2Dconsole">
+ stackoverflow.com/questions/27439656/how-to-exit-from-vim-y-in-console
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F27439656%2Fhow%2Dto%2Dexit%2Dfrom%2Dvim%2Dy%2Din%2Dconsole">With -y (easy mode), Vim defaults to insert mode, and you cannot permanently <b>exit</b> to normal mode via &lt;Esc&gt;.However, like in default Vim, you can issue a single normal mode command via &lt;C-O&gt;.So to <b>exit</b>, type &lt;C-O&gt;:q!&lt;CR&gt;.. Alternatively, there&#x27;s a special &lt;C-L&gt; mapping for easy mode that returns to normal mode.</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F510325%2Fhow%2Ddo%2Di%2Dclose%2Dall%2Dopen%2Dtabs%2Dat%2Donce">vim - <b>How</b> <b>do</b> <b>I</b> close all open tabs at once? - Stack Overflow</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F510325%2Fhow%2Ddo%2Di%2Dclose%2Dall%2Dopen%2Dtabs%2Dat%2Donce">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F510325%2Fhow%2Ddo%2Di%2Dclose%2Dall%2Dopen%2Dtabs%2Dat%2Donce">
+ stackoverflow.com/questions/510325/how-do-i-close-all-open-tabs-at-once
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F510325%2Fhow%2Ddo%2Di%2Dclose%2Dall%2Dopen%2Dtabs%2Dat%2Donce"><b>Exit</b> Vim, unless there are some buffers which have been changed. (Use :bmod to go to the next modified buffer). When &#x27;autowriteall&#x27; is set all changed buffers will be written, like :wqall. :conf qa:confirm qall. <b>Exit</b> Vim. Bring up a prompt when some buffers have been changed. See :confirm.:qa!:qall! <b>Exit</b> Vim. Any changes to buffers are lost.</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F2703644%2Fhow%2Ddo%2Dyou%2Dexit%2Dvimdiff%2Dmode%2Din%2Dvim%2Dspecifically%2Dfor%2Dfugitive"><b>How</b> <b>do</b> you <b>exit</b> vimdiff mode in vim ... - Stack Overflow</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F2703644%2Fhow%2Ddo%2Dyou%2Dexit%2Dvimdiff%2Dmode%2Din%2Dvim%2Dspecifically%2Dfor%2Dfugitive">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F2703644%2Fhow%2Ddo%2Dyou%2Dexit%2Dvimdiff%2Dmode%2Din%2Dvim%2Dspecifically%2Dfor%2Dfugitive">
+ stackoverflow.com/questions/2703644/how-do-you-exit-vimdiff-mode-in-vim-specifically-for-fugitive
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F2703644%2Fhow%2Ddo%2Dyou%2Dexit%2Dvimdiff%2Dmode%2Din%2Dvim%2Dspecifically%2Dfor%2Dfugitive">@blueyed Yes, it won&#x27;t. I don&#x27;t use fugitive, but diff mode created with VCSVimDiff (VCSCommand plugin) is replaced with non-diff mode (that was active before VCSVimDiff was run) if you run :bw` on the second buffer.It is very convenient, but it is VCSCommand plugin&#x27;s own feature, not something that vim provides out of the box.</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13239368%2Fgit%2Dhow%2Dto%2Dclose%2Dcommit%2Deditor">command line - Git - <b>How</b> to close commit editor? - Stack ...</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13239368%2Fgit%2Dhow%2Dto%2Dclose%2Dcommit%2Deditor">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13239368%2Fgit%2Dhow%2Dto%2Dclose%2Dcommit%2Deditor">
+ stackoverflow.com/questions/13239368/git-how-to-close-commit-editor
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13239368%2Fgit%2Dhow%2Dto%2Dclose%2Dcommit%2Deditor">On Windows GIT Bash Ctrl+X would do nothing and found out it works quite like vi/vim. Press i to enter inline insert mode. Type the description at the very top, press esc to <b>exit</b> insert mode, then type :x! (now the cursor is at the bottom) and hit enter to save and <b>exit</b>. If typing :q! instead, will <b>exit</b> the editor without saving (and commit ...</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13178874%2Fhow%2Ddo%2Di%2Dswitch%2Dbetween%2Dcommand%2Dand%2Dinsert%2Dmode%2Din%2Dvim"><b>How</b> <b>do</b> <b>I</b> switch between command and insert mode in Vim ...</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13178874%2Fhow%2Ddo%2Di%2Dswitch%2Dbetween%2Dcommand%2Dand%2Dinsert%2Dmode%2Din%2Dvim">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13178874%2Fhow%2Ddo%2Di%2Dswitch%2Dbetween%2Dcommand%2Dand%2Dinsert%2Dmode%2Din%2Dvim">
+ stackoverflow.com/questions/13178874/how-do-i-switch-between-command-and-insert-mode-in-vim
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13178874%2Fhow%2Ddo%2Di%2Dswitch%2Dbetween%2Dcommand%2Dand%2Dinsert%2Dmode%2Din%2Dvim">For example, I wasnt able to <b>exit</b> fullscreen video on youtube using Esc, but I lived with that for a few months until I had experienced the same problem with vim. I found this solution. If you are lazy enough to follow external link, switching off Siri and killing the process in Activity Monitor helped.</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3136648%2Fhow%2Ddo%2Di%2Dexit%2Dvim%2Dwhen%2Ddoing%2Da%2Dmercurial%2Dcommit%2Dat%2Dthe%2Dcommand%2Dline"><b>How</b> <b>do</b> <b>I</b> <b>exit</b> Vim when doing a Mercurial ... - Stack Overflow</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3136648%2Fhow%2Ddo%2Di%2Dexit%2Dvim%2Dwhen%2Ddoing%2Da%2Dmercurial%2Dcommit%2Dat%2Dthe%2Dcommand%2Dline">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3136648%2Fhow%2Ddo%2Di%2Dexit%2Dvim%2Dwhen%2Ddoing%2Da%2Dmercurial%2Dcommit%2Dat%2Dthe%2Dcommand%2Dline">
+ stackoverflow.com/questions/3136648/how-do-i-exit-vim-when-doing-a-mercurial-commit-at-the-command-line
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3136648%2Fhow%2Ddo%2Di%2Dexit%2Dvim%2Dwhen%2Ddoing%2Da%2Dmercurial%2Dcommit%2Dat%2Dthe%2Dcommand%2Dline">The top response is right. For those of you who are like me and need a little bit more details in the steps: If it&#x27;s showing --Insert-- and you can&#x27;t figure out <b>how</b> to get out of it, first hit Esc once, then type :w to save, :q to quit without saving, :wq to do both, then hit Enter. I had to do :wq to get completely out of the file and return to the command line.</a>
+
+
+ <div style="clear: both"></div>
+ </div>
+
+ </div>
+
+
+
+
+
+
+
+
+ <div class="result results_links results_links_deep web-result ">
+
+
+ <div class="links_main links_deep result__body"> <!-- This is the visible part -->
+
+ <h2 class="result__title">
+
+ <a rel="nofollow" class="result__a" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F60923690%2Fhow%2Dto%2Dsave%2Dexit%2Dnvim%2Din%2Dgit%2Dbash%2Dcommit">vim - <b>How</b> to save <b>exit</b> <b>nvim</b> in git bash commit - Stack ...</a>
+
+ </h2>
+
+
+
+ <div class="result__extras">
+ <div class="result__extras__url">
+ <span class="result__icon">
+
+ <a rel="nofollow" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F60923690%2Fhow%2Dto%2Dsave%2Dexit%2Dnvim%2Din%2Dgit%2Dbash%2Dcommit">
+ <img class="result__icon__img" width="16" height="16" alt=""
+ src="//icons.duckduckgo.com/ip2/stackoverflow.com.ico" name="i15" />
+ </a>
+
+ </span>
+
+ <a class="result__url" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F60923690%2Fhow%2Dto%2Dsave%2Dexit%2Dnvim%2Din%2Dgit%2Dbash%2Dcommit">
+ stackoverflow.com/questions/60923690/how-to-save-exit-nvim-in-git-bash-commit
+ </a>
+
+
+
+ </div>
+ </div>
+
+
+ <a class="result__snippet" href="/l/?kh=-1&amp;uddg=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F60923690%2Fhow%2Dto%2Dsave%2Dexit%2Dnvim%2Din%2Dgit%2Dbash%2Dcommit">Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more . <b>How</b> to save <b>exit</b> <b>nvim</b> in git bash commit. Ask Question Asked 2 months ago. Active 2 months ago. Viewed 48 times 3. 1. I&#x27;m using git bash on Win 10 and <b>nvim</b> as the editor. ...</a>
+
+