4 ms·
Why do you have 143 files open at the same time? Personally I use some (2-7?) buffers in vim and cycle through them. When I don't anticipate editing a file for
by zyfo 15y ago
Why do you have 143 files open at the same time?
Personally I use some (2-7?) buffers in vim and cycle through them. When I don't anticipate editing a file for a while I close that buffer.
- fbuilesv 15y agoMy editor has been opened for 2-3 weeks now so I just keep piling the files from all the different projects. I prefer typing 'C-x b [strat]' to opening '~/dev/projects/something_else/lib/strategy.rb' but it might just be the way I'm used to working.
- rawsyntax 15y agoLeaving emacs open makes it more IDE like, the stuff you were working on last is still loaded. Instead of having to quit and then find all those files again. I work the same way as you. Tabs for any large number of buffers would be a nightmare
- X-Istence 15y agoI work with both tabs, and buffers in vim. Best of both worlds. Switching to another tab quickly is easy, and opening up files becomes even easier with NerdTree (never did like Command + T). I also have BufferExplorer that allows me to switch buffers easily, but I tend to just use NerdTree anyway. But I agree with you, I hate quitting vim, it seems like I lose my place much easier when I no longer have those files open.
- sjs 15y agoI think it's a similar phenomenon to people closing windows to free up space on the taskbar (for GUIs that have such a thing like Gnome and Windows). If you remove the list of "open" things people are free to just do what they want and let the OS worry about paging if memory fills up and all that sort of thing. It's a pleasant experience if the abstraction doesn't leak, e.g. Win98 crashing if you opened "too many" programs. Once you free yourself from this list of things that are "open" (whatever that means) you simply stop caring about the number of items in what is effectively just a "recently visited" list. What value is there in killing those buffers if there's no list for them to clutter? (yes there are lists of buffers in Emacs but you only see them if you want to) In that light here's my answer to your question: Because he hasn't exited his editor and the number of "open files" has no significance or impact on workflow. While you're deciding whether or not to close a file and trying to anticipate when you may edit it next he's already moved on to editing the next thing.
- zyfo 15y agoGood answer. Is there no cost whatsoever to having many buffers open? I like the simplicity of just cycling through rather than searching for whats-its-name-again - seems to be easier to remember for my fingers as well. A couple of years ago I used to keep 100s of tabs open in FF. Then I went mobile and started caring about watts. Not the same situation, but I think it influenced my few-files-open habits.
- sjs 15y agoFor me there is no cost, but I rarely do the cycle-through-all-tabs thing (not never but rarely). For your workflow it sounds like there is a cost. If you work on multiple projects in the same editor instance then there is a significant cost as well, e.g. you may have 5 index.html files open and when you type the desired filename you then have to choose carefully. I have encountered this when leaving Emacs open for days or weeks at a time, switching between personal and work projects. These days I use TextMate more than Emacs and for small personal projects I like quickly switching between say the readme, makefile, code, and test with Cmd-[1-9]. If there are few files to edit tabs can be advantageous. This stuff is highly personal and dependent on workflow.
- peterbraden 15y agoI remember with positions of tabs, rather than the names of files. To each their own, but there is still a need for some sort of tab behaviour for some of us.
- 5l 15y agoI've found that it's usually as fast to use the Vim Command-T plugin to switch files even once they're opened than it is to switch back to that buffer directly. Main exception being the alternate buffer for which I have a quick shortcut - (<leader>, - <leader> being set to ,) The consequence is I usually have piles of buffers open at once. Edit: sjs puts it better above. Having to think 'is this file already opened or not' and then using that information to determine the command you use to switch to it is rather annoying.