{"id":2530,"date":"2011-07-19T21:22:45","date_gmt":"2011-07-20T01:22:45","guid":{"rendered":"http:\/\/www.databook.bz\/?page_id=2530"},"modified":"2015-02-19T08:59:35","modified_gmt":"2015-02-19T13:59:35","slug":"setting-vi-mode-for-command-line-editing","status":"publish","type":"page","link":"http:\/\/www.linux-databook.info\/?page_id=2530","title":{"rendered":"Setting vi Mode for Command Line Editing"},"content":{"rendered":"<p>The default mode for command line editing in the BASH shell is EMACS mode. To change to vi mode as an individual user use the following command. To make the change permanent add the command to <span style=\"font-family: andale mono,times;\">~\/.bashrc<\/span>.<\/p>\n<blockquote><p><span style=\"font-family: andale mono,times;\">set -o vi<\/span><\/p><\/blockquote>\n<p>Note that -o is lowercase letter &#8220;o&#8221;.<\/p>\n<p>You can then source the <span style=\"font-family: andale mono,times;\">~\/.bashrc<\/span> file to activate vi editing mode.<\/p>\n<blockquote><p><span style=\"font-family: andale mono,times;\">source ~\/.bashrc<\/span><\/p><\/blockquote>\n<p>or<\/p>\n<blockquote><p><span style=\"font-family: andale mono,times;\">. ~\/.bashrc<\/span><\/p><\/blockquote>\n<p>Where the dot (.) command is a shortcut for typing out the entire source command.<\/p>\n<p>You can also make this the default for all users by adding the set command to <span style=\"font-family: andale mono,times;\">\/etc\/bashrc<\/span> file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The default mode for command line editing in the BASH shell is EMACS mode. To change to vi mode as an individual user use the following command. To make the change permanent add the command to ~\/.bashrc. set -o vi&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/www.linux-databook.info\/?page_id=2530\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":2159,"menu_order":17,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2530","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-databook.info\/index.php?rest_route=\/wp\/v2\/pages\/2530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-databook.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-databook.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-databook.info\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-databook.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2530"}],"version-history":[{"count":7,"href":"http:\/\/www.linux-databook.info\/index.php?rest_route=\/wp\/v2\/pages\/2530\/revisions"}],"predecessor-version":[{"id":4377,"href":"http:\/\/www.linux-databook.info\/index.php?rest_route=\/wp\/v2\/pages\/2530\/revisions\/4377"}],"up":[{"embeddable":true,"href":"http:\/\/www.linux-databook.info\/index.php?rest_route=\/wp\/v2\/pages\/2159"}],"wp:attachment":[{"href":"http:\/\/www.linux-databook.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}