[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/aidermacs 2894f82973 008/466: feat: add key bindings and f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/aidermacs 2894f82973 008/466: feat: add key bindings and function to drop current file in Aider buffer |
Date: |
Sat, 15 Mar 2025 19:10:04 -0400 (EDT) |
branch: elpa/aidermacs
commit 2894f82973d926c5866464f3e2eaf8f2e1e28c06
Author: Kang Tu <kang_tu@apple.com>
Commit: Kang Tu (aider) <kang_tu@apple.com>
feat: add key bindings and function to drop current file in Aider buffer
---
aider.el | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/aider.el b/aider.el
index 49f3a723ba..43698b47aa 100644
--- a/aider.el
+++ b/aider.el
@@ -29,7 +29,9 @@
(define-key map (kbd "a") 'aider-run-aider)
(define-key map (kbd "z") 'aider-switch-to-buffer)
(define-key map (kbd "s") 'aider-add-current-file)
+ (define-key map (kbd "p") 'aider-drop-current-file)
(define-key map (kbd "c") 'aider-send-command)
+ (define-key map (kbd "d") 'aider-code-command)
(define-key map (kbd "q") 'aider-ask-question)
(define-key map (kbd "t") 'aider-architect-command)
(define-key map (kbd "e") 'aider-region-code-command)
@@ -50,8 +52,10 @@
("a" "Run Aider" aider-run-aider)
("s" "Add Current File" aider-add-current-file)
("z" "Switch to Aider Buffer" aider-switch-to-buffer)
+ ("p" "Drop Current File" aider-drop-current-file)
]
["Code change"
+ ("d" "Code Change" aider-code-command)
("e" "Region Code Change" aider-region-code-command)
("u" "Undo Last Change" aider-undo-last-change) ;; Menu item for undo last
change
]
@@ -139,6 +143,19 @@ COMMAND should be a string representing the command to
send."
;; Use the shared helper function to send the command
(aider--send-command command)))))
+;; New function to send "/drop <current buffer file full path>" to *aider*
buffer
+(defun aider-drop-current-file ()
+ "Send the command \"/drop <current buffer file full path>\" to the *aider*
comint buffer."
+ (interactive)
+ ;; Ensure the current buffer is associated with a file
+ (if (not buffer-file-name)
+ (message "Current buffer is not associated with a file.")
+ (let ((file-path (expand-file-name buffer-file-name)))
+ ;; Construct the command
+ (let ((command (format "/drop %s" file-path)))
+ ;; Use the shared helper function to send the command
+ (aider--send-command command)))))
+
;; Function to send a custom command to *aider* buffer
(defun aider-send-command (command)
"Prompt the user to input COMMAND and send it to the *aider* comint buffer.
- [nongnu] branch elpa/aidermacs created (now 61a23c7992), ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 9e85bd0ef9 001/466: Initial commit, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs fbb65068bd 004/466: update licence, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs dfbe5ba5fe 002/466: add aider.el, update comment, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs dcecb64edb 003/466: docs: add README.org with package description, installation, key functions, and usage, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 3fe513cfe0 005/466: update title, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 3b2730f8af 023/466: docs: update README title and remove outdated key functions section, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 2f3788f943 031/466: Merge branch 'main' of github.com:tninja/aider.el, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs fed1338c0d 007/466: fix: remove aider-drop-current-file function and its references, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 2894f82973 008/466: feat: add key bindings and function to drop current file in Aider buffer,
ELPA Syncer <=
- [nongnu] elpa/aidermacs 98350b79c4 011/466: fix: update key bindings and package description in aider.el, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 7dde4df91d 016/466: refactor: simplify keymap definition and enhance command handling in Aider module, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 85a6cda2f0 015/466: chore: bind aider-transient-menu to "C-c a" and remove all other shortcuts, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs b3ef6373bd 017/466: fix: ensure current file is added before sending command in aider-general-command, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs a8ebb012b1 019/466: fix: update aider-general-command to read command from user input correctly, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 30bebe63c7 022/466: fix comment, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs ed831d2463 024/466: docs: add advantages of aider.el over the command line to README.org, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs dffb71a146 027/466: update README and comment, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 7baeae4da3 028/466: upload png files, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 081f8e49b5 030/466: add gitignore, ELPA Syncer, 2025/03/15