branch: elpa/aidermacs commit ebe03e12c05a857bc2b91fdff32a9ef6cdceaf13 Author: tninja <tni...@gmail.com> Commit: tninja <tni...@gmail.com>
docs(readme): reorganize sections for better readability --- README.org | 96 +++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/README.org b/README.org index f56bf620ea..33f814ca24 100644 --- a/README.org +++ b/README.org @@ -9,58 +9,17 @@ - The `aider.el` package offers an interactive interface to communicate with Aider in Emacs. - Most of the Elisp code in this repository was generated by Aider or `aider.el`. -* Integrating aider with emacs coding context and UI +* Benefits: UI, context awareness, programming task support - Pop-up Menu: No need to remember commands. (aider-transient-menu) [[file:./transient_menu.png]] -- The following commands are integrated into the aider menu: +- Operate directly on the code without switching; git repo specific aider session for current file. -*** Aider session management: - - (`aider-run-aider`): Creates a comint-based, *git repo-specific Aider session* for interactive conversation. - - Git repository identification is based on the current file's path - - Multiple Aider sessions can run simultaneously for different Git repositories -When being called with the universal argument (`C-u`), a prompt will offer the user to change the content of `aider-args` for this session. - - (`aider-switch-to-buffer`): Switch to the Aider buffer. - - use "^" in the menu to toggle open aider session in other window inside current frame, or open a dedicate frame for aider session - -*** Model Selection: - - (`aider-change-model`): Interactively select and change AI model in current aider session - - Customize `aider-popular-models` to define your preferred models list. Default models are (as date of 2025-01-26): - - anthropic/claude-3-5-sonnet-20241022 (really good in practical) - - o3-mini (new released. very powerful, not expensive) - - gemini/gemini-exp-1206 (free) - - r1 (performance matches o1, price << claude sonnet. weakness: small context) - - deepseek/deepseek-chat (chatgpt-4o level performance, price is 1/100. weakness: small context) - -*** More ways to add files to the Aider buffer: - - use "@" in the menu to toggle add file between read-write mode and read-only mode - - (`aider-add-current-file`): Add the current buffer file. - - (`aider-add-files-in-current-window`): Add all buffers in the current window. - - (`aider-add-same-type-files-under-dir`): Add all files with the same suffix as the current file under the current directory to Aider. - - (`aider-batch-add-dired-marked-files`): Add multiple Dired marked files to the Aider buffer. - -*** Write code: - - (`aider-function-or-region-refactor`): If a region is selected, ask Aider to refactor the selected region. Otherwise, ask Aider to change / refactor the function under the cursor. - - *(`aider-implement-todo`): Implement requirement in comments in-place, in current context.* - - If cursor is on a comment line, implement that specific comment in-place. - - If there is a selection region of multi-line comments, implement code for those comments in-place. - - If cursor is inside a function, implement TODOs for that function. - - Otherwise implement TODOs for the entire current file. - -*** Explain code: - - (`aider-ask-question`): Ask Aider a question about the code in the current context. If a region is selected, use the region as context. - - (`aider-function-or-region-explain`): If a region is selected, ask Aider to explain the selected region. Otherwise, ask Aider to explain the function under the cursor. - - (`aider-explain-symbol-under-point`): Ask Aider to explain the symbol under cursor, given the line as context. - -*** Support for Unit Test / Test Driven Development: - - (`aider-write-unit-test`): Generate comprehensive unit tests for the current function or file. If the cursor is on a test function, implement the test function. - - (`aider-fix-failing-test-under-cursor`): Place cursor on a failing test function and ask Aider to analyze and fix the code to make tests pass. - -*** And More: -You can add your own Elisp functions to support your specific use cases. Feel free to ask Aider/`aider.el` to help you create them. +- Send the context of emacs editing to aider, for example, which function or class is concerned about now? What are currently selected? This will allow the user to type less keyboard. +- Aimed at daily application tasks that programmers are concerned about. For example, how to add/modify code with AI; how to test the correctness of AI code; how to read other people's code. * Installation @@ -171,6 +130,53 @@ You can enable Helm-based completion with the following code: (aider-minor-mode 1)))) #+END_SRC +* Most used features (integrated into the aider menu) + +*** Aider session management: + - (`aider-run-aider`): Creates a comint-based, *git repo-specific Aider session* for interactive conversation. + - Git repository identification is based on the current file's path + - Multiple Aider sessions can run simultaneously for different Git repositories +When being called with the universal argument (`C-u`), a prompt will offer the user to change the content of `aider-args` for this session. + - (`aider-switch-to-buffer`): Switch to the Aider buffer. + - use "^" in the menu to toggle open aider session in other window inside current frame, or open a dedicate frame for aider session + +*** Model Selection: + - (`aider-change-model`): Interactively select and change AI model in current aider session + - Customize `aider-popular-models` to define your preferred models list. Default models are (as date of 2025-01-26): + - anthropic/claude-3-5-sonnet-20241022 (really good in practical) + - o3-mini (new released. very powerful, not expensive) + - gemini/gemini-exp-1206 (free) + - r1 (performance matches o1, price << claude sonnet. weakness: small context) + - deepseek/deepseek-chat (chatgpt-4o level performance, price is 1/100. weakness: small context) + +*** More ways to add files to the Aider buffer: + - use "@" in the menu to toggle add file between read-write mode and read-only mode + - (`aider-add-current-file`): Add the current buffer file. + - (`aider-add-files-in-current-window`): Add all buffers in the current window. + - (`aider-add-same-type-files-under-dir`): Add all files with the same suffix as the current file under the current directory to Aider. + - (`aider-batch-add-dired-marked-files`): Add multiple Dired marked files to the Aider buffer. + +*** Write code: + - (`aider-function-or-region-refactor`): If a region is selected, ask Aider to refactor the selected region. Otherwise, ask Aider to change / refactor the function under the cursor. + - *(`aider-implement-todo`): Implement requirement in comments in-place, in current context.* + - If cursor is on a comment line, implement that specific comment in-place. + - If there is a selection region of multi-line comments, implement code for those comments in-place. + - If cursor is inside a function, implement TODOs for that function. + - Otherwise implement TODOs for the entire current file. + +*** Explain code: + - (`aider-ask-question`): Ask Aider a question about the code in the current context. If a region is selected, use the region as context. + - (`aider-function-or-region-explain`): If a region is selected, ask Aider to explain the selected region. Otherwise, ask Aider to explain the function under the cursor. + - (`aider-explain-symbol-under-point`): Ask Aider to explain the symbol under cursor, given the line as context. + +*** Support for Unit Test / Test Driven Development: + - (`aider-write-unit-test`): Generate comprehensive unit tests for the current function or file. If the cursor is on a test function, implement the test function. + - (`aider-fix-failing-test-under-cursor`): Place cursor on a failing test function and ask Aider to analyze and fix the code to make tests pass. + +*** And More: +You can add your own Elisp functions to support your specific use cases. Feel free to ask Aider/`aider.el` to help you create them. + + * My personal development experience using aider.el - Here I just share my personal experience. You might have different / better way to use aider.el.