<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:19:29 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-9140] vi editing mode in mongo shell</title>
                <link>https://jira.mongodb.org/browse/SERVER-9140</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Please enable a &apos;vi&apos; editing mode for the mongo shell.  Not all of us are emacs users.&lt;/p&gt;

&lt;p&gt;There are a few people looking for this feature, cf. discussion in the Mongo Google group here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/KccVnEDHt5s&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/KccVnEDHt5s&lt;/a&gt;&lt;/p&gt;</description>
                <environment>n/a</environment>
        <key id="69853">SERVER-9140</key>
            <summary>vi editing mode in mongo shell</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="backlog-server-platform">DO NOT USE - Backlog - Platform Team</assignee>
                                    <reporter username="annihilannic">Scott Rochford</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Mar 2013 06:48:41 +0000</created>
                <updated>Mon, 29 Jun 2020 14:59:55 +0000</updated>
                            <resolved>Mon, 29 Jun 2020 14:59:55 +0000</resolved>
                                    <version>2.4.1</version>
                                                    <component>Shell</component>
                                        <votes>16</votes>
                                    <watches>19</watches>
                                                                                                                <comments>
                            <comment id="3228191" author="jessica.sigafoos" created="Mon, 29 Jun 2020 14:59:55 +0000"  >&lt;p&gt;We are not prioritizing this for the new MongoDB Shell at the moment, but it is an interesting usability enhancement that we might consider in the future. &lt;/p&gt;

&lt;p&gt;We are tracking this idea in our unified feedback portal: &lt;a href=&quot;https://feedback.mongodb.com/forums/929233-mongodb-shell/suggestions/40781701-vi-mode-for-mongodb-shell&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://feedback.mongodb.com/forums/929233-mongodb-shell/suggestions/40781701-vi-mode-for-mongodb-shell&lt;/a&gt;. Feel free to vote and comment there.&lt;/p&gt;</comment>
                            <comment id="1503482" author="guyhoozdis" created="Sat, 18 Feb 2017 22:09:50 +0000"  >&lt;p&gt;Well done, @Tim!&lt;/p&gt;

&lt;p&gt;I haven&apos;t been using Mongo recently, but I book marked your `mongovi` repo.  I&apos;ll give it a run in the next few days and see if I can generate any feedback for you.&lt;/p&gt;</comment>
                            <comment id="1482803" author="kuijsten" created="Mon, 23 Jan 2017 17:45:53 +0000"  >&lt;p&gt;The last couple of months I&apos;ve been working on a new cli for mongodb written in C. It supports most of all the basic vi-editing and movement commands thanks to editline. I&apos;m currently in the process of creating a package for Debian. In the meantime the source can be found here: &lt;a href=&quot;https://github.com/timkuijsten/mongovi&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/timkuijsten/mongovi&lt;/a&gt; Any testing and feedback is welcome &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="1118939" author="bmeynell" created="Sat, 19 Dec 2015 21:56:12 +0000"  >&lt;p&gt;Please support vi editing mode in the mongo shell ...&lt;/p&gt;</comment>
                            <comment id="759630" author="alanning@gmail.com" created="Sun, 9 Nov 2014 04:30:16 +0000"  >&lt;p&gt;From the linked google group discussion (2013) it seems the mongodb linenoise lib has diverged significantly from upstream.  Anybody know where that is located?  (Traveling so can&apos;t search db source at the moment.)  Perhaps we can submit a newer version of bobrippling&apos;s port which supports basic vi bindings to the mongodb version of linenoise.&lt;/p&gt;

&lt;p&gt;UPDATE:&lt;br/&gt;
I think this is it:  &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/shell/linenoise.cpp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/master/src/mongo/shell/linenoise.cpp&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="750958" author="mjarvis" created="Tue, 28 Oct 2014 21:59:26 +0000"  >&lt;p&gt;Linenoise is the lightweight cross-platform library used to implement Emacs-only line editing.&lt;/p&gt;

&lt;p&gt;I understand WHY it was done, but since I&apos;m a Linux and Vi fan I would have preferred to have kept readline.  &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="750954" author="guyhoozdis" created="Tue, 28 Oct 2014 21:54:51 +0000"  >&lt;p&gt;On Tue, Oct 28, 2014 at 3:42 PM, Michael Jarvis (JIRA) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;



&lt;p&gt;I&apos;m not familiar with Linenoise... I&apos;ll take a look at it.&lt;/p&gt;

&lt;p&gt;To get by I&apos;ve been using pymongo in an ipython shell.  You can make a&lt;br/&gt;
dedicated ipython profile to customize the experience, but there are some&lt;br/&gt;
features / creature-comforts that are missing from that approach.&lt;/p&gt;</comment>
                            <comment id="750850" author="mjarvis" created="Tue, 28 Oct 2014 20:40:47 +0000"  >&lt;p&gt;Also, wouldn&apos;t it make more sense to implement Vi mode in linenoise?&lt;/p&gt;

&lt;p&gt;It looks like one person did exactly that, but his pull-request was never accepted. &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/bobrippling/linenoise&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/bobrippling/linenoise&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="750829" author="mjarvis" created="Tue, 28 Oct 2014 20:28:38 +0000"  >&lt;p&gt;I just found this thread because I&apos;m looking for Vi mode as well. Nobody has implemented it yet?&lt;/p&gt;</comment>
                            <comment id="614094" author="ryanmckay" created="Mon, 9 Jun 2014 16:40:30 +0000"  >&lt;p&gt;If you are looking to prioritize key bindings, I think a first cut would be &lt;br/&gt;
Basic command mode/editing mode toggling:&lt;br/&gt;
i	Insert before cursor&lt;br/&gt;
Esc	Toggle to command mode&lt;/p&gt;

&lt;p&gt;Cursor motion keys:&lt;br/&gt;
h	Move left&lt;br/&gt;
j	Move down&lt;br/&gt;
k	Move up&lt;br/&gt;
l	Move right&lt;/p&gt;

&lt;p&gt;w	Move to next word&lt;br/&gt;
b	Move to the beginning of the word&lt;/p&gt;

&lt;p&gt;0	Move to the beginning of the line&lt;br/&gt;
$	Move to the end of the line&lt;/p&gt;

&lt;p&gt;And delete/change:&lt;br/&gt;
x	delete next character to the right&lt;br/&gt;
d&lt;/p&gt;
{motion}	delete amount specified by {motion}
&lt;p&gt;c&lt;/p&gt;
{motion}	delete amount specified by {motion}
&lt;p&gt; and also put you in insert mode&lt;/p&gt;</comment>
                            <comment id="489951" author="guyhoozdis" created="Wed, 29 Jan 2014 08:14:14 +0000"  >&lt;p&gt;I&apos;m new here and looking for tasks to tackle as I dig deeper into mongo and its facets.  I am passionate about having VIM style:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;navigation (editing, history navigation, and the undo tree)&lt;/li&gt;
	&lt;li&gt;macros&lt;/li&gt;
	&lt;li&gt;search/replace&lt;/li&gt;
	&lt;li&gt;text manipulation (buffers),&lt;/li&gt;
	&lt;li&gt;the extensibility (syntax, custom commands, scripting)&lt;/li&gt;
	&lt;li&gt;a large community of users and developers&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I totally understand that it would make sense to drop the GNU readline dependency in the name of consistency across platforms.  I did glance over the linenoise project and see that it was mentioned in some of the comments here too.&lt;/p&gt;

&lt;p&gt;I&apos;m not saying that the mongo shell HAS to support VI style key-bindings and I don&apos;t mind EMACs style; insofar as it is supported, in the shell.  However, I do think that there is something better than exists now.  Frankly, that may merely be documentation that directs VI snobs to an alternate CLI or usage scenario.  I have used pymongo and iPython as an alternative client / environment- it was alright.&lt;/p&gt;

&lt;p&gt;If there are still any other users out there that really want to see a solution here, then maybe I can take up some of the leg work and offer a few options (maybe even prototypes) for the dev team to consider.&lt;/p&gt;</comment>
                            <comment id="451792" author="kuijsten" created="Tue, 5 Nov 2013 19:34:40 +0000"  >&lt;p&gt;For those that are running Node.js, I&apos;ve created a small REPL that might be helpfull &lt;a href=&quot;https://npmjs.org/package/mongovi&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://npmjs.org/package/mongovi&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="350028" author="jbaber" created="Fri, 31 May 2013 17:25:36 +0000"  >&lt;p&gt;For shells and mysql, it&apos;s something you can put in your $HOME/.configfile and could also be issued at the prompt, just as you describe.  A command line switch would be unflexible and a little strange, I agree.&lt;/p&gt;</comment>
                            <comment id="349781" author="tad" created="Fri, 31 May 2013 13:10:45 +0000"  >&lt;p&gt;I imagine that a setting (shell command) made in $HOME/.mongorc.js would be the way to enable this feature.  Does that sound right?  A command line switch (perhaps encoded into an alias) would be an alternative, but seems less flexible.&lt;/p&gt;</comment>
                            <comment id="348811" author="jbaber" created="Thu, 30 May 2013 13:44:57 +0000"  >&lt;p&gt;&lt;a href=&quot;http://jbaber.sdf.org/mongodb/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://jbaber.sdf.org/mongodb/&lt;/a&gt; (also attached to this bug) is the table of emacs keybindings from the mongo manual (&lt;a href=&quot;http://docs.mongodb.org/manual/reference/program/mongo/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/reference/program/mongo/&lt;/a&gt;) augmented by the vi keybindings.&lt;/p&gt;

&lt;p&gt;This is something mysql, ksh, bash, and lots of other &quot;edit-this-one-line&quot; interfaces do, so it&apos;s something users probably expect.&lt;/p&gt;</comment>
                            <comment id="300584" author="tad" created="Thu, 28 Mar 2013 08:56:10 +0000"  >&lt;p&gt;There were a few reasons for switching away from readline; one was to support the same feature set on Windows, Linux and the Mac without requiring users to find third-party libraries.  readline is common on Linux, but not on the other platforms.&lt;/p&gt;

&lt;p&gt;I looked at the pull request and I think it is just a fraction of what you&apos;ve listed.&lt;/p&gt;

&lt;p&gt;If you would like to expand your list so that it made sense to a non-vi user, it would be helpful.  I understand that there is input mode and command mode and that Esc switches between them, but &quot;hjklfFwWtTIiaArRdDcCb0^BxXypP&quot; is a little terse for a feature request.&lt;/p&gt;

&lt;p&gt;The interface between dbshell.cpp and linenoise.cpp is pretty similar to what the interface was between dbshell.cpp and readline, so if you wanted to do some C/C++ coding it would not be impossible to create your own version that used readline.  The MongoDB version 1.8 source code shows how the readline interface worked.  But it&apos;s not something that we could use for the mainline codebase because of the issues with the Mac and Windows.&lt;/p&gt;</comment>
                            <comment id="300271" author="annihilannic" created="Wed, 27 Mar 2013 22:07:36 +0000"  >&lt;p&gt;Well, according to Bryan in the linked discussion, at some point the mongo shell switched from using the GNU readline library (which gives us &apos;vi&apos; support &quot;for free&quot; as it were) to linenoise.  What was the motivation for that, out of curiosity?  Is it still possible to build the shell with readline instead?  Another poster also mentions a patch for &apos;vi&apos; support but Bryan pointed out that your version of linenoise had deviated from the original release signficantly.  However the content of the patch may still be useful.&lt;/p&gt;

&lt;p&gt;Personally it&apos;s the main navigation, history search and recall and editing keys (Esc,hjklfFwWtTIiaArRdDcCb0^BxXypP/) that I miss most, but it would be hard to identify a specific subset that should be included.&lt;/p&gt;</comment>
                            <comment id="299830" author="tad" created="Wed, 27 Mar 2013 14:42:46 +0000"  >&lt;p&gt;Short of cloning the vi mode in bash, is there a set of things that would provide significant value?  A list of specific desired features with priorities would make this more approachable.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="27393" name="mongodb.htm" size="7097" author="jbaber" created="Thu, 30 May 2013 13:47:19 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>18.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 27 Mar 2013 14:42:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 32 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>jessica.sigafoos@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 32 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alanning@gmail.com</customfieldvalue>
            <customfieldvalue>bmeynell</customfieldvalue>
            <customfieldvalue>backlog-server-platform</customfieldvalue>
            <customfieldvalue>GuyHoozdis</customfieldvalue>
            <customfieldvalue>jessica.sigafoos@mongodb.com</customfieldvalue>
            <customfieldvalue>jbaber</customfieldvalue>
            <customfieldvalue>mjarvis</customfieldvalue>
            <customfieldvalue>ryanmckay</customfieldvalue>
            <customfieldvalue>annihilannic</customfieldvalue>
            <customfieldvalue>tad</customfieldvalue>
            <customfieldvalue>kuijsten</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmzn3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9i2n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7088</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht0n3b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>