editprompt 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -120,7 +120,7 @@ While editprompt is running, you can send content to the target pane or clipboar
120
120
 
121
121
  ```bash
122
122
  # Run this command from within your editor session
123
- editprompt -- "your content here"
123
+ editprompt "your content here"
124
124
  ```
125
125
 
126
126
  This sends the content to the target pane (or clipboard) while keeping your editor open, so you can continue editing and send multiple times.
@@ -133,20 +133,21 @@ You can set up a convenient keybinding to send your buffer content:
133
133
  -- Send buffer content while keeping the editor open
134
134
  if vim.env.EDITPROMPT then
135
135
  vim.keymap.set("n", "<Space>x", function()
136
- vim.cmd("silent write")
136
+ vim.cmd("update")
137
137
  -- Get buffer content
138
138
  local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
139
139
  local content = table.concat(lines, "\n")
140
140
 
141
141
  -- Execute editprompt command
142
142
  vim.system(
143
- { "editprompt", "--", content },
143
+ { "editprompt", content },
144
144
  { text = true },
145
145
  function(obj)
146
146
  vim.schedule(function()
147
147
  if obj.code == 0 then
148
148
  -- Clear buffer on success
149
149
  vim.api.nvim_buf_set_lines(0, 0, -1, false, {})
150
+ vim.cmd("silent write")
150
151
  else
151
152
  -- Show error notification
152
153
  vim.notify("editprompt failed: " .. (obj.stderr or "unknown error"), vim.log.levels.ERROR)
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { promisify } from "node:util";
8
8
  import clipboardy from "clipboardy";
9
9
 
10
10
  //#region package.json
11
- var version = "0.5.0";
11
+ var version = "0.5.1";
12
12
 
13
13
  //#endregion
14
14
  //#region src/config/constants.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "editprompt",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "author": "eetann",
5
5
  "description": "A CLI tool that lets you write prompts for CLI tools using your favorite text editor",
6
6
  "license": "MIT",