bagrat / vim-buffet Goto Github PK
View Code? Open in Web Editor NEWIDE-like Vim tabline
License: MIT License
IDE-like Vim tabline
License: MIT License
Would it be possible to enable buffer selection through the tab bar with the mouse when set mouse+=a
is configured?
After running :PlugInstall using vim-plug I'm getting the following error:
Error detected while processing /home/mkraemer/.local/share/nvim/site/plugged/vim-workspace/plugin/workspace.vim:
line 73:
E421: Color name or number not recognized: ctermbg= ctermfg=
This only pops up immediately after vim-plug has finished; after subsequents starts everything seems to work great so far :)
I'm using neovim 0.1.7.
Thanks for the plugin btw. :)
By right, we need to make sure that the quickfix buffer doesn't appear in the tabline at all.
I want to be able to define a key map that runs a command immediately in the new tab, for example:
noremap <C-t> --> opens a tab a runs :terminal
or
noremap <C-s> --> opens a tab and runs the :Startify command (for the startify vim plugin)
Is there a way to do this?
From reading the readme I couldn't see a way to do this, if its possible it would be nice to have this sort of functionality documented in the readme
Hello,
Thank you for your very nice and useful plugin. I am having a hard time making it look under GVim exactly as it looks on terminal vim.
It seems GVim somehow turns each buffer/tab into the colors of the current GTK theme. Any advice or suggestion ?
Using VIM 8.0
This is the list of my current installed plugins via Pathogen
bufexplorer
nerdtree
phpcomplete.vim
supertab
tcomment_vim
ultisnips
vim-airline
vim-devicons
vim-polyglot
vim-workspace
mru
pdv
php.vim
syntastic
tlib_vim
vim-addon-mw-utils
vim-blade
vim-php-cs-fixer
vim-snippets
vmustache
Thank you again.
Right now, we're only taking the basename of the file. We can take a look at how vim-buftabline managed to disambiguate files with the same basename here.
So, ideally, we get something like this:
# | apple/index.txt | banana/index.txt |
Related to and will solve #24
Firstly thanks for the great plugin 💯 it's been super useful.
When I initially installed it I tried to get it working with vim devicons but kept finding that the icons wouldn't show. I re-read the instructions in the README
and realised (although it isn't explicitly stated) that I had to load vim devicons before vim buffet
Plug 'vim-devicons' "<-- once move here it works fine
Plug 'vim-buffet'
Plug 'vim-devicons' "<-- Initially below buffet, doesn't load icons
This is probably not too big a deal but I think it would be clearer if the README.md
was explicit about this or maybe the plugin could do something similar to lightline-bufferline
which seems to be able to load the devicons regardless of the positioning.
How do I move the location of the buffer
This plugin has been renamed from vim-workspace
to vim-buffet
for a good reason. Also, it has been rewritten completely from scratch, to make it more efficient and the code more readable. This will make it easier for you to contribute and make your own customizations.
Due to this changes, the existing settings you might have in your vimrc
will not work with the latest version.
Please go through the README again, and rename your configuration parameters (variables, highlight groups and commands).
Sorry for inconvenience.
See thread at vim-easearch: eugen0329/vim-esearch#172 (comment)
(Sorry About My Bad English)
As title,this tabline appear two or three or more icon when i open a new windows(type command tabnew xxxxxx
)
I think this is a bug, so i open this issues.
Photo will upload later.
I'm not sure if this is a problem that vim-buffet or Goyo should solve, so I'm just going to file an issue in both places 🙂
When activating goyo, it seems to "reset" the tab line. If there were a way to tell vim-buffet to "re-render" in my mappings, I could probably make this problem go away, but I haven't gotten that far yet.
Here's a recording of the issue: https://share.getcloudapp.com/5zuGQorD
It will be nice if there is an option for disabling the tabline when there is only one buffer.
At startup I get this error:
Error detected while processing /home/porter/.vim/bundle/vim-buffet/plugin/buffet.vim:
line 11:
E216: No such group or event: TabNew * set showtabline=2
Press ENTER or type command to continue
Commenting out the rest of the plugin, and only leaving vim-buffet active, results in the same error.
`
I have been using your plugin (which changed the way I use buffers) but I am also avid user of fzf in Vim and MacVim. Here is the problem.
Since latest release (ver 17.1) fzf is using internal terminal emulator of Vim to present present results. Before in MacVim you had to use a glue script and see results in external terminal window. So this is change for good.
I have noticed however that my output in Vim internal terminal is garbled when using fzf. Like in this issue .
After some trials I have found that the reason is tabs shown by vim-workspace in MacVim. Somehow they are fouling terminal. When I set set guioptions-=e
I am back to MacVim tabs which is a pity but all the artefacts within Terminal window are gone.
I mapped my leader key to ',' and I'm using the sample map to change buffers with its index. However, its always fails no matter how many buffers I have opened.
There's a further configuration that I need to make?
There's any known conflict with other plugins?
Here's the key mapping: https://github.com/Mdsp9070/nvim/blob/master/partials/setup.vim#L10
My plugins: https://github.com/Mdsp9070/nvim/blob/master/partials/plugins.vim
Using following config:
set nocompatible
set runtimepath^=~/.local/share/nvim/plugged/vim-buffet
filetype plugin indent on
syntax on
set hidden
set termguicolors
let g:buffet_powerline_separators = 1
This is the result when termguicolors
is not set:
And this is the result when termguicolors
is set:
To reproduce:
Comment/uncomment set termguicolors
and type:
nvim -u init.vim thing thing2
Hi,
I just installed vim-buffet in neovim using vim-plug, after restarting neovim, the tabline appear, but it only showed with the active buffer only, not any other buffers.
I tested in vim 8.1 and it showed fine.
I'm using neovim 0.3.5.
Please tell me if I need to provide any more information, thanks.
Thanks for your work.
I konw this plugin can use let g:buffet_use_devicons=1
to show file type icons for each buffer in the tabline via vim-devicons , but there is no color for filetype icons. So whether you can display highlighted icons using nvim-web-devicons?
I cannot change the color of the buffers, and I have already tried several things to change it but nothing that I achieve, only when I put the function that is in the plugin documentation the active buffer turns purple, I tried to change the values of the Colors but does not affect anything, please help.
Often while working on bigger projects i end up opening 5-8 buffers and they're not always visible to me,
I was thinking of providing a shorter name for the file so that at least 10 buffers can be accommodated as and when needed.
In the above image i'd prefer to be able to see all the buffers at any given time as compared to just those who's names fit on the screen.
Kudos to the creators of this plugin it's helped stream line my workflow a lot.
while I defined a function with name g:BuffetSetCustomColors, I don't know how to use it. if the plug will call the function automatically, or should I call it manually?
I try to call it before/after the plug been loaded, but it don't work
Although having ordinal indexes is great, I'd like to have a visibility over buffer's number.
In order to switch to lynx.conf
, I'd normally do :b <number>
, but I'm confusing actual buffer number (3) with it's index (2).
Indexes (lynx.conf -> 2, README.md -> 3):
Actual numbers which can be checked with :buffers
(lynx.conf -> 3, README.md -> 4):
To make it work nicely there might be options. There are some ideas:
let g:buffet_show_index = 1
let g:buffet_index_type = "index" " default
let g:buffet_index_type = "number" " shows number INSTEAD of indexes
let g:buffet_show_number = 1 " 0 is default
Last one I like best. What It would do is
let g:buffet_show_index = 1 AND let g:buffet_show_number = 1
, then tab would show <index> (#<number>) <title>
, i.e. 2 (#3) lynx.conf
let g:buffet_show_index = 1 AND let g:buffet_show_number = 0
then we have what we have nowlet g:buffet_show_index = 0 AND let g:buffet_show_number = 1
then tab would show #<number> <title>
, i.e. #3 lynx.conf
let g:buffet_show_index = 0 AND let g:buffet_show_number = 0
then it's obviousThe tabline is really good and would be good to match colors with current color schema
This is supported?
Hi mate,
I know this sounds a little odd, but if you would consider renaming your plugin that would be super-fantastic fun time.
There is another 'vim-workspace' plugin and I'd like to use both yours and theirs in tandem. Unless your plugin is offering persistent session management, in which case I will recind my request :)
I was gonna ask thaerkh to change their name, but if you look at his commit history: he beat you by about 6 months. So I reckon it's only fair. If not, that's cool too. I can always ask thaekh and see what they say, or you guys could just duke it out between the two of you haha.
The other package can be found here: https://github.com/thaerkh/vim-workspace
Thanks! :)
I just migrated from vim-buftabline. One thing I miss is switching buffers by their ordinal numbers. It will be great if vim-buffet can do something similar by providing the option to display index number before the buffer name, and exposing a function to switch to buffer with index X.
# | 1 first.txt | 2 second.txt | 3 third.txt |
I want to add different separated on both sides, but kind of want to give up because can't understand the code
For example, I use Dracula, and was surprised that this plugin did not inherit the colors from that theme instead of using a default. Needing to manually change them isn't impossible, but it is a little annoying.
Unless I'm missing something and have my configuration messed up somehow?
I want to make my configuration of vim buffet look like this
I couldn't understand how to implement this in vim buffet.
The image source: https://github.com/akinsho/dotfiles/blob/main/dotfiles.png
This guy uses vim-buffet
Following the tutorial in the readme file, I config my vim. But my vim can not display the number of truncated buffers
, buffet_left_trunc_icon
, and buffet_right_trunc_icon
. I don't know what I missed.
My vim looks like this.
The end is my vimrc
. The font is MesloLGS Nerd Font.
I hope someone can tell why the number of truncated buffers cannot be displayed. Maybe I forgot to install some plugins.
Thanks.
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
set guifont=MesloLGS\ Nerd\ Font
set laststatus=2
set encoding=utf8
set t_Co=256
set number
set fillchars+=stl:\ ,stlnc:\
set term=xterm-256color
set termencoding=utf8
set hlsearch
" syntax enable
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')
" Declare the list of plugins.
Plug 'hzchirs/vim-material'
Plug 'ryanoasis/vim-devicons'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'scrooloose/nerdtree'
Plug 'bagrat/vim-buffet'
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
" Config for vim-material
let g:material_style='oceanic'
set background=dark
colorscheme vim-material
" Config for vim-buffet
let g:buffet_always_show_tabline = 1
" let g:buffet_separator = " | "
" let g:buffet_powerline_separators = 1
let g:buffet_show_index = 1
let g:buffet_new_buffer_name = "*"
let g:buffet_modified_icon = "+"
let g:buffet_tab_icon = "\uf00a"
let g:buffet_left_trunc_icon = "\uf0a8"
let g:buffet_right_trunc_icon = "\uf0a9"
nmap <leader>1 <Plug>BuffetSwitch(1)
nmap <leader>2 <Plug>BuffetSwitch(2)
nmap <leader>3 <Plug>BuffetSwitch(3)
nmap <leader>4 <Plug>BuffetSwitch(4)
nmap <leader>5 <Plug>BuffetSwitch(5)
nmap <leader>6 <Plug>BuffetSwitch(6)
nmap <leader>7 <Plug>BuffetSwitch(7)
nmap <leader>8 <Plug>BuffetSwitch(8)
nmap <leader>9 <Plug>BuffetSwitch(9)
nmap <leader>0 <Plug>BuffetSwitch(10)
noremap <Tab> :bn<CR>
noremap <S-Tab> :bp<CR>
noremap <Leader><Tab> :Bw<CR>
noremap <Leader><S-Tab> :Bw!<CR>
noremap <C-t> :enew<CR>
" Config for vim-nerdtree
autocmd StdinReadPre * let s:std_in=1
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | wincmd p | ene | exe 'NERDTree' argv()[0] | endif
autocmd BufEnter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
autocmd BufEnter * if bufname('#') =~# "^NERD_tree_" && winnr('$') > 1 | b# | endif
map <C-\> :NERDTreeToggle<CR>
let g:webdevicons_enable_nerdtree = 1
let g:webdevicons_conceal_nerdtree_brackets = 1
let g:NERDTreeShowHidden=1
" Config for vim-airline
let g:airline_powerline_fonts = 1
let g:airline_theme='dark'
" Config for vim-devicons
" let g:Powerline_symbols = 'fancy'
When starting Vim I get this message:
Error detected while processing function buffetrenderer[1] .. buffet#update:
E684: last index out of range[0]
The error disappears after commenting out the plugin in my vimrc file.
I'm using:
VIM - Vi IMproved 7.4
Included patches: 1-1689
If I try to use vim-workspace in the GUI MacVim, rather than getting the workspace tabline I get the GUI tabline. After reading the gvim related issue, I added set guioptions -=e
to my .vimrc. However, that only gave me the standard CLI tabline. I can confirm that it's loaded, since the commands offered by the plugin do work. If I use the cli MacVim, everything will work fine, provided I remove the command to turn off the GUI tabline.
I normally use https://github.com/ap/vim-buftabline, which also takes over the tabline and works in MacVim, although it disappears when you create a new tab. It may provide some guidance in implementing a fix.
Thanks for this great plugin. It works well on other machines, but on a server with only vim 7.2 the following error appear at startup when trying to open two files simultaneously:
Error detected while processing function workspace#render..<SNR>62_RenderTab:
line 17:
E706: Variable type mismatch for: prev_buffer
Error detected while processing function workspace#render..<SNR>62_RenderTab:
line 19:
E706: Variable type mismatch for: next_buffer
Would it be possible to add highlights for new and modified buffers aswell? Also a symbol and highlight for readonly would be nice.
Is it possible to switch between the previous and the current buffer back-and-forth via command?
If so - could it please be documented in the Recommendations
of README.md
?
Thanks a lot for this wonderful plugin !!!
nvim version:
NVIM v0.5.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-cKYFpg/neovim-0.5.0+ubuntu2+git202102110233-1aec5ba85-d569569c9=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-cKYFpg/neovim-0.5.0+ubuntu2+git202102110233-1aec5ba85-d569569c9/build/config -I/build/neovim-cKYFpg/neovim-0.5.0+ubuntu2+git202102110233-1aec5ba85-d569569c9/src -I/build/neovim-cKYFpg/neovim-0.5.0+ubuntu2+git202102110233-1aec5ba85-d569569c9/.deps/usr/include -I/usr/include -I/build/neovim-cKYFpg/neovim-0.5.0+ubuntu2+git202102110233-1aec5ba85-d569569c9/build/src/nvim/auto -I/build/neovim-cKYFpg/neovim-0.5.0+ubuntu2+git202102110233-1aec5ba85-d569569c9/build/include
Compiled by buildd@lgw01-amd64-020
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Steps to reproduce:
:split
to create new window:edit file2
in that new window:edit file1
in the first windowWhat was expected:
The tabline to be # | file1 | file2 |
What happened instead:
The tabline is # | * | file2 |
[denite] neovim.api.nvim.NvimError: b'Vim(call):E117: Unknown function: <SNR>100_set_colors
Looks like it is here:
Steps to reproduce:
:Denite buffer
or :Denite file_rec
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.