vim: move to buffer?

浪子不回头ぞ 提交于 2020-01-01 10:48:30

问题


Is there a function in Vim which will move to a buffer? For example, if I know that I have “TODO.txt” open in some window in some tab, I'd like to jump to that tab and focus that window. Is that possible?


回答1:


set swb=useopen,usetabe will set make :sb [number] or :sb [pattern] switch to an open window in whichever tab.




回答2:


I believe it's :drop filename




回答3:


I use

 :buf TODO

you need a unique identifiying piece of the buffers filename. You can use tab-completion, though :)

Oh IC, just noted that you want to activate the corresponding tab. Sry



来源:https://stackoverflow.com/questions/5772331/vim-move-to-buffer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!