4 ms·
> my workflow consists of switching back and forth between a terminal window and an editor window. Same! I run neovim in tmux together with stuff I hack on. I
by st3fan 2y ago
> my workflow consists of switching back and forth between a terminal window and an editor window.
Same! I run neovim in tmux together with stuff I hack on. I switch beteen tmux windows with shift-arrows and it works so well. I run this full screen in Ghostty. No distractions.
I try Zed and VSCode and I always come back to this setup. It works so well for me personally.
- jaxtracks 2y agoYeah the tmux / vim combo is so hard for me to beat with other editors still. I used Zed exclusively last month thinking the LLM integrations would be a compelling enough reason to finally switch. Like the post author, I'm a little fatigued with config / plugin churn since I switch languages frequently and it always takes some customizing to make vim work well when I do that. As the author describes though, I found myself copy-pasting a lot between LLM chat and editing buffers. In tmux, I have a really simple function that copies select panes (using tmux capture-pane) into my prompt, or I can give it full files for context. Most of the time though, I can do something like `llm -t 0 -t 1 'what is this libSSL error indicating? here's my code', where -t 0 gives it my vim pane and -t 1 gives it the terminal I'm running things in. I've been surprised that this somewhat rudimentary approach has felt far more effective than the more sophisticated editors I've been trying. Is this just me? Does it seem to others that the LLM-enabled editors coming out these days still require a lot of copy-pasting of context that can be easily provided with just a dump of tmux output? Everything-is-just-text might be crude but dang does it make quick and dirty LLM integrations a snap!
- tcoff91 2y agocodecompanion.nvim has some pretty nice ways to get context into the llm chat without copying and pasting.
- clwg 2y agoI use tmux and neovim along with the copilot plugin[0]. I prefer it over the VSCode copilot integration, to me it feels less obtrusive and out of the way, which is what I want. You're also not dealing with API costs since it uses the regular Copilot subscription. [0] https://github.com/github/copilot.vim https://github.com/github/copilot.vim
- tomr75 2y agohave you tried cursor?
- airstrike 2y ago> I try Zed and VSCode and I always come back to this setup. I have Ctrl+` set to switch focus between the editor and the terminal panes in VSCode, so I can toggle between them pretty easily as this is also my workflow If anyone's wondering, here's what I have in my keybindings.json { "key": "ctrl+`", "command": "workbench.action.terminal.focus" }, { "key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus" },
- ttyprintk 2y agoI can’t tell if Ctrl-` is portable. Anyone know if it’s representable on terminals?
- wodenokoto 2y agoctr+` is the default behavior on VS Code I use it all the time and I didn’t set it up and I’m sure as hell neither did my co workers. It’s a nice short cut if you have a keyboard with backtick to the left of 1 in the numeral row. If you’re from a country where keyboards have a different key there, I would recommend setting up a short cut manually.
- dhruvrajvanshi 2y agoIt only opens the terminal by default. The key binding is to use the same shortcut to focus back to the editor.
- wodenokoto 2y agoIt does that by default too.
- airstrike 2y agoIt didn't when I set it up, but I haven't removed the keybindings to test if this has changed recently.
- 2y ago
- atarian 2y agoi had the same workflow but now i use zed w/ tmux (tmux inside the zed terminal)
- Arch-TK 2y agoI've always just closed vim to use the terminal, and started it up again to go back to editing. I find it difficult to operate any other way. I know people who use ^Z to suspend vim and then foreground it again.
- pugworthy 2y agoI’ve definitely done the ^Z thing. The catch is to remember you did it if you get distracted in the terminal. Nothing like finding some vim job in the background and you can’t remember what it was.
- o11c 2y agoFor me it only works because I never reuse a single terminal for unrelated things. Additionally, I have my virtual desktops grid set up so that different types of tasks are always in certain places, so if the switcher shows a terminal somewhere, I know roughly what it's for even without going to look at it. So I can't "lose" a terminal. So it's fine for X11 terminals, but not for /dev/tty2 Don't forget you can just :!some-shell-command though - not just in vim but in lots of programs even.
- theonething 2y ago> I've always just closed vim to use the terminal You don't mind losing all your editor state? If you don't like working with multiple terminal windows, why not open a term within vim with `:term`?
- carb 2y agoWhat editor state are you losing when you leave vim? I run a pretty light vanilla vimrc (60 lines maybe) and with two lines you can enable vim undofiles and returning the cursor to the last location upom reopening a file. For me, quitting vim is functionally equivalent to ^Z?
- deleted 2y ago[deleted]
- artemave 2y agoAnother (neo)vim+tmuxer chiming in. One major missing feature (compared to vscode) is opening file links from the terminal back in vim. It was such a major pain to me, so I ended up writing a tmux plugin to solve it. I thought you might find it useful - https://github.com/artemave/tmux_super_fingers https://github.com/artemave/tmux_super_fingers