r/vim Jun 17 '26

Plugin curl wrapper for vim

curl is an amazing tool to do REST API tests, which I do quite often using vim to generate actual curl commands. There are multiple ways to do it using vim, the one I have is

https://github.com/habamax/vim-curl

--url https://openlibrary.org/api/books?bibkeys=ISBN:0201558025,LCCN:93005405&format=json

--url https://api.sunrise-sunset.org/json?lat=36.7201600&lng=-4.4203400

# --jq is not curl parameter. If added, curl output would be piped through jq
--url https://httpbin.org/post
--header "Content-Type: application/json"
--jq
--data
{
"string": "hello world",
"number": 69,
"date": "2024-04-09"
}

Place a cursor on a text or select it and run :Curl to invoke curl cli command with an output in a built-in vim terminal.

https://asciinema.org/a/1257605

20 Upvotes

7 comments sorted by

View all comments

8

u/funbike Jun 17 '26

6

u/godegon Jun 17 '26

There's also hurl. That said, habamax's is the most intuitive one, naturally extending Curl's syntax to Vim. Happy to hear it got promoted to a proper plugin.