💾 Archived View for bbs.geminispace.org › u › wasolili › 5485 captured on 2024-08-18 at 21:57:10. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-07-09)

➡️ Next capture (2024-08-31)

🚧 View Differences

-=-=-=-=-=-=-

Comment by 🐦 wasolili

Re: "Vim as an IDE"

In: s/vim

is that substitute call just to deal with characters that break the shell command? you may consider calling `shellescape` instead.

🐦 wasolili [flaired user]

2023-09-23 · 11 months ago

2 Later Comments ↓

🚀 stack [OP/mod] · 2023-09-23 at 16:43:

Hmm. What the heck does it substitute?

🐦 wasolili [...] · 2023-09-23 at 17:11:

the substitute function is replacing ' with '\''. shellescape will do basically the same thing, but will adjust how it escapes characters based on the shell you're using. so it will work with multiple different shells

echo system("tmux send-keys -t " . g:tmux_target . " " . shellescape(a:text))

Original Post

🌒 s/vim

Vim as an IDE — A combination of tmux and vim makes a minimal REPL IDE. I managed to cobble it together in a few minutes in spite of knowing nothing about vimscript and nearly nothing about tmux. My workflow is this: I open tmux and split it into at least two panes. The first one is where I run my Forth in, and according to tmux the pane is named '%0'. The second one is for vim. Now I need vim to send paragraphs of source into pane %0, as if they were typed. Tmux has a function 'send-keys'...

💬 stack [mod] · 3 comments · 4 likes · 2023-09-16 · 11 months ago