Coder Social home page Coder Social logo

vim-buffet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vim-buffet's Issues

Refactor

  • Rethink how to store/cache the state of the buffer or fetch the list every time if the performance allows
  • Make the code more readable by splitting the long functions into smaller units

Related to and will solve #24

Customize top left icon

Hey,

Not sure if this is part of the plugin or just native to vim, but I would love a way to customize the icon in the top left-hand corner i.e. the blue thing with 9 black dots.

Thanks!

vim

I can't change the color of the buffers

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.

Strange background showing

I tried to achive the same looks as in screenshot of README and I say I only got something partial. Here is the actual screenshot
image
The green background throughout the tabline spoiled the looks. and also notice buffer are separating ini weird way (with black background and white seperator)

Garbled output in Vim8 internal terminal.

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.

screen shot 2017-10-21 at 18 00 42

E216: No such group or event: TabNew * set showtabline=2

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.
`

Feature request: Show buffer numbers (instead or alongside indexes)

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):
Screenshot 2020-03-26 12 56 10

Actual numbers which can be checked with :buffers (lynx.conf -> 3, README.md -> 4):
Screenshot 2020-03-26 12 56 23

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

  • if 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
  • if let g:buffet_show_index = 1 AND let g:buffet_show_number = 0 then we have what we have now
  • if let g:buffet_show_index = 0 AND let g:buffet_show_number = 1 then tab would show #<number> <title>, i.e. #3 lynx.conf
  • if let g:buffet_show_index = 0 AND let g:buffet_show_number = 0 then it's obvious

Error detected while processing function buffetrenderer[1]

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

The number of truncated buffers cannot be displayed

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.

image

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'

how to change color

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

appear more than one icon!

(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.

Disambiguate buffer name

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 |

Shorten Name Displayed on Tabline

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.

image
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.

vim-buffet display strange.

When I open vim, i could not see new tabline style, but just see as:
hlMkvD.png
It's strange that I let g:buffet_always_show_tabline = 0, but i still could see the tabline and besides the style is also default style.

GVim compatibility

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.

Buffer name not updating

Steps to reproduce:

  1. Launch Vim
  2. :split to create new window
  3. :edit file2 in that new window
  4. Switch back to first window
  5. :edit file1 in the first window

What was expected:
The tabline to be # | file1 | file2 |

What happened instead:
The tabline is # | * | file2 |

More highlights

Would it be possible to add highlights for new and modified buffers aswell? Also a symbol and highlight for readonly would be nice.

Setting colorscheme triggers errors

Whenever I try to set the colorscheme inside of vim (It works fine if done inside of vimrc) , it throws out these errors (which I've traced back to vim-workspace).

2017-12-17-143801_1920x1080_scrot

Error on startup with vim 7.2

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

Only the current buffer is visible

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.

Switching buffer by index

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 |

WS doesn't replace tabline on MacVim properly

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.

Conflicting package names

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! :)

A way to automatically run a command in a new tab

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

Goyo makes vim-buffet "go away"

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

Mouse support

Would it be possible to enable buffer selection through the tab bar with the mouse when set mouse+=a is configured?

Not clear that vim devicons needs to be loaded before vim-buffet

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.

crashes while decreasing window width

image

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

Error after vim-plug finishes installing

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. :)

Separators not correctly displayed when termguicolors is set

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:

image

And this is the result when termguicolors is set:

image

To reproduce:

Comment/uncomment set termguicolors and type:

nvim -u init.vim thing thing2

Colors inherit from current theme?

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?

[IMPORTANT] The plugin has been renamed

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.