Giter Site home page Giter Site logo

Comments (5)

jdtsmith avatar jdtsmith commented on June 20, 2024 1

You can easily remove those overwrites, like this:

  :bind (:map combobulate-key-map
	      ("M-<left>" . nil)
	      ("M-<right>" . nil))

For deeper key bindings I sometimes use this function from tarsius, which works for direct keymaps and sub-maps too:

(defun my/remove-key (keymap key)
  (define-key keymap key nil)
  (setq key (cl-mapcan (lambda (k)
                         (if (and (integerp k)
                                  (/= (logand k ?\M-\^@) 0))
                             (list ?\e (- k ?\M-\^@))
                           (list k)))
                       key))
  (if (= (length key) 1)
      (delete key keymap)
    (let* ((prefix (vconcat (butlast key)))
           (submap (lookup-key keymap prefix)))
      (delete (last key) submap)
      (when (= (length submap) 1)
        (remove-key keymap prefix)))))

On the topic of structural editing UI, I found this article quite compelling. It advocates for structure editing packages to provide composable functionality that can be mixed and matched, so you can build your own kind of simple modal interface if desired.

from combobulate.

jdtsmith avatar jdtsmith commented on June 20, 2024

It's easy enough to rebind keys, but I agree. M-left/right are especially problematic, as those are by default bound to left/right-word, very common commands. I also think there's the kernel of a great modal interface already here, e.g. M-h gets you in the door, and then various other single keys could move, duplicate, etc.

from combobulate.

SKyletoft avatar SKyletoft commented on June 20, 2024

The issue isn't rebinding later, is that it overwrites a bunch of binds on load

from combobulate.

ratnesh1729 avatar ratnesh1729 commented on June 20, 2024

Is there a way I can rebind the keys ..
I am trying something like this as I posted here for my need. But is not working - meaning I press anything apart from M-h the control goes back to which-key, and by pressing M-h it comes back.
But I wanted to use M-c for shrinkage effect in expand region

(use-package combobulate
  :after python-ts-mode
  :ensure quelpa
  :quelpa (combobulate :repo "mickeynp/combobulate" :fetcher github)
  :bind (:map combobulate-proffer-map
              ("M-c" . prev))
  ;;(define-key combobulate-proffer-map (kbd "<backtab>") 'prev)
  )

from combobulate.

mickeynp avatar mickeynp commented on June 20, 2024

Perhaps which-key interferes with the proffer ui?

from combobulate.

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.