6 ms·
I've always been a little puzzled by people who use a file-drawer or file-list or similar addon with Vim, and I now I think I know why: I'm guessing most of the
by thristian 15y ago
I've always been a little puzzled by people who use a file-drawer or file-list or similar addon with Vim, and I now I think I know why: I'm guessing most of these people have Vim open as their One Tool, much like another programmer might have Xcode or Visual Studio open as their One Tool, and they want to get everything done in it.
At work, I usually have at least two windows open at all times: Vim full-screen on one monitor, a terminal full-screen on the other—or sometimes one terminal taking up most of the screen and another smaller terminal tailing a logfile. The Vim window gets used for editing (of course), the terminal is used for running test suites and exploring the codebase and finding and opening files in Vim. The reason I've never felt the need for a file-browser plugin in Vim is because I've always used Vim with an external file-browser. :)
If anyone's interested in opening files in an existing gvim window from the terminal, here's the script I use in Linux:
gvim -f --remote-tab-silent "$@" &
(I believe MacVim comes with a similar 'mvim' script you can use on OS X) If you don't want files to open in tabs, change "remote-tab-silent" to "remote-silent". If you call the script and there's no existing gvim window, a new one will be created.
- conradev 15y agoI do literally the exact same, I rock MacVim in fullscreen surrounded by Terminal sessions on the left and right, left for building/opening files, the right for tailing the syslog. If only Lion supported multiple monitor full screen.. :S
- jkreeftmeijer 15y agoIf you want the "old" MacVim fullscreen mode back (which supports multiple monitor full screen), just throw this into your terminal: defaults write org.vim.MacVim MMNativeFullScreen 0
- andrewvc 15y agoOr even alias vimtab="gvim -f --remote-tab-silent" in your .bashrc, .zshrc or equivalent
- Hoff 15y agoThe Mac OS X command open allows this directly: $ open -a macvim filename.ext which permits: $ alias mvim="open -a macvim" as a shortcut.
- thristian 15y agoAh, but if I set it up as an alias, I can't use it with other apps that have a configurable "Send to editor" function. :)
- andrewvc 15y agozsh `vimtab ~/.zshrc`
- JoshTriplett 15y agoUnfortunately, the remote features require a GUI version of vim. Personally, I prefer to run vim in a tab of my terminal.
- Periodic 15y agoUnder Linux I always run vim in a terminal. Part of this is habit because I (in the past) often edit files on remote computers and I like the consistency. On my mac I end up using MacVim mostly so that my Vim and Terminal apps can be considered separate apps for the purpose of things like spaces, and it just seemed to integrate a little better with the Mac infrastructure. But in general I haven't found a reason to prefer a GUI version over a terminal version when a sufficiently capable terminal is available.
- thristian 15y agoThe reasons I run gvim rather than terminal vim are basically all because sufficiently capable terminals do not exist: - The excellent "solarized" colour scheme only works properly with 24-bit color unless you're willing to mess with the terminal palette and break all your other terminal apps. No terminal I know of supports 24-bit color. - I have a handy keybinding that cycles through open windows and tabs, I find it makes the most sense bound to Ctrl-Tab and Ctrl-Shift-Tab. Neither key can be bound in any terminal I know of.
- grn 15y agoI'm using xterm with Solarized and it works pretty well. gvim is indistinguishable from vim in a terminal. I haven't observed any broken apps.
- Periodic 15y agoI've been using urxvt for a few years now. It supports a full color range and I adopted Solarized for a while, but went back to Tango. I haven't had any trouble binding <ctrl>-based combinations. All my window-manager commands are based on <super>, leaving <alt> and <ctrl> open for other things. I assume <ctrl-tab> is conflicting with tab swapping in gnome-terminal or something similar.
- rat 15y agoThanks that will help a lot(although I mostly use eclipse these days) but for smaller tasks having to reopen gvim with more files or opening new files can get annoying(also the lack of project/file groups checking).
- codeodor 15y agoI'm not a Vim user, but like you, I prefer to use several programs, which I lovingly call my disintegrated development environment.