Re: implementations-list Digest, Vol 49, Issue 11
I try to move some functions to emacs-mode, but looks ugly~ (global-unset-key "\C-o") ; window hjkl oc tb sv (global-set-key "\C-o\C-h" 'evil-window-left) (global-set-key "\C-o\C-j" 'evil-window-down) (global-set-key "\C-o\C-k" 'evil-window-up) (global-set-key "\C-o\C-l" 'evil-window-right) (global-set-key "\C-o\C-c" 'delete-window) (global-set-key "\C-o\C-o" 'delete-other-windows) (global-set-key "\C-o\C-t" 'evil-window-top-left) (global-set-key "\C-o\C-b" 'evil-window-bottom-right) (global-set-key "\C-o\C-s" 'split-window-vertically) (global-set-key "\C-o\C-v" 'split-window-horizontally) ; motion (global-set-key "\C-ogg" 'evil-goto-first-line) (global-set-key "\C-oG" 'evil-goto-line) On Fri, Nov 23, 2012 at 7:01 PM, < [email protected]> wrote:
Send implementations-list mailing list submissions to [email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
or, via email, send a message with subject or body 'help' to [email protected]
You can reach the person managing the list at [email protected]
When replying, please edit your Subject line so it is more specific than "Re: Contents of implementations-list digest..."
Today's Topics:
1. Temporary execution in evil state with C-o (just like using \ to temporary execution in emacs state) (lv yiwang)
----------------------------------------------------------------------
Message: 1 Date: Thu, 22 Nov 2012 18:41:38 +0800 From: lv yiwang <[email protected]> Subject: Temporary execution in evil state with C-o (just like using \ to temporary execution in emacs state) To: [email protected] Message-ID: < CAELkqXtzei_BujDr_dA6ZcLrx-YSe2fGB5_97Jgjbt+kUQB-cg@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
I have tried my best to read the doc-evil file and to search the mailing list, but no answers were found. I use emacs-mode of evil most of the time, and I have unset the C-o key
What's "Temporary execution in evil state with C-o"?
For example: -1, If I am in emacs mode, and I want to jump to the beginning-of-buffer with gg -2, I can do it like this, C-z to normal-mode, then gg to the beginning, then C-z to emacs mode. *3, I don't like this way, if I am in emacs-mode, I want to use C-o to normal-mode, and gg to the beginning, *but after using gg, **the buffer automatically come back into emacs-mode**.* -4, And I think that would be a great convenient for me,I can also use C-o dib to delete contents in brackets without leaving emacs-mode(because after C-o dib, the buffer automatically back into emacs-mode).
Thanks!
It works! I solved it! Add these lines to init.el file (global-unset-key "\C-o") (global-set-key "\C-o" 'evil-execute-in-normal-state) On Sun, Nov 25, 2012 at 12:32 AM, lv yiwang <[email protected]> wrote:
I try to move some functions to emacs-mode, but looks ugly~
(global-unset-key "\C-o")
; window hjkl oc tb sv (global-set-key "\C-o\C-h" 'evil-window-left) (global-set-key "\C-o\C-j" 'evil-window-down) (global-set-key "\C-o\C-k" 'evil-window-up) (global-set-key "\C-o\C-l" 'evil-window-right) (global-set-key "\C-o\C-c" 'delete-window) (global-set-key "\C-o\C-o" 'delete-other-windows) (global-set-key "\C-o\C-t" 'evil-window-top-left) (global-set-key "\C-o\C-b" 'evil-window-bottom-right) (global-set-key "\C-o\C-s" 'split-window-vertically) (global-set-key "\C-o\C-v" 'split-window-horizontally)
; motion (global-set-key "\C-ogg" 'evil-goto-first-line) (global-set-key "\C-oG" 'evil-goto-line)
On Fri, Nov 23, 2012 at 7:01 PM, < [email protected]> wrote:
Send implementations-list mailing list submissions to [email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
or, via email, send a message with subject or body 'help' to [email protected]
You can reach the person managing the list at [email protected]
When replying, please edit your Subject line so it is more specific than "Re: Contents of implementations-list digest..."
Today's Topics:
1. Temporary execution in evil state with C-o (just like using \ to temporary execution in emacs state) (lv yiwang)
----------------------------------------------------------------------
Message: 1 Date: Thu, 22 Nov 2012 18:41:38 +0800 From: lv yiwang <[email protected]> Subject: Temporary execution in evil state with C-o (just like using \ to temporary execution in emacs state) To: [email protected] Message-ID: < CAELkqXtzei_BujDr_dA6ZcLrx-YSe2fGB5_97Jgjbt+kUQB-cg@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
I have tried my best to read the doc-evil file and to search the mailing list, but no answers were found. I use emacs-mode of evil most of the time, and I have unset the C-o key
What's "Temporary execution in evil state with C-o"?
For example: -1, If I am in emacs mode, and I want to jump to the beginning-of-buffer with gg -2, I can do it like this, C-z to normal-mode, then gg to the beginning, then C-z to emacs mode. *3, I don't like this way, if I am in emacs-mode, I want to use C-o to normal-mode, and gg to the beginning, *but after using gg, **the buffer automatically come back into emacs-mode**.* -4, And I think that would be a great convenient for me,I can also use C-o dib to delete contents in brackets without leaving emacs-mode(because after C-o dib, the buffer automatically back into emacs-mode).
Thanks!
(global-unset-key "\C-o") (global-set-key "\C-o" 'evil-execute-in-normal-state) The above setting has a lot of bugs ~ And I don't know why ~ So, I write the code bellow: (global-unset-key "\C-o") (global-set-key "\C-o" 'evil-execute-in-normal-state-to-emacs2) (defun evil-execute-in-normal-state-to-emacs2 () "Execute the next command in Normal state." (interactive) (evil-delay '(not (eq this-command #'evil-execute-in-normal-state-to-emacs2)) `(progn (evil-change-to-previous-emacs-state2)) 'post-command-hook) (setq evil-move-cursor-back nil) (evil-normal-state) (evil-echo "Switched to Normal state for the next command ...")) (evil-define-command evil-change-to-previous-emacs-state2 (&optional buffer message) "Change the state of BUFFER to its previous state." :keep-visual t :repeat t :suppress-operator t (evil-change-state (evil-emacs-state) message)) But it also has a little bug: At buffer #scratch#, the C-z will still minimum the frame~ On Sun, Nov 25, 2012 at 10:17 AM, lv yiwang <[email protected]> wrote:
It works! I solved it! Add these lines to init.el file
(global-unset-key "\C-o") (global-set-key "\C-o" 'evil-execute-in-normal-state)
On Sun, Nov 25, 2012 at 12:32 AM, lv yiwang <[email protected]>wrote:
I try to move some functions to emacs-mode, but looks ugly~
(global-unset-key "\C-o")
; window hjkl oc tb sv (global-set-key "\C-o\C-h" 'evil-window-left) (global-set-key "\C-o\C-j" 'evil-window-down) (global-set-key "\C-o\C-k" 'evil-window-up) (global-set-key "\C-o\C-l" 'evil-window-right) (global-set-key "\C-o\C-c" 'delete-window) (global-set-key "\C-o\C-o" 'delete-other-windows) (global-set-key "\C-o\C-t" 'evil-window-top-left) (global-set-key "\C-o\C-b" 'evil-window-bottom-right) (global-set-key "\C-o\C-s" 'split-window-vertically) (global-set-key "\C-o\C-v" 'split-window-horizontally)
; motion (global-set-key "\C-ogg" 'evil-goto-first-line) (global-set-key "\C-oG" 'evil-goto-line)
On Fri, Nov 23, 2012 at 7:01 PM, < [email protected]> wrote:
Send implementations-list mailing list submissions to [email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
or, via email, send a message with subject or body 'help' to [email protected]
You can reach the person managing the list at [email protected]
When replying, please edit your Subject line so it is more specific than "Re: Contents of implementations-list digest..."
Today's Topics:
1. Temporary execution in evil state with C-o (just like using \ to temporary execution in emacs state) (lv yiwang)
----------------------------------------------------------------------
Message: 1 Date: Thu, 22 Nov 2012 18:41:38 +0800 From: lv yiwang <[email protected]> Subject: Temporary execution in evil state with C-o (just like using \ to temporary execution in emacs state) To: [email protected] Message-ID: < CAELkqXtzei_BujDr_dA6ZcLrx-YSe2fGB5_97Jgjbt+kUQB-cg@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
I have tried my best to read the doc-evil file and to search the mailing list, but no answers were found. I use emacs-mode of evil most of the time, and I have unset the C-o key
What's "Temporary execution in evil state with C-o"?
For example: -1, If I am in emacs mode, and I want to jump to the beginning-of-buffer with gg -2, I can do it like this, C-z to normal-mode, then gg to the beginning, then C-z to emacs mode. *3, I don't like this way, if I am in emacs-mode, I want to use C-o to normal-mode, and gg to the beginning, *but after using gg, **the buffer automatically come back into emacs-mode**.* -4, And I think that would be a great convenient for me,I can also use C-o dib to delete contents in brackets without leaving emacs-mode(because after C-o dib, the buffer automatically back into emacs-mode).
Thanks!
On Sun, Nov 25 2012 (05:02), lv yiwang <[email protected]> wrote:
(global-unset-key "\C-o") (global-set-key "\C-o" 'evil-execute-in-normal-state) The above setting has a lot of bugs ~ And I don't know why ~ So, I write the code bellow:
[22 lines snipped] Let me get this straight: You want to set C-o to `evil-execute-in-normal-state` in emacs-state? This should do it: (define-key evil-emacs-state-map (kbd "C-o") 'evil-execute-in-normal-state) Michael
participants (2)
-
lv yiwang -
Michael Markert