diff --git a/README.md b/README.md index e09f3b5..f5b73f5 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/). For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter). -_1720 TILs and counting..._ +_1721 TILs and counting..._ See some of the other learning resources I work on: @@ -158,6 +158,7 @@ If you've learned something here, support my efforts writing daily TILs by ### Claude Code +- [Allow Edits From The Start](claude-code/allow-edits-from-the-start.md) - [Monitor Usage Limits From CLI](claude-code/monitor-usage-limits-from-cli.md) - [Open Current Prompt In Default Editor](claude-code/open-current-prompt-in-default-editor.md) diff --git a/claude-code/allow-edits-from-the-start.md b/claude-code/allow-edits-from-the-start.md new file mode 100644 index 0000000..c9da9fb --- /dev/null +++ b/claude-code/allow-edits-from-the-start.md @@ -0,0 +1,35 @@ +# Allow Edits From The Start + +A common pattern for me when using Claude Code is that I start it up in a +project, I prompt it with a question or feature spec, it either comes up with a +plan or just starts working, and as soon as it is ready to make its first edits +to a file, it prompts me something like: + +``` + Do you want to make this edit to Taskfile.yml? + ❯ 1. Yes + 2. Yes, allow all edits during this session (shift+tab) + 3. Type here to tell Claude what to do differently +``` + +That's a nice default so that I don't get surprised by Claude Code editing a +bunch of files. + +However, if I'm in a git-backed project and I'm going into a session intending +to make edits, then I can skip the formalities. I can tell Claude Code when +starting up the session that edits are allowed. + +```sh +$ claude --permission-mode acceptEdits +``` + +When I do this, I'll see the following indicator below the prompt input field: + +``` + ⏵⏵ accept edits on (shift+tab to cycle) +``` + +If I've already started `claude` but I forgot to specify that permission mode, I +can also toggle right into _accept edits_ by hitting `Shift+Tab`. + +[source](https://www.youtube.com/watch?v=_IK18goX4X8)