Giter Club home page Giter Club logo

evil-escape's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

evil-escape's Issues

Bug with binding escape sequence to ht

I use a different keyboard layout (dvorak) and what would be jk in Qwerty is ht for me.

The documentation says h can be used to start the escape sequence, but after implemented, h no longer works to move left.

I'm fairly new to Github, and I've tried to find a similar issue but couldn't (although I've seen people complaining about this in the Spacemacs gitter), so if I missed it, I'm sorry.

evil-escape with `<ESC>`

For users that have <ESC> swapped with a more convenient key (e.g. Caps Lock) at the OS level and, in any event, for vi(m) users who have <ESC> firmly ingrained in their muscle memory, it would be handy if <ESC> behave as fd for the purposes of evil-escape.

Escape sequence for alternative input-method

I am using org-mode and would like to exit from insert mode by fd while my input-method is alternative. I'v tested russian escape sequence, but it doesn't work.

How to reproduce:

  1. Set (setq-default evil-escape-key-sequence "ав")
  2. Change input-method (set-input-method) to cyrilic-jis-russian
  3. Switch to insert mode, change input method by C-\ and try to exit by pressing keys fd (it will be ав in russian)

Probably there should be a way to define unique escape sequence for each language to make in infrequent.

I am still getting instances where evil-escape fails in python-mode

System Info

  • OS: darwin
  • Emacs: 24.5.7
  • Spacemacs: 0.105.0
  • Spacemacs branch: develop (rev. 3fb3877)
  • Distribution: spacemacs
  • Layers:
(unscroll auto-completion xkcd emacs-lisp git gtags dash yaml github javascript html markdown extra-langs python ruby org osx python django syntax-checking spell-checking version-control lua colors eyebrowse perspectives vimscript
          (c-c++ :variables c-c++-enable-clang-support t)
          (shell :variables shell-default-height 30 shell-default-position 'bottom))

I am using the default fd, with a delay of 0.2. I changed it to 0.2 trying to fix this problem, but it doesn't seem to have helped.

This usually happens when I press enter to go to another line and then immediately type fd. It's almost as if I'm typing it too quickly - like flycheck/flyspell are in the middle of rechecking the buffer, and during that time, I can type fd and it won't exit. I will have to retype it again, and then remove the fd:w that I inevitably end up typing.

It doesn't seem to be limited to flyspell/flycheck or auto-complete - if I turn them all off I can still get it to happen occasionally.

I haven't seen it happen in elisp mode, but I use that far less than python mode.

escape with kj

is there an inherent reason why evil-escape doesn't support movement keys? i am using vim/evil for years and this key combo is the most efficient i found yet.

evil-escape stops working after evil-repeat with jk

I'm using 'jk' as the escape sequence. When using evil-repeat directly after 'jk', I have to reload evil-escape-mode for it to work again. Steps to reproduce this are:

ijk.ijk

The second jk will not escape insert mode.

I tested this with 'fd' as well and the same thing happens.

Make an inclusion mode list instead of exclude.

In most cases, I only want to escape from insert-mode, emacs-mode, and ex-mode. Is it possible to make only those modes escaped with the current system? I understand we are also allowing escape from multiple packages that use motion state, but it slows down motion when using existing movement sequences (like "j" and "k").

I try to overwrite j and k in those modes, but certain modes using normal-state or motion-state are still escaped (dired / undo-tree).

  (define-key evil-normal-state-map "j" 'evil-next-line)
  (define-key evil-normal-state-map "k" 'evil-previous-line)
  (define-key evil-motion-state-map "j" 'evil-next-line)
  (define-key evil-motion-state-map "k" 'evil-previous-line)
  (define-key evil-visual-state-map "j" 'evil-next-visual-line)
  (define-key evil-visual-state-map "k" 'evil-previous-visual-line)

void-function reduce

Recent code change introduced a dependency on cl.el (the function reduce), but you didn't add a require.

To reproduce:

  1. $ emacs -Q -L ~/path/to/evil-directory/ -l ~/path/to/evil-escape.el
  2. M-x evil-mode
  3. M-x evil-escape-mode
  4. enter insert state, type fd
    Result: I'm still in insert state, the messages buffer says: Error in pre-command-hook (evil-escape-pre-command-hook): (void-function reduce)

evil-escape doesn't work in ibuffer

evil-escape in ibuffer gives the error message:

evil-escape: Wrong type argument: commandp, ibuffer-quit

it should probably use quit-window instead of ibuffer-quit.
Emacs uses quit-window to quit ibuffer.

Another error in pre-command-hook: wrong number of arguments

To reproduce:

  1. $ emacs -Q -L ~/path/to/evil-directory/ -l ~/path/to/evil-escape.el
  2. M-: (require 'cl) (because of #42)
  3. M-x evil-mode
  4. M-x evil-escape-mode
  5. enter insert state, type fd
    Result: I'm still in insert state, the messages buffer says: Error in pre-command-hook (evil-escape-pre-command-hook): (wrong-number-of-arguments (lambda (x y) (or x y)) 0)

line selection bug

Selecting a line by pressing V and then pressing j to select a second line does not work anymore (since the 11/19 release, as far as I can tell); the cursor briefly moves downward and then quickly jumps back into the first line. I am using "jk" as an escape key replacement, must be related to that (the error doesn't show up using the default "fd" setup).

evil-escape doesn't play nicely in terminal with some latin characters

When running in a terminal evil-escape is causing some non-escape-sequence combinations to behave badly.

With evil-escape turned on (i.e. evil-escape-inhibit is set to nil):

  • fd -> ESC
  • -> fÃ\266

When I turn off evil-escape (i.e. evil-escape-inhibit is set to t) I don't see this behaviour.

Emacs 24.5 on Archlinux, with Spacemacs (develop branch). I'm running Emacs in a Gnome Terminal when I see this behaviour, I've not checked it in any other terminal, and I never see it in the X Window.

how can I use 'jj' to replace <esc> only in insert-state

now I have set

(setq-default evil-escape-key-sequence "jj")

but I have some trouble in visual-state and neotree,I could't use 'j' to choice a file quickly.when I select text in visual-state,I need to wait a few second to select next line.

<kbd>f</kbd> doesn't work in `magit-log-mode`

I understand that fd shouldn't shadow f, and the function usually bound to f should be executed after a delay, which is 0.1 seconds by default.

However, in magit-log-mode I can't trigger magit-fetch-popup with evil-escape active.

(I'm using spacemacs. Which is great! Thank you for it! I'm seeing the elisp light after vimscript darkness.)

Error on pressing 'f' in insert mode

When I press f key in insert mode, I get:
Symbol's value as variable is void: hl-line-mode.
If hl-line-mode is enabled, all works as expected.
Probably it broke after this commit: e556c7a

"j is undefined" with new version

With a bare-bones Emacs installation (started with -Q) and just evil and evil-escape loaded, the new version seems to be broken. I can't get an escape sequence of jk to work, but anything else, e.g., io works. Using j in normal mode just gives me j is undefined.

Add support for multiple evil-escape-key-sequences

This is just a minor request: as a vimmer using jk as an escape sequence, it would be very helpful to allow defining multiple evil-escape-key-sequences that would ease the transition to the Spacemacs's default fd.

Changing the evil-escape-key-sequence was one of the first things I've learned and done after starting Spacemacs. As I leaned more into Spacemacs spc prefix combined with spc f s I felt tempted to give a 2nd chance to fd. As a newbie, going the key-chord route sounds a bit scary/too complicated (maybe because what I have read was not very conclusive)

_Note: originally reported syl20bnr/spacemacs#5445 and with a workaround based on key-chord.

evil-escape confuse evil's minibuffer echo system

To reproduce:

Start emacs with a very simple .emacs such as:

(require 'evil)
(require 'evil-escape)
(evil-mode)
(evil-escape-mode)
  1. Open a file and keep evil in normal state.
  2. Press "1" and wait a second for the "1" is echoed in minibuffer.
  3. Press "1" again. This time, there will be "1 1 1" (mis)displayed in minibuffer instead of "1 1".

Symbol's value as variable is void: isearch-abort

The package seems to load and work OK but should I worry about this warning:

Warning (initialization): An error occurred while loading `/Users/fintel/.emacs.d/init.el':
Symbol's value as variable is void: isearch-abort

To ensure normal operation, you should investigate and remove the cause of the error in your initialization file.  Start Emacs with the `--debug-init' option to view a complete error backtrace.

? Kind of annoying to be dropped into a warning window.

evil-escape doesn't seem to work in evil-replace-state

Very easy to reproduce in Spacemacs:

  • in normal mode, hit R to enter replace mode
  • try to escape by hitting fd
  • characters "fd" get typed, still in replace mode
  • need to hit ESC or Ctrl-[ to truly escape

I had a quick go at adding this to evil-escape.el, but it didn't seem to work:

;; replace-state
(eval `(evil-escape-define-escape "replace-state" evil-replace-state-local-map abort-recursive-edit
                                :insert-func evil-escape--default-insert-func
                                :delete-func evil-escape--default-delete-func))

evil escape broken by macros and some modes

When playing back a macro with , if the evil escape sequence occurs in the macro then evil-escape stops working. I can restore evil-escape by calling the function (evil-escape--define-keys).

This also seems to happen occasionally when switching to/fro the emacs state in some buffers with . This seems to happen the most with terminal-like modes such as ielm, multi-term, and python-shell. I'm not sure of the exact circumstances that cause this to happen so I can't reproduce the problem. Likewise, I can restore functionality with (evil-escape--define-keys).

I'm aware that the README mentions that using evil-escape during macro definition is not supported but I'm not sure this behaviour is expected. Muscle memory causes me to tend to use the evil-escape while defining macros, so it would be nice if simply didn't work instead of "breaking" evil-escape.

Do you think it would be possible to eliminate this behaviour? If you don't want to change it, could you suggest a hook I could add (evil-escape--define-keys) to so that it will be automatically called as needed?

Support reversed key sequence

I use jk as my sequence, but I hit kj about 20% of the time. A feature to support a reversed key sequence would be really handy.

Allow multiple key sequences

Would it be possible to specify multiple key sequences? That way I could use both "jk" and "kj" and not have to think so much about the order I press them in.

Can't use "C-c C-g" to escape

The following code should reproduce the problem.

(setq-default evil-escape-key-sequence "C-c C-g")
(require 'package)
(add-to-list 'package-archives '("MELPA" . "http://melpa.org/packages/"))
;; M-x eval-buffer
;; M-x package-install RET evil-escape
;; M-x evil-mode
;; M-x evil-escape-mode
;; now try "C-c C-g" from either normal or insert mode. I expect you to see "C-c C-g is undefined" in the minibuffer.

How do I completely disable the escape sequence for evil-escape?

Hello, my current configuration (in spacemacs) is

  (global-set-key (kbd "C-f") 'evil-escape)
  (setq-default evil-escape-key-sequence "qq")

I would like to remove the second line and completely disable the key-sequence.

I have tried "" and nil -- both of which cause problems in the command buffer, where I am getting errors like evil-escape: Error (wrong-type-argument characterp nill)

How can I completely disable evil-escape?

Suggestion: Make some uses of evil-escape optional

Just a thought I had. I think the typical thing to do in vim would be

imap fd <Esc>

which is actually pretty limited compared to what evil-escape tries to accomplish. What do you think about offering the option of specifying the states you want to escape from and then ignoring anything not in that list? You could still have the current behavior as default, but for someone like me I think being able to specify the situations I want to use evil-escape in would help me better predict its behavior.

Leaves first key in multi-term

If I'm in insert mode in a multi-term buffer, escaping with fd works and doesn't leave any visible letters. However, if I reenter insert mode and type a letter (for example, a), the output is fa, showing that the f from the previous escape was left behind.

Diagram (| is cursor in insert mode, _ is curser in normal mode):

>|
-- fd
>_
-- i
>|
-- a
>fa|

`k` is not fine to use

I've been trying to use kj as an esc sequence today and it hasn't been working.

Things seem to run slower in general, and it has maimed the functionality of the k key.

I can't use 8k for example.

There is a lag if I press k

Debugger entered Lisp error: (void-variable isearch-abort)

I can't activate this setting at startup because of this error. But if I activate it with M-x I get this in the * Messages * buffer::

Debugger entered--Lisp error: (void-variable isearch-abort)
evil-escape--define-keys()
evil-escape-mode()
eval((evil-escape-mode) nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
#(eval-last-sexp nil nil)
ad-Advice-call-interactively(# eval-last-sexp nil nil)
apply(ad-Advice-call-interactively # (eval-last-sexp nil nil))
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)

However after this error the mode works as expected or it seems to. Don't know what's wrong I want to just enable it by default on startup.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.