<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello Nitesh,<br>
<br>
Thanks for your help.<br>
<br>
Your answer can work.<br>
What I did:<br>
1. added EDITOR=vim to /etc/environment<br>
2. source /etc/environment<br>
3. restart the session<br>
<br>
<br>
In Ubuntu/Debian,also could run select-editor to change the
editor of virsh edit.<br>
<br>
Thanks,<br>
dw<br>
<br>
<br>
在 2016年12月28日 18:17, Nitesh Konkar 写道:<br>
</div>
<blockquote
cite="mid:CA+beMh7viVkrgvUy1bRjNc1DFBzirWtdg3pNkuU94DQEz=CzCQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hello dw,<br>
<br>
</div>
Can you plz try this method and check if it works:<br>
<br>
</div>
<div>Set the preferred editor in <code>/etc/environment</code>
file (to define it globally) and then restart the session.<br>
<br>
</div>
<div>You may follow these links for more info on the topic.
<br>
</div>
<div>Link 1: <a moz-do-not-send="true"
href="https://www.redhat.com/archives/libvirt-users/2014-September/msg00039.html">https://www.redhat.com/archives/libvirt-users/2014-September/msg00039.html</a><br>
</div>
Link 2: <a moz-do-not-send="true"
href="https://askubuntu.com/questions/432524/how-do-i-find-and-set-my-editor-environment-variable">https://askubuntu.com/questions/432524/how-do-i-find-and-set-my-editor-environment-variable</a><br>
<br>
</div>
Thanks,<br>
</div>
Nitesh.<br>
<br>
<div>
<div><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Dec 28, 2016 at 2:30 PM, dw <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:dwlinuxkernel@163.com" target="_blank">dwlinuxkernel@163.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi:<br>
<br>
when I modify VM's xml file,the editor is VI,how to set
to other editor forever?<br>
<br>
Now I can change the editor to VIM from VI with setting
environment EDITOR=$my-favorite-editor,<br>
but after rebooting,it is VI again.<br>
<br>
thanks<br>
<br>
<br>
______________________________<wbr>_________________<br>
libvirt-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a><br>
<a moz-do-not-send="true"
href="https://www.redhat.com/mailman/listinfo/libvirt-users"
rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/libvirt-users</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>