A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/wyuenho/move-dup below:

wyuenho/move-dup: Emacs minor mode for Eclipse-like moving and duplications of lines or selections with convenient key bindings.

Minor mode for Eclipse-like moving and duplicating lines or rectangles.

This package offers convenient editing commands much like Eclipse's ability to move and duplicate lines or selections.

Courtesy of bg.jheng

This package offers convenient editing commands much like Eclipse's ability to move and duplicate lines or rectangular selections.

If you aren't using package.el or plan to customize the default key-bindings, you need to put move-dup.el into your Emacs' load-path and require it in your Emacs init file; otherwise you can skip this part.

If you don't want to toggle the minor mode, you can bind these functions like so. All of these functions work on a single line or a rectangle.

(global-set-key (kbd "M-<up>") 'move-dup-move-lines-up)
(global-set-key (kbd "M-<down>") 'move-dup-move-lines-down)
(global-set-key (kbd "C-M-<up>") 'move-dup-duplicate-up)
(global-set-key (kbd "C-M-<down>") 'move-dup-duplicate-down)

If you used package.el to install move-dup, this is equivalent to all of the above.

If you are using package.el you can rebind default key-bindings the following way.

(use-package move-dup
  :bind (("M-p"   . move-dup-move-lines-up)
         ("C-M-p" . move-dup-duplicate-up)
         ("M-n"   . move-dup-move-lines-down)
         ("C-M-n" . move-dup-duplicate-down)))

Beware that this way you have to map all the key-bindings you need, not just the ones you'd like to remap.

You can also turn on move-dup-mode individually for each buffer.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4