Shiyao Ma | 13 Feb 11:14 2016
Gravatar

What's the motion-state keymap priority (under info mode) ?

the evil-motion-state-map should have a higer priority than the major mode (info mode) keymap.

However, when in info mode, I found "gg" is falls into the info-mode-map, not the evil-motion-state-map.


Regards.

--

吾輩は猫である。ホームーページはhttps://introo.me


_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Alan Schmitt | 11 Feb 09:56 2016

translate SPC to APPS in some modes only

Hello,

I’m trying the following, to translate the space key to an apps key in
motion, normal, and visual modes:

#+begin_src emacs-lisp
(define-key input-decode-map (kbd "SPC")
  (lambda (prompt)
    (if (and (not (evil-operator-state-p))
             (or (evil-motion-state-p) (evil-normal-state-p) (evil-visual-state-p)))
        (kbd "<apps>")
      (kbd "SPC"))))
#+end_src

It works well, with one exception: the part that checks if the current
state is the operator state does not seem to work. For instance, if
I type r <SPC> in normal mode the current character is not replaced, and
I see in the minibuffer that further input is needed (apps is a prefix
key here).

Is this way to detect operator state incorrect?

Thanks,

Alan

--

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂ (2016-01, Mauna Loa Obs.): 402.52

_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Alan Schmitt | 11 Feb 10:12 2016

translate SPC to APPS in some modes only

Hello,

I’m trying the following, to translate the space key to an apps key in
motion, normal, and visual modes:

#+begin_src emacs-lisp
(define-key input-decode-map (kbd "SPC")
  (lambda (prompt)
    (if (and (not (evil-operator-state-p))
             (not (evil-replace-state-p))
             (or (evil-motion-state-p) (evil-normal-state-p) (evil-visual-state-p)))
        (kbd "<apps>")
      (kbd "SPC"))))
#+end_src

It works well, with one exception: the part that checks if the current
state is not the operator nor replace state does not seem to work. For
instance, if I type r <SPC> in normal mode the current character is not
replaced, and I see in the minibuffer that further input is needed (apps
is a prefix key here). This also happens when I want to search for
a string using '/': I no longer can enter a space.

Is this way to detect states incorrect?

Thanks,

Alan

--

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂ (2016-01, Mauna Loa Obs.): 402.52

_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Guido Van Hoecke | 27 Jan 20:37 2016
Picon
Gravatar

Trying to write elisp code to select inner WORD as achieved by viW normal mode keystrokes

Hi,


I frequently use this key sequence: 'viW*' (without the quotes)

I'd like to write a short function that achieves this so that I can map it to a single key in evil-normal-state-map, something like

  (defun guivho-viW-star()
    "Visual select inner WORD and search for it"
    (interactive)
   ;(select-inner-WORD-function-as-would-be-achieved-by-viW)
   (evil-visualstar/begin-search-forward))

I've looked up what is called by 'v', and it claims to be defined in evil-states-el, but I don't find it there. It claims to be defined as

(evil-visual-char &optional MARK POINT TYPE MESSAGE)

but I don/t know how to express the 'iW' part in that signature.

Please advise,

TIA,

Guido


_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Shiyao Ma | 25 Jan 07:30 2016
Gravatar

Prefer evil-normal-state-local-map or evil-define-key evil-normal-state-map ?

Hi,

I've read the comments at evil-core.el.

I'd like to add my custom key bindings when inside org-mode.
Two possible methods are:
1. use evil-normal-state-map

2. evil-define-key evil-normal-state-map


I see many people use method 2, but I think method 1 is more semantically preferrable.

So my question is, regarding my purpose, which method is better (not functionality-wise, but just best practice) ?

--

吾輩は猫である。ホームーページはhttps://introo.me


_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
York Zhao | 9 Nov 02:05 2015
Picon

Git repository

Hi list,

I've been waiting for a long time since Gitorious went die, but Evil's Git
repository never comes back. I'm aware that there's a hg repository at Bitbucket
maintained by Frank, is that the official repository now? I would hope that's
not because I don't really want to learn hg.

Personally, I think moving to GitHub would be nice. However, if switching to hg
has been the decision, can Frank or anyone please share some information about
using git locally with remote hg repository?

Thanks



_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
William Xu | 19 Sep 21:00 2015
Picon
Gravatar

rebind keys to *-visual-line if visual-line-mode is enabled

Hi,

When visual-line-mode is enabled, those emacs movement/deletions/.. keys will
operate on visual line automatically.  e.g, C-a to the beginning of visual line;
C-k will kill current visual line.

In evil-mode, why do we need additional keys to do that?  Like g0, and dd will
still kill the logical line, not visual line.  Can we have the same behavior as
emacs keys?
Alexander Shukaev | 20 Jul 17:09 2015
Picon

Deny keymap changes made by `evil-integration'

Hello,

`evil-integration' has quite some forms like

(eval-after-load 'dired
  '(progn
     ;; use the standard Dired bindings as a base
     (defvar dired-mode-map)
     (evil-make-overriding-map dired-mode-map 'normal)
     (evil-add-hjkl-bindings dired-mode-map 'normal
       "J" 'dired-goto-file                   ; "j"
       "K" 'dired-do-kill-lines               ; "k"
       "r" 'dired-do-redisplay                ; "l"
       ;; ":d", ":v", ":s", ":e"
       ";" (lookup-key dired-mode-map ":"))))

for various packages.  I would like to learn how to either revert
these changes back to the default state (i.e. `dired-mode-map' should
be crystal clean as it was before loading `evil') or, even better,
prevent `evil-integration' from doing such changes.  For instance,
I've tried

(let ((dired-mode-map))
  (require 'evil)
  ...
)

and it didn't work.  Any ideas?

P.S.: My personal opinion is that such intrusive (and silent) changes
to the default settings should be avoided by default.  In other words,
I have nothing against having an option to turn these on, but there
surely must be a simple Boolean option to turn such default
modifications off.

Kind regards,
Alexander
RW. S | 28 Jun 15:45 2015
Picon

evil-cross-lines act like evil-find-skip-newlines

Not that it's necessarily related to the question but context is that
I'm new to emacs (and therefore also evil-mode), but not too new to
vim (a few years).

Question is, is there a way to get f, F, t, T to skip newlines to find
a character, but without making h and l to cross lines?
`evil-cross-lines` does both (i.e. it *does* make h and l cross
lines), but I only want the former, without the latter. I suppose
`evil-find-skip-newlines` as I read in the documentation is what I
want (and why I hope it's possible), but the option seems to be taken
away now.

--

-- 
Also try contacting on twitter  <at> xd1le if no response.
jenia.ivlev | 3 Jun 06:40 2015
Picon

add marker to evil-jump-list before executing arbitrary function

Hello:

I want to be able to jump back, using C-o, to the position where I execute
ggtags-find-tag-dwim.
I have wrote this small program:

  (defun ggtags-go-to-definition ()
    (interactive)
    (let ((current-pos (make-marker)))
      (add-to-list 'evil-jump-list current-pos)
      (ggtags-find-tag-dwim (thing-at-point 'symbol))))

But it gives me the error "Marker does not point anywhere".

Can someone please tell me, how do I write this program correctly? That
is, I want to store the position before executing `ggtags...` and then
be able to jump back (using "C-o" a.k.a "evil-jump-back").

Thanks in advance for your kind help.
Jenia
LiuXiaogang | 24 May 04:35 2015
Picon

Last matching text was not replaced by %s

Hi,

I isntalled evil-mode version 20150511.146 from melpa yesterday. I tried the following command line

:%s/get-line/getLine/

As you can see from the attached picture, the last match was not highlighted (and not replaced when I hit Enter). I have haskell-mode installed and was editing a simple haskell file. Below is the source code. The green text was the one missed by the command.

getLines :: (Num a) => [String] -> a -> [String]
getLines [] n = []
getLines xs <at> (x:_) n
  | length xs < n = [] -- Ignore remainder
  | otherwise     = (get-line (take n xs)) : (getLines (drop n xs))

get-line :: [String] -> String
get-line [] = "\n"
get-line (x:xs) = (show x) + "," + (get-line xs)


Best regards,
Xiaogang


_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list

Gmane