Hacker News new | past | comments | ask | show | jobs | submit login

Ctrl-P does something that I wanted Command-T to do for a long, long time: if you invoke it and select a file that is already open in an existing window somewhere, rather than open a new window for that file, it will switch to the already-opened one.

You can change how this works, too: look up ctrlp_switch_buffer in the docs.




Does Command-T ever open new windows? For me it opens the file in the current window, and if the file is already open in a buffer, that buffer gets shown in the current window.


You're right, unless you C-s or C-v it into a split (which I do pretty often).

When I was first migrating from TextMate, the default behavior seemed like a bug. Why would you routinely want to open a buffer in two different windows? Why wouldn't you want the editor to find your already-opened file in the labyrinth of splits and tabs you've opened?

Now, partially due to this behavior, I tend to see large lattices of open windows and tabs and splits as a sign that I'm getting unfocused, and try to be better about closing splits as soon as I don't need them, and avoid tabs altogether.

That splits should be transient seems more vim-like.


Awesome, I'll have to take a look at how that works. I've gotten it to work with quickfix (set switchbuf=useopen), but still have no idea how to get vim to do that for ctags.


Also, it can sort by MRU and switch mode (Ctrl-B/F) while its window is shown. And mark multiple files.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: