Gentoo Archives: gentoo-doc-cvs

From: "Sven Vermeulen (swift)" <swift@g.o>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] gentoo commit in xml/htdocs/doc/en: vi-guide.xml
Date: Mon, 15 Aug 2011 20:38:05
Message-Id: 20110815203755.414EE2004C@flycatcher.gentoo.org
swift       11/08/15 20:37:55

  Modified:             vi-guide.xml
  Log:
  Fix bug #379195 - Update how to select an editor, also mention this for user-only changes

Revision  Changes    Path
1.17                 xml/htdocs/doc/en/vi-guide.xml

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/vi-guide.xml?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/vi-guide.xml?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/vi-guide.xml?r1=1.16&r2=1.17

Index: vi-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/vi-guide.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- vi-guide.xml	19 May 2008 19:59:02 -0000	1.16
+++ vi-guide.xml	15 Aug 2011 20:37:55 -0000	1.17
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/vi-guide.xml,v 1.16 2008/05/19 19:59:02 swift Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/vi-guide.xml,v 1.17 2011/08/15 20:37:55 swift Exp $ -->
 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
 
 <guide link="/doc/en/vi-guide.xml">
@@ -20,8 +20,8 @@
 catering to beginners.
 </abstract>
 
-<version>1.1.7</version>
-<date>2005-07-21</date>
+<version>2</version>
+<date>2011-08-15</date>
 
 <chapter>
 <title>Getting Started</title>
@@ -715,15 +715,33 @@
 </p>
 
 <p>
-If you want to use vi as your default editor make the following change
-to <path>/etc/rc.conf</path>:
+If you want to use vi as your default editor, use <c>eselect</c>:
 </p>
 
 <pre caption="Setting vi as the default editor">
-<comment>(Set EDITOR to your preferred editor.)</comment>
-#EDITOR="/bin/nano"
-EDITOR="/usr/bin/vim"
-#EDITOR="/usr/bin/emacs"
+~# <i>eselect editor list</i>
+Available targets for the EDITOR variable:
+  [1]   /bin/nano
+  [2]   /bin/ed
+  [3]   /usr/bin/ex
+  [4]   /usr/bin/vi
+  [ ]   (free form)
+
+~# <i>eselect editor set 4</i>
+Setting EDITOR to /usr/bin/vi ...
+>>> Regenerating /etc/ld.so.cache...
+Run ". /etc/profile" to update the variable in your shell.
+</pre>
+
+<p>
+If you want to set this for your user only instead of system wide, set the
+<c>EDITOR</c> variable in your <path>~/.bashrc</path>:
+</p>
+
+<pre caption="Setting vi as the users' editor">
+~$ <i>vi ~/.bashrc</i>
+<comment>(...)</comment>
+export EDITOR="/usr/bin/vi"
 </pre>
 
 </body>