forked from vim-scripts/buftabs
-
Notifications
You must be signed in to change notification settings - Fork 1
Deprecated, use wintabs instead
zefei/buftabs
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a fork of http://www.vim.org/scripts/script.php?script_id=1664 Introduction ------------ This is a simple script that shows a tabs-like list of buffers in the statusline. The biggest advantage of this script over various others is that it does not create new window, and thus will not conflit with other navigation plugins such as nerdtree. Screeshots ---------- a few opened files in one window: http://i.imgur.com/stvMQ.png 3 windows - nerdtree, help and files: http://i.imgur.com/Pdsg9.png 3 windows - fugitive and files: http://i.imgur.com/XUoHT.png (color scheme used in screenshots is https://github.com/zefei/simple-dark) Usage ----- Just copy the file to vim plugin directory, it will start showing buffer list on your statusline. By default, it will take over the entire statusline; but if you want to use only part of the statusline for buftabs, please check the configuration options below. It might be handy to create a few maps for easy switching of buffers in your .vimrc file. For example: noremap <F1> :bprev!<CR> noremap <F2> :bnext!<CR> noremap <F4> :confirm bd<CR> Configuration ------------- The following extra configuration variables are availabe: * statusline By default buftabs will take up the whole statusline. You can alternatively specify precisely where it goes using #{buftabs} e.g.: :set laststatus=2 :set statusline=\ #{buftabs}%=\ \ Ln\ %-5.5l\ Col\ %-4.4v NOTICE: If you customize your statusline like above, you will HAVE to specify the total charactor length of non-buftabs components in the statusline. By default, it is 0 since there are no other components. To change: " for the example statusline above, length of other components is 20 :let g:buftabs_other_components_length=20 * g:buftabs_active_highlight_group (default '') The name of a highlight group (:help highligh-groups) which is used to show the name of the current active buffer. To change: :let g:buftabs_active_highlight_group="Visual" * g:buftabs_only_basename (default 1) This variable makes buftabs only print the filename of each buffer, omitting the preceding directory name. To unset: :let g:buftabs_only_basename=0 * g:buftabs_show_number 1 * g:buftabs_marker_start [ * g:buftabs_marker_end ] * g:buftabs_separator - * g:buftabs_marker_modified ! These strings are drawn around each tab as separators, the 'marker_modified' symbol is used to denote a modified (unsaved) buffer. If 'buftabs_show_number' is set to 0, neither buffer number nor separator is shown. To change: :let g:buftabs_separator = "." :let g:buftabs_marker_start = " " :let g:buftabs_marker_end = " " :let g:buftabs_marker_modified = " +" * g:buftabs_blacklist (default ["^NERD_tree_[0-9]*$"]) You might not want to show buftabs when working with some buffers (e.g. NERDtree). You can add patterns of these buffer names to 'buftabs_blacklist': :let g:buftabs_blacklist = ["^NERD_tree_[0-9]*$", "^__Tagbar__$"]
About
Deprecated, use wintabs instead
Resources
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Vim Script 100.0%