<pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;width:auto;max-height:600px;color:rgb(0,0,0);line-height:18px">
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;line-height:normal;white-space:normal;background-color:rgb(255,255,255)">(global-unset-key &quot;\C-o&quot;)</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;line-height:normal;white-space:normal;background-color:rgb(255,255,255)">
(global-set-key &quot;\C-o&quot; &#39;evil-execute-in-normal-state)</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;line-height:normal;white-space:normal;background-color:rgb(255,255,255)">
The above setting has a lot of bugs ~ And I don&#39;t know why ~ So, I write the code bellow:�</div></pre><pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;width:auto;max-height:600px;color:rgb(0,0,0);line-height:18px">
(global-unset-key &quot;\C-o&quot;)
(global-set-key &quot;\C-o&quot; &#39;evil-execute-in-normal-state-to-emacs2)

(defun evil-execute-in-normal-state-to-emacs2 ()
  &quot;Execute the next command in Normal state.&quot;
  (interactive)
  (evil-delay &#39;(not (eq this-command #&#39;evil-execute-in-normal-state-to-emacs2))
      `(progn
         (evil-change-to-previous-emacs-state2))
    &#39;post-command-hook)
  (setq evil-move-cursor-back nil)
  (evil-normal-state)
  (evil-echo &quot;Switched to Normal state for the next command ...&quot;))

(evil-define-command evil-change-to-previous-emacs-state2
  (&amp;optional buffer message)
  &quot;Change the state of BUFFER to its previous state.&quot;
  :keep-visual t
  :repeat t
  :suppress-operator t
  (evil-change-state (evil-emacs-state) message)) </pre><pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;width:auto;max-height:600px;color:rgb(0,0,0);line-height:18px">
<span style="font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;white-space:normal;background-color:rgb(255,255,255)">But it also has a little bug: At buffer #scratch#, the C-z will still minimum the frame~</span><br>
</pre><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Nov 25, 2012 at 10:17 AM, lv yiwang <span dir="ltr">&lt;<a href="mailto:lvyiwang.com@gmail.com" target="_blank">lvyiwang.com@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It works! I solved it!<div>Add these lines to init.el file�</div><div><br></div><div><div>(global-unset-key &quot;\C-o&quot;)</div>
<div>(global-set-key &quot;\C-o&quot; &#39;evil-execute-in-normal-state)</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, Nov 25, 2012 at 12:32 AM, lv yiwang <span dir="ltr">&lt;<a href="mailto:lvyiwang.com@gmail.com" target="_blank">lvyiwang.com@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I try to move some functions to emacs-mode, but looks ugly~<div><br></div><div><div>(global-unset-key &quot;\C-o&quot;)</div><div><br></div><div>; window hjkl oc tb sv</div><div>(global-set-key &quot;\C-o\C-h&quot; &#39;evil-window-left)</div>


<div>(global-set-key &quot;\C-o\C-j&quot; &#39;evil-window-down)</div><div>(global-set-key &quot;\C-o\C-k&quot; &#39;evil-window-up)</div><div>(global-set-key &quot;\C-o\C-l&quot; &#39;evil-window-right)</div><div>(global-set-key &quot;\C-o\C-c&quot; &#39;delete-window)</div>


<div>(global-set-key &quot;\C-o\C-o&quot; &#39;delete-other-windows)</div><div>(global-set-key &quot;\C-o\C-t&quot; &#39;evil-window-top-left)</div><div>(global-set-key &quot;\C-o\C-b&quot; &#39;evil-window-bottom-right)</div>


<div>(global-set-key &quot;\C-o\C-s&quot; &#39;split-window-vertically)</div><div>(global-set-key &quot;\C-o\C-v&quot; &#39;split-window-horizontally)</div><div><br></div><div>; motion</div><div>(global-set-key &quot;\C-ogg&quot; &#39;evil-goto-first-line)</div>


<div>(global-set-key &quot;\C-oG&quot; &#39;evil-goto-line)</div></div><div><div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 23, 2012 at 7:01 PM,  <span dir="ltr">&lt;<a href="mailto:implementations-list-request@lists.ourproject.org" target="_blank">implementations-list-request@lists.ourproject.org</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send implementations-list mailing list submissions to<br>
� � � � <a href="mailto:implementations-list@lists.ourproject.org" target="_blank">implementations-list@lists.ourproject.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
� � � � <a href="https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list" target="_blank">https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list</a><br>
<br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
� � � � <a href="mailto:implementations-list-request@lists.ourproject.org" target="_blank">implementations-list-request@lists.ourproject.org</a><br>
<br>
You can reach the person managing the list at<br>
� � � � <a href="mailto:implementations-list-owner@lists.ourproject.org" target="_blank">implementations-list-owner@lists.ourproject.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of implementations-list digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
� �1. Temporary execution in evil state with C-o (just like using \<br>
� � � to � � � �temporary execution in emacs state) (lv yiwang)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 22 Nov 2012 18:41:38 +0800<br>
From: lv yiwang &lt;<a href="mailto:lvyiwang.com@gmail.com" target="_blank">lvyiwang.com@gmail.com</a>&gt;<br>
Subject: Temporary execution in evil state with C-o (just like using \<br>
� � � � to � � �temporary execution in emacs state)<br>
To: <a href="mailto:implementations-list@lists.ourproject.org" target="_blank">implementations-list@lists.ourproject.org</a><br>
Message-ID:<br>
� � � � &lt;<a href="mailto:CAELkqXtzei_BujDr_dA6ZcLrx-YSe2fGB5_97Jgjbt%2BkUQB-cg@mail.gmail.com" target="_blank">CAELkqXtzei_BujDr_dA6ZcLrx-YSe2fGB5_97Jgjbt+kUQB-cg@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
I have tried my best to read the doc-evil file and to search the mailing<br>
list, but no answers were found.<br>
I use emacs-mode of evil most of the time, and I have unset the C-o key<br>
<br>
What&#39;s &quot;Temporary execution in evil state with C-o&quot;?<br>
<br>
For example:<br>
-1, If I am in emacs mode, and I want to jump to the beginning-of-buffer<br>
with gg<br>
-2, I can do it like this, C-z to normal-mode, then gg to the beginning,<br>
then C-z to emacs mode.<br>
*3, I don&#39;t like this way, if I am in emacs-mode, I want to use C-o to<br>
normal-mode, and gg to the<br>
beginning, *but after using gg, **the buffer automatically come back into<br>
emacs-mode**.*<br>
-4, And I think that would be a great convenient for me,I can also use C-o<br>
dib to delete contents in brackets<br>
without leaving emacs-mode(because after C-o dib, the buffer automatically<br>
back into emacs-mode).<br>
<br>
Thanks!<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="https://lists.ourproject.org/pipermail/implementations-list/attachments/20121122/a9a7ca89/attachment-0001.htm" target="_blank">https://lists.ourproject.org/pipermail/implementations-list/attachments/20121122/a9a7ca89/attachment-0001.htm</a><br>



<br>
------------------------------<br>
<br>
_______________________________________________<br>
implementations-list mailing list<br>
<a href="mailto:implementations-list@lists.ourproject.org" target="_blank">implementations-list@lists.ourproject.org</a><br>
<a href="https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list" target="_blank">https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list</a><br>
<br>
<br>
End of implementations-list Digest, Vol 49, Issue 11<br>
****************************************************<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>