Git Product home page Git Product logo

dired-dragon's Introduction

dragon bindings for dired

Have you every needed to drag and drop something but then realised that you have to open a shudders non-Emacs file manger? Well not anymore! This package adds bindings for dragon so that you can live in Emacs a little more!

Do note that dired already acts like a sink in normal use so I won’t add dragon functionality for that. It’s a “why add an extra step” sort of thing.

Table of Contents

In-File Commands

These commands are the original work of @ymarco. Thanks! This set of commands allow you to drag the current buffers file or if your in an org / latex buffer to drag the corresponding pdf file by applying the universal argument or adding a bang to the end of the ex command. This can also be toggled to drag the pdf by default if dired-dragon-drag-pdf-by-default is non nil

CommandUseFlagRequires
:dragan evil ex command to drag the current buffer and quit-xevil
:drag!the bang equivelent of :drag-xevil
dired-dragon-current-filea vanilla version of the :drag command-xNothing

In-Dired Commands

These commands are meant to be used in dired.

CommandsUseFlag(s)
dired-dragonThe Default, drags all and closes after one drop-x -a
dired-dragon-individualwindow stays open and you can drag all the files
dired-dragon-stayAll files will be dropped into the same place but the window will stick around-a

Installation

Straight

(use-package dired-dragon
  :straight (:host github
             :repo "jeetelongname/dired-dragon")
  :after dired)

Doom

;; packages.el
(package! dired-dragon :recipe (:host github
                                :repo "jeetelongname/dired-dragon"))
;; config.el
(use-package! dired-dragon
  :after dired)

Configuring

Variables

if you are on a distro that names dragon differently cough arch then you can change the variable dired-dragon-location to the name and or location of your choice

(setq dired-dragon-location (executable-find "the name of the executable"))
;; using executable find is a little better as it does not hard code the location
;; but this is optional, just provide it with a full path (eg /usr/bin/dragon)

Some pre-made configurations

Doom Emacs

If you are a doom emacs user (like me) then this snippet will help

;; config.el
(use-package! dired-dragon
  :after dired
  :config
  (map! :map dired-mode-map
        (:prefix "C-s"
         :n "d" #'dired-dragon
         :n "s" #'dired-dragon-stay
         :n "i" #'dired-dragon-individual)))

Vanilla

This should be a copy and paste affair but I don’t use vanilla extensively

(use-package dired-dragon
  :straight (:host github
             :repo "jeetelongname/dired-dragon")
  :after dired

  ;; if you use use-package for bindings
  :bind (:map dired-mode-map
         ("C-d d" . dired-dragon)
         ("C-d s" . dired-dragon-stay)
         ("C-d i" . dired-dragon-individual))

  ;; if you don't
  (define-key dired-mode-map (kbd "C-d d") 'dired-dragon)
  (define-key dired-mode-map (kbd "C-d s") 'dired-dragon-stay)
  (define-key dired-mode-map (kbd "C-d i") 'dired-dragon-individual))

Contributing

Issue’s are welcome! Pull requests as well. This is my first “formal” package so any pointers would be appreciated

dired-dragon's People

Contributors

jeetelongname avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mjkalyan gvalson

dired-dragon's Issues

void-variable dired-dragon-ex-drag-file

When trying to invoke dired-dragon in a dired buffer, I get the error:

Debugger entered--Lisp error: (void-variable dired-dragon-ex-drag-file)
  #f(compiled-function () #<bytecode -0x14419903c8db36c5>)()
  eval-after-load(evil #f(compiled-function () #<bytecode -0x14419903c8db36c5>))
  byte-code("\300\301\302\"\210\303\304!\207" [eval-after-load evil #f(compiled-function () #<bytecode -0x14419903c8db36c5>) provide dired-dragon] 3)

I understand the bytecode part is not very useful, but I haven't been able to find a good way to display the stack trace.

I am using doom emacs on arch.

This is a dummy

this was a test by me to get me comfortable using forge. Now I never have to
leave emacs! Menical Laughing

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.