0

I am using iTerm2, which is working well for me. I've been using VIM for almost 2 years now, with MacVim. Then suddenly I became curious whether my coding experience will improve when I use terminal inside VIM, rather than using 2 separate apps.

  • 1
    I see you've used the tag <gvim> for your question. gvim display isn't embedded in a terminal. However, we can have a :terminal in a gvim session. – Luc Hermitte Mar 6 at 11:49
  • I think MacVim is a gui vim, so I added it. I removed all the gui stuff like this: if has('gui_running') set guioptions -=T set guioptions -=m set guioptions= endif The only feature I like is the ability to use the trackpad, thus MacVim. – Noel Pure Mar 7 at 5:56
  • 1
    Since it is about to be closed, I will make the argument that it is not necessarily opinion-based, since there might be objective benefits. I don't see how it is different from discussing using autocmd/ syntax files or something like this. – eyal karni Mar 9 at 10:33
1

I agree any answer to this question will be somehow subjective, but I also agree with Eyal Karin that there may be an objective component too. I've been using the Neovim terminal as my main terminal for at least two years now, maybe more, even while SSH to a remote machine, and despite its rough edges, I cannot go back to a dedicated one, not because my coding experience improved, but my terminal experience is better:

  1. I have all motion and operators to navigate the terminal output and yank text. I can navigate and operate on windows using Vim's default mappings. I can use BRE to search the buffer, and I can jump to a specific file with gf from the output of a compiler or Git or other tool 💜
  2. It is easier to get everything to look and feel the same. Same colour schemes, same status line, same custom mappings
  3. Vim's plugins may make sense in the terminal too. I started to use EasyMotion again, mainly to jump to far lines without needing number lines and it's so cool I can use it in the terminal too

I think all of the above are "objective" advantages, even when some people don't consider them that important. I know tmux users with big configurations won't switch, and it's understandable. Is up to you to decide, and it doesn't hurt to try, even when running it inside Vim inside iTerm may feel a bit redundant (that's what I do and feels that way).

As I mentioned before, Neovim's terminal has some rough edges (for example text may disappear from the buffer if the window width is reduced, this is a really ugly one), but the previous features overweight them IMHO.

Keep in mind that Vim's implementation is different. I don't know how they compare. Probably you can do with it all that I mentioned, and maybe it has less bugs

| improve this answer | |
  • 1
    FWIW, I'm a tmux user. My conf is a minimal statusline w/colors, a bunch of "make tmux more like vim" key-bindings, and that's about it. I bounce back and forth between tmux sessions/windows/panes and vim's builtin terminals. It's a complex flow, but I tend to think of tmux sessions as projects and windows like workspaces (i.e., tmux is for long-running stuff). I use vim terminals for quick REPLs (vim-simple was written for the job) and shells. I let build systems integrate with quickfix lists for compile/test output. – D. Ben Knoble Apr 22 at 16:22
  • You are right with #1 as I've tried it for a while. But its also easy for me to copy the output in iTerm and paste it in Vim for easy searching and movement stuff. I still cannot find enough reason to use vim terminal. Thanks for the answers. – Noel Pure Apr 23 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.