Wikia

Vim Tips Wiki

Changes: Category:Tabs

Edit

Back to page

(expand and mention alternatives to one-file-per-tab setup)
(add link to quick tips in category text)
Line 1: Line 1:
{{CatInfo|text=editing with multiple tab pages|extra=Please keep in mind that tabs in Vim work differently from tabs in other applications ''by design.'' In other editors, every time you open a new file, it is loaded into a new tab. Usually in these other editors, you can never have more than one file shown in a single tab, nor can you have more than one tab display a given file. In Vim, every file is loaded into a buffer, which can be displayed in any number of windows in any number of tabs. This behavior, though perhaps less intuitive, is far more powerful. For example, you could edit a few files in one tab, and in other tabs keep a diff displayed between each file and their original version. Trying to force one-file-per-tab is very difficult and will only serve to limit the possibilities available to you. You may be better served using a [[Rolodex Vim]] or multiple buffers with the {{help|prefix=no|id='hidden'}} option. That being said, Vim can achieve similar behavior to other editors using some of the tips in this category. Other tips in this category exploit Vim's tab page design to do clever things you can't do in other editors.|parent=Usage|help=tab-page}}
+
{{CatInfo|text=editing with multiple tab pages|extra=Please keep in mind that tabs in Vim work differently from tabs in other applications ''by design.'' In other editors, every time you open a new file, it is loaded into a new tab. Usually in these other editors, you can never have more than one file shown in a single tab, nor can you have more than one tab display a given file. In Vim, every file is loaded into a buffer, which can be displayed in any number of windows in any number of tabs. This behavior, though perhaps less intuitive, is far more powerful. For example, you could edit a few files in one tab, and in other tabs keep a diff displayed between each file and their original version. Trying to force one-file-per-tab is very difficult and will only serve to limit the [[Quick tips for using tab pages|possibilities available to you]]. You may be better served using a [[Rolodex Vim]] or multiple buffers with the {{help|prefix=no|id='hidden'}} option. That being said, Vim can achieve similar behavior to other editors using some of the tips in this category. Other tips in this category exploit Vim's tab page design to do clever things you can't do in other editors.|parent=Usage|help=tab-page}}

Revision as of 14:34, April 1, 2010

This category is for tips about editing with multiple tab pages.

Please keep in mind that tabs in Vim work differently from tabs in other applications by design. In other editors, every time you open a new file, it is loaded into a new tab. Usually in these other editors, you can never have more than one file shown in a single tab, nor can you have more than one tab display a given file. In Vim, every file is loaded into a buffer, which can be displayed in any number of windows in any number of tabs. This behavior, though perhaps less intuitive, is far more powerful. For example, you could edit a few files in one tab, and in other tabs keep a diff displayed between each file and their original version. Trying to force one-file-per-tab is very difficult and will only serve to limit the possibilities available to you. You may be better served using a Rolodex Vim or multiple buffers with the 'hidden' option. That being said, Vim can achieve similar behavior to other editors using some of the tips in this category. Other tips in this category exploit Vim's tab page design to do clever things you can't do in other editors.

References

View random tip in this category


Around Wikia's network

Random Wiki