Giter Club home page Giter Club logo

Comments (5)

Yevgnen avatar Yevgnen commented on July 24, 2024 2

Just curious, why not make dumb-jump-mode local minor mode?

from dumb-jump.

jacktasia avatar jacktasia commented on July 24, 2024

Absolutely. The easiest thing would be to just not use (dumb-jump-mode). All this mode does is activate the dumb-jump-mode-map with default bindings.

So instead just do something like this in your ~/.emacs:

(require 'dumb-jump)
(global-set-key (kbd "C-c ?") 'dumb-jump-go)

The interactive functions are: dumb-jump-go dumb-jump-back dumb-jump-quick-look

Alternatively, you could do something like this.

Please re-open if the above does not help.

from dumb-jump.

HeroInNoMan avatar HeroInNoMan commented on July 24, 2024

Great, thanks a lot. I just removed (dumb-jump-mode) from my config and added the desired key-bindings, works perfectly.
Thank you for the quick answer!

from dumb-jump.

jacktasia avatar jacktasia commented on July 24, 2024

Just curious, why not make dumb-jump-mode local minor mode?

@Yevgnen
I am not sure what you mean, but in practice this problem is solved by just defining the keybindings via use-package instead.

from dumb-jump.

Yevgnen avatar Yevgnen commented on July 24, 2024

@jacktasia Hi, I saw :global t where dumb-jump-mode is defined. Defining the keybindings via use-package is one of the solutions. But since dumb-jump-mode is global, it overwrites any other C-M-g, C-M-p and C-M-q defined in other minor modes. For example, I would like to use dump-jump-mode in python-mode, C-mode using the above key bindings, but not in java-mode, lua-mode. With dump-jump-mode enabled, the original key bindings in java-mode or lua-mode is overwritten. Personally, I prefer something like

(add-hook 'python-mode-hook #'dumb-jump-mode) ; local

to

(dump-jump-mode 1) ; global

from dumb-jump.

Related Issues (20)

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.