Jabba Laci | 19 Oct 15:56 2014
Picon

tildes + helm integration

Hi,

I'm new to the list and Evil. In the past 3 days I could customize lots of things. I would have 2 questions:

1) Is there a way to show blue tildes (~) after the last line of a file? I miss that feature.

2) I installed the Helm plugin but it stole some key bindings that I'm used to. For instance, "gf" in Evil opens the file under the cursor, while "gf" in Helm means "find a file". So I uncommented Helm in my config file, but I'd like to use it. Do you have a solution how to prevent it from stealing key bindings? In my config file I also changed the order of imports (first Helm then Evil, then vice versa) but it didn't help.

Thanks,

Laszlo
_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
David Nebauer | 18 Oct 10:33 2014

T, t, F, f operators crash into debugger

When vim operators T, t, F and f fail in vim because the target cannot 
be found, it triggers an error which sounds a bell, but otherwise does 
not interrupt editing.

In evil, on the other hand, when T, T, F and f operators fail in evil 
they cause the debugger to open in another buffer with the lisp error 
"Can't find X" where X is the target character.

To an emacs/evil newcomer like me it seems a predictable error like this 
should not cause code execution to crash and invoke the debugger. My 
naive suggestion would be that it should indicate an error (perhaps 
using the system bell or returning an error message in the minibuffer) 
but continue running without crashing in to the debugger.

I accept that it takes only the press of the 'q' button to close the 
debugger and return to editing. Nonetheless, that is one button more 
than vim. Further, because I associate the debugger with a program 
crash, every time T, t, F or f fail in evil I am briefly jarred out of 
my editing mindset.

Is there any way to prevent a failed F, f, T or t operation from 
crashing and invoking the debugger?
David Nebauer | 15 Oct 16:17 2014

Re: Search for selected text

>    (define-key evil-ex-search-keymap "\C-r" 'evil-paste-from-register)
>    (define-key evil-visual-state-map "/" "y/\C-r\"\C-m")

Thanks for the prompt answer. This solution provides precisely the same 
functionality as vim. Please keep up the excellent work.

Regards,
David.
David Nebauer | 14 Oct 15:30 2014

Search for selected text

There are a couple of handy shortcuts in vim that allow you to highlight 
text and then hit '/' or '?' to search forwards or backwards for the 
next occurrence of the selected text. The mappings are:

vnoremap / y/<C-R>"<CR>

vnoremap ? y?<C-R>"<CR>

Is there any way to replicate this functionality in evil?
RC | 23 Sep 22:36 2014
Picon

Remap C-SPC binding

evil-mode seems to take over the C-w and C-SPC key bindings.
I was able to unbind C-w using the following commands, but C-SPC still 
seems bound in insert mode.

(eval-after-load "evil-maps"
  (dolist (map '(evil-motion-state-map
                 evil-insert-state-map
                 evil-emacs-state-map))
    (define-key (eval map) "\C-w" nil)))

(eval-after-load "evil-maps"
  (dolist (map '(evil-motion-state-map
                 evil-insert-state-map
                 evil-emacs-state-map
                 evil-insert-state-local-map ))
    (define-key (eval map) (kbd "C-SPC") nil)))

I am using emacs 24.3 and updated evil from MELPA.

Any suggestions to fix this will be appreciated.
Alan Schmitt | 23 Sep 19:29 2014

What is the best way to rebind common keys?

Hello,

I used evil a while back, but I stopped since the physical key positions
were not practical (I was using a dvorak layout then). I would like to
give evil a second try, but this time choosing my own keybindings
adapted to my current layout (bépo).

I thus have two questions.

1. Is there a summary of the default evil bindings, and the functions to
which they are bound?
2. What is the recommended way to change bindings? I looked at
http://www.emacswiki.org/emacs/Evil and it seems I could simply do
a "(define-key evil-normal-state-map … …)". Is there a better way?

Thanks,

Alan

--

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Nikolai Weibull | 19 Sep 22:01 2014
Picon

Mapping ( and ) in paredit mode

Hi!

I would like to map ( and ) as prefix keys to various other mappings
to paredit mode functions:

(evil-define-key 'normal paredit-mode-map
  "((" 'evil-paredit-backward-slurp-sexp
  "))" 'evil-paredit-forward-slurp-sexp
  ...)

This only works after a while for inexplicable reasons when you’ve
clicked around a bit and tried to execute a couple of mappings in a
buffer with Paredit enabled.  The problem is that ( is mapped to
backward-sentence in evil-motion-state-map, which seems to take
precedence.

How do I go about removing the mapping of ( to backward-sentence in
evil-motion-state-map for buffers that have Paredit enabled?

(I’m sure that this worked without any issues before, but I’ve changed
my configuration somewhat and now I get this weird behavior.)

Oh, using

     (define-key evil-normal-state-local-map "(("
'evil-paredit-backward-slurp-sexp)

seems to work.  So is that the preferred way of solving this situation?

_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Nikolai Weibull | 17 Sep 23:02 2014
Picon

define-key versus evil-define-key

Hi!

What’s the preferred way of adding keys to a given mode’s map?

Is

(define-key evil-motion-state-local-map "\C-b"
'calendar-scroll-right-three-months)

or

(evil-define-key 'motion calendar-mode-map "\C-b"
'calendar-scroll-right-three-months)

preferable?

(From an ease-of-use perspective, the second is better, as it allows
you to easily map more keys, but I’m wondering from a “the right way
to do it” perspective.)

_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Nikolai Weibull | 16 Sep 22:59 2014
Picon

Motion in grep-mode

Hi!

Why isn’t grep-mode’s bindings overriding those defined in
motion-state?  Since grep-mode is derived from compilation-mode, I’d
have thought that it’d work.

I’ve also tried

  (evil-set-initial-state 'grep-mode 'motion)

without success (even though (evil-motion-state-p) returns t).

_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Russell Dunphy | 14 Sep 00:17 2014

Evil-mode defining ex commands & redefining whole line commands (eg. dd)

Hi, new to Emacs (Evil-mode persuading me that it’s worth attempting the switch). Have a few questions.

I’m trying to get adhoc key mappings working as they would in vim. So for example if I open a new Clojure file I might want to quickly set up a mapping to run it. In vim this would be something like:

:map ,t :!lein exec %<CR>

Is there a way to implement the `map` ex command in evil-mode to make creating arbitrary, temporary mappings like this possible and easy?

Second question relates to trying to get evil-mode to play nicely with paredit. I’m using `evil-paredit-mode` which makes most things work, but whole line commands such as `dd` don’t seem to work, and I can’t work out how to rebind them. I’ve tried the following:

(evil-define-key 'normal evil-paredit-mode-map (kbd “dd”)
  (lambda () (move-beginning-of-line)
             (evil-paredit-delete-line))

But I get the error “key sequence dd starts with non-prefix key d”.

Thanks in advance for your help!

Russell
_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Gabriel Barta | 11 Sep 05:14 2014
Picon

evil-noautochdir : keeping the working directory the same as you work

Hi,

I disliked the emacs behaviour where the current directory would always be the
one containing the current file. So I wrote a bit of elisp to change it, named
according to the equivalent setting in Vim.  It actually leaves the emacs
behaviour unchanged for compatibility with vanilla Emacs packages, and instead
redirects evil to work with a different variable for the current directory. I
originally had something that controlled the emacs default-directory variable
instead, but the current approach gives a smoother experience.

I'd love to hear your feedback. The repo can be found at
https://github.com/gbarta/evil-noautochdir

I think it would be great to have this as part of Evil, but I am not sure if
anyone else is interested in this aspect of compatibility with Vim.  If you
are, let me know!

Gmane