h map <...">

How to easily navigate navigation windows in malicious mode?

In vim, I have this in my .vimrc:

" Easy window navigation map <Ch> <Cw>h map <Cj> <Cw>j map <Ck> <Cw>k map <Cl> <Cw>l 

How to get easy window navigation in malicious mode?

Also, in vim "+ will be copied to my system clipboard? This does not work in emacs.

 $ emacs --version 

GNU Emacs 24.3.1 Copyright (C) 2013 Free Software Foundation, Inc. GNU Emacs comes with an absolutely FREE WARRANTY. You may distribute copies of Emacs under the GNU General Public License. For more information on these issues, see the file COPYING.

 $ cat .emacs 

;;

 ;; Package manager and better repos (require 'package) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) (package-initialize) (setq backup-directory-alist `(("." . "~/.emacs.d/saves"))) ;; Indents, tab as spaces (setq-default indent-tabs-mode nil) (setq default-tab-width 2) ;; evil-mode (eval-after-load "evil" '(progn (define-key evil-normal-state-map (kbd "Ch") 'evil-window-left) (define-key evil-normal-state-map (kbd "Cj") 'evil-window-down) (define-key evil-normal-state-map (kbd "Ck") 'evil-window-up) (define-key evil-normal-state-map (kbd "Cl") 'evil-window-right))) (require 'evil) (evil-mode 1) ;(setcdr evil-insert-state-map nil) ;(define-key evil-insert-state-map [escape] 'evil-normal-state) ;; Fun stuff (require 'jabber-autoloads) (require 'jabber) 
+6
source share
1 answer

You can add the key bindings you want to use to evil-normal-state-map :

 (eval-after-load "evil" '(progn (define-key evil-normal-state-map (kbd "Ch") 'evil-window-left) (define-key evil-normal-state-map (kbd "Cj") 'evil-window-down) (define-key evil-normal-state-map (kbd "Ck") 'evil-window-up) (define-key evil-normal-state-map (kbd "Cl") 'evil-window-right))) 

Purchasing code in eval-after-load necessary to ensure that evil-normal-state-map defined / available when define-key calls are made.

If you want the same bindings to be available in other "states" (for example, the "Motion" state), simply add them to the corresponding key cards, as shown above (in the case of the "Motion" state, the corresponding map is called evil-motion-state-map ).


To make Emacs use the system clipboard, try setting x-select-enable-clipboard to non nil :

 (setq x-select-enable-clipboard t) 

There are also special kill and capture commands that use the clipboard. From the documentation:

  • clipboard-kill-region :

    Kill the region and save it to the clipboard X.

  • clipboard-kill-ring-save :

    Copy the area to kill the ring and save it to the clipboard X.

+9
source

All Articles