From 486a6ef5a9faa6464fd27a7d31ee20d5db70e0aa Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Tue, 18 Nov 2025 12:54:50 -0600 Subject: [PATCH] Add Open Current Prompt In Default Editor as a Claude Code TIL --- README.md | 7 ++++++- .../open-current-prompt-in-default-editor.md | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 claude-code/open-current-prompt-in-default-editor.md diff --git a/README.md b/README.md index c6f9e8c..377707c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186). -_1693 TILs and counting..._ +_1694 TILs and counting..._ See some of the other learning resources I work on: @@ -31,6 +31,7 @@ If you've learned something here, support my efforts writing daily TILs by * [AWS](#aws) * [Brew](#brew) * [Chrome](#chrome) +* [Claude Code](#claude-code) * [Clojure](#clojure) * [CSS](#css) * [Deno](#deno) @@ -154,6 +155,10 @@ If you've learned something here, support my efforts writing daily TILs by - [Trigger Commands From The Devtools Command Palette](chrome/trigger-commands-from-the-devtools-command-palette.md) - [View Network Traffic For New Tabs](chrome/view-network-traffic-for-new-tabs.md) +### Claude Code + +- [Open Current Prompt In Default Editor](claude-code/open-current-prompt-in-default-editor.md) + ### Clojure - [Aggregation Using merge-with](clojure/aggregation-using-merge-with.md) diff --git a/claude-code/open-current-prompt-in-default-editor.md b/claude-code/open-current-prompt-in-default-editor.md new file mode 100644 index 0000000..bd043a8 --- /dev/null +++ b/claude-code/open-current-prompt-in-default-editor.md @@ -0,0 +1,15 @@ +# Open Current Prompt In Default Editor + +[Claude Code](https://www.claude.com/product/claude-code) gives you a single +line to write a prompt. You can write and write as much as you want, but it will +all be on that single line. And avoid accidentally hitting 'Enter' before you're +done. + +I found myself wanting to space out my thoughts, create a code block as part of +a prompt, and generally have a scratch pad instead of just a text box. By +hitting `ctrl-g`, I can move the current prompt into my default editor (in my +case, `nvim`). From there I can continue to write, edit, and format with all the +affordances of an editor. + +Once I'm done crafting the prompt, I can save (e.g. `:wq`) and Claude Code will +be primed with that text. I can then hit 'Enter' to let `claude` do its thing.