GithubHelp home page GithubHelp logo

jump-char's Introduction

Why?

Navigate by char. The best way to “get” it is to try it.

Interface

Any other key stops jump-char and edits as normal.

keydoes
<char>move to the next match in the current direction.
;next match forward (towards end of buffer)
,next match backward (towards beginning of buffer)
C-c C-cinvoke `ace-jump-mode’ if available

C-c C-c switches to ace-jump-mode seamlessly.

The behaviour is strongly modeled after `iy-go-to-char’ with the following differences:

  • point always stays before match
  • point during search is same as after exiting
  • lazy highlighting courtesy of isearch

jump-char's People

Contributors

gcv avatar lewang avatar mgalgs avatar wilfred avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jump-char's Issues

Add avy support

Ace-jump-mode is unmaintained, and avy is a better alternative. Do you plan to add avy support? Thanks.

Advice feature. When run `set-mark-command`, open jump-char-forward.

I think this is a better idea, When I do set-mark-command, What I need often is
jump to line ending, next word, next-char, the most often used command is C-f
C-b, C-e. those on the fly work well when jump-char-mode is active!

It seem like we does not missing anythings, But, we could add more
jump to functionality, it cool!

here is some defadvice does this

(defadvice set-mark-command (after active-jump-char activate)
  (when (region-active-p)
    (call-interactively 'jump-char-forward)))

Thanks.

Stacktrace in latest Emacs

With the latest Emacs code from bzr, jump-char-forward produces a stacktrace. Perhaps something changed in isearch?

(github won't let me paste or gist the stacktrace because it contains control chars.)

Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
  (funcall (gethash (quote isearch-message-prefix) jump-char-store) _c-q-hack ellipsis nonincremental)
  (let ((msg (funcall (gethash (quote isearch-message-prefix) jump-char-store) _c-q-hack ellipsis nonincremental))) (setq msg (replace-regexp-in-string "\\`\\(.*?\\)I-search" "\\1jump-char" msg)) (propertize msg (quote face) (quote minibuffer-prompt)))
...
  jump-char-forward()
  call-interactively(jump-char-forward nil nil)

jump-char-exit with highlight-clearup

hi, i just wonder if you can add an option that when i exit jump-char, the highlight is also cleared up?

sometimes it is quite annoying with so many chars highlighted

i was trying to add a line to the end of the jump-char.el as:
(defun jump-char-exit ()
...
(interactive)
(isearch-exit)
(lazy-highlight-cleanup))

but seems it does not work,

can you help on this if you are not planning to add this option to jump-char?

thansk alot!

(void-function remap)

installed by el-get
jump-char version: ee17ee0
emacs-version: bzr 117019

Debugger entered--Lisp error: (void-function remap)
  remap(7 isearch-abort)
  map-keymap(remap (keymap #^[nil nil keymap 
#^^[3 0 nil nil nil nil nil nil nil isearch-abort (keymap (113 . help-quit) (109 . isearch-describe-mode) (107 . isearch-describe-key) (98 . isearch-describe-bindings) (63 . isearch-help-for-help) (f1 . isearch-help-for-help) (help . isearch-help-for-help) (8 . isearch-help-for-help)) isearch-printing-char isearch-printing-char nil nil isearch-exit nil isearch-occur nil isearch-quote-char isearch-repeat-backward isearch-repeat-forward nil nil nil isearch-yank-word-or-char (keymap (56 keymap (13 . isearch-char-by-name))) isearch-yank-kill nil (keymap (67108901 . isearch-query-replace-regexp) (37 . isearch-query-replace) (101 . isearch-edit-string) (114 . isearch-toggle-regexp) (99 . isearch-toggle-case-fold) (9 . isearch-complete) (121 . isearch-yank-pop) (112 . isearch-ring-retreat) (110 . isearch-ring-advance) (115 keymap (104 keymap (114 . isearch-highlight-regexp)) (111 . isearch-occur) (32 . isearch-toggle-lax-whitespace) (95 . isearch-toggle-symbol) (119 . isearch-toggle-word) (114 . isearch-toggle-regexp) (105 . isearch-toggle-invisible) (99 . isearch-toggle-case-fold) (101 . isearch-edit-string) (5 . isearch-yank-line)) (25 . isearch-yank-char) (23 . isearch-del-char) (27 keymap (27 . isearch-cancel)) (18 . isearch-repeat-backward) (19 . isearch-repeat-forward)) isearch-toggle-input-method nil isearch-toggle-specified-input-method nil isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char ...] #^^[1 0 #^^[2 0 
#^^[3 0 nil nil nil nil nil nil nil isearch-abort (keymap (113 . help-quit) (109 . isearch-describe-mode) (107 . isearch-describe-key) (98 . isearch-describe-bindings) (63 . isearch-help-for-help) (f1 . isearch-help-for-help) (help . isearch-help-for-help) (8 . isearch-help-for-help)) isearch-printing-char isearch-printing-char nil nil isearch-exit nil isearch-occur nil isearch-quote-char isearch-repeat-backward isearch-repeat-forward nil nil nil isearch-yank-word-or-char (keymap (56 keymap (13 . isearch-char-by-name))) isearch-yank-kill nil (keymap (67108901 . isearch-query-replace-regexp) (37 . isearch-query-replace) (101 . isearch-edit-string) (114 . isearch-toggle-regexp) (99 . isearch-toggle-case-fold) (9 . isearch-complete) (121 . isearch-yank-pop) (112 . isearch-ring-retreat) (110 . isearch-ring-advance) (115 keymap (104 keymap ...) (111 . isearch-occur) (32 . isearch-toggle-lax-whitespace) (95 . isearch-toggle-symbol) (119 . isearch-toggle-word) (114 . isearch-toggle-regexp) (105 . isearch-toggle-invisible) (99 . isearch-toggle-case-fold) (101 . isearch-edit-string) (5 . isearch-yank-line)) (25 . isearch-yank-char) (23 . isearch-del-char) (27 keymap (27 . isearch-cancel)) (18 . isearch-repeat-backward) (19 . isearch-repeat-forward)) isearch-toggle-input-method nil isearch-toggle-specified-input-method nil isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char ...] 
#^^[3 128 isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char ...] isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char] isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char] isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char isearch-printing-char ...] (33554441 . helm-swoop-from-isearch) (16777321 . helm-swoop-from-isearch) (down-mouse-2) (mouse-2 . isearch-mouse-2) (language-change) (mouse-movement) (make-frame-visible) (iconify-frame) (delete-frame) (switch-frame) (f1 keymap (113 . help-quit) (109 . isearch-describe-mode) (107 . isearch-describe-key) (98 . isearch-describe-bindings) (63 . isearch-help-for-help) (f1 . isearch-help-for-help) (help . isearch-help-for-help) (8 . isearch-help-for-help)) (help keymap (113 . help-quit) (109 . isearch-describe-mode) (107 . isearch-describe-key) (98 . isearch-describe-bindings) (63 . isearch-help-for-help) (f1 . isearch-help-for-help) (help . isearch-help-for-help) (8 . isearch-help-for-help)) (33554464 . isearch-printing-char) (return . isearch-exit) (backspace . isearch-delete-char)))
  byte-code("\306 \307\310���\311�\312\313\f\"\210)\314�!\211�\310�\211��\2038

Can't move with C-b with jump-char

It's possible to move forward from jump-char with C-f, but C-b gives isearch-edit-string: Command attempted to use minibuffer while in minibuffer.

Repeated calls to jump-char-forward don't reuse the search character

Given a buffer:

|foo=1 bar=2 baz=3

and jump-char configured as follows:

(global-set-key (kbd "M-m") #'jump-char-forward)

I press M-m = M-m. I expect my cursor to be moved to the second equals sign. However, on the second M-m I'm prompted again. The docstring says:

press current binding for jump-char-forward' /jump-char-backward' to reuse
last input.

so I would expect repeated presses of M-m to just search for = without prompting. Have I misunderstood?

`jump-char-backward` jumps to first of double character

When using jump-char-backward, point always jumps to the first of two adjacent matching characters. That is, if I have (with | indicating point):

choose your poison|

and then do M-x jump-char-backward and press o, point will (eventually) move to the first of the two o's in choose:

ch|oose your poison

Is this intentional? I'm asking because I often find I want to jump to the second occurrence, i.e.:

cho|ose your poison

On a more general note: why is the second occurrence skipped at all? Perhaps it would be useful to add an option controlling this behaviour? I wouldn't mind pressing the jump char (or ;) twice for adjacent matching chars if it means I have finer control over where point ends up.

PROVIDE should be at the end

(provide 'jump-char)

should be at the end of the Lisp code. This way, users will be able to customize the package with EVAL-AFTER-LOAD.

visible cursor repositioning

What I love about jump-char is that the cursor stays before the match. It wonderfully solves the major problem I had with iy-go-to-char. However, I'm having trouble tolerating the visible repositioning of the cursor. What I mean is that the cursor moves to the point after the matching character (as in iy-go-to-char) and then it moves the the previous point. That repositioning is visible to me and bothers me... would there be a way to solve this problem?

Lisp error

I keep getting "Lisp error: (wrong-number-of-arguments #[(&optional ellipsis nonincremental)" when I trigger jump-char-forward. This happens on both 24.3.1 and a very recent emacs snapshot.

What am I doing wrong?

react on prefix command for direction

Please react on prefix commands like C-- for direction of jump-char

working example code::

(defun jump-char-with-prefix ()
		"prefix decides direction of jump-char 'C--' for backward jumps"
		(interactive)
		(if (equal current-prefix-arg '-)
				(jump-char-backward nil)
			(jump-char-forward nil)))

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.