Coder Social home page Coder Social logo

vem-tabline'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  avatar

vem-tabline's Issues

[Bug] Modified flag is not displayed for an unsaved buffer

Hello,

If you simply open vim without any file and start to edit the empty buffer, the [+] modified flag is displayed in the status line (assuming it's configured to display it), but not in the Vem Tabline (no asterisk after "[No Name]"). However, echo &modified returns 1, as it should.

If you save the file and then keep editing it, the flag is displayed.

Best regards,
Dupond

Plugin doesn't display buffers and tabs at the top as described

Hello,

I've installed the plugin, but I'm not getting the

| buffer1 | buffer2* | buffer3 |                             | 1 | 2 | 3 |

format at the top. It's like the plugin doesn't take effect at all.
I do get a buffer list per tab (with only current buffer displayed), but on the right the close (X) button is displayed. That is just the usual tabline format.

I'm using neovim ver v0.4.4.

What can I do to fix this, to actually enable the plugin?

Here's my init.vim: https://github.com/robcsi/dotfiles/blob/master/nvim/.config/nvim/init.vim

Thanks

[Feature request] Config option to customize the separator between buffer names

Hello,

It would be nice if the separator between buffer names was customizable, e.g. with a ' | ' vertical bar.

Here's my use case: for the moment, when you decide to underline the active buffer, it will also underline two empty spaces on the left and on the right (and the tabline grows fast with all these spaces between buffer names), so being able to customize it (e.g. with a single space) would be a nice addition.

Obviously, if you find it's not worth it, please feel free to close this.

Best regards,
Dupond

Allow to show all buffers in tabline even if multiple windows are open

Nice plugin! I'm still debating whether it's worth using this on top of Ctrl+P. I definitely like the fact that it only takes one line though, vs MiniBufExplorer.

One odd behaviour I noticed is:

  • vim file1.txt file2.txt
  • :split
  • tabline says file1.txt + 1 more instead of listing file2.txt as well.

Let the ability to translate the title of an unnamed buffer

Hello!

For the moment, when a buffer hasn't been saved, its name in the status line appears in the local language (e.g. for me it's [Aucun nom] in french), but it also appears in english in the tabline (where it's called [No Name]), which makes no sense, since both refer to the same buffer, but with a different "name" (or, to be more precise, indicating that it has no name in two different languages)...

It appears that Vem Tabline defines this name in the autoload/vem_tabline/buffers.vim file, on line 119:

        " empty name
        if path_parts_count == 0
            let buffer_item.name = '[No Name]'
            continue
        endif

So it would be nice if the buffer_item.name variable could be configured in the vimrc file.

Edit: maybe that's why some plugins with functionalities close to (but not as good as) Vem Tabline choose to use * (an asterisk) as a name for an unnamed buffer...

Thanx for your great plugin!

Best regards,
Dupond

Error while processing function DeleteCurrentBuffer

I get the following error when trying to call DeleteCurrentBuffer:

Error detected while processing function DeleteCurrentBuffer:                          
line    2:
E121: Undefined variable: vem_tabline#tabline
E15: Invalid expression: vem_tabline#tabline.get_replacement_buffer()

I'm using NVIM v0.4.3

Letting VemTablineGo fail if passed number isn't a buffer index

The documentation says that when using let g:vem_tabline_show_number = 'none' or 'buffnr', the :buffer command should be used for switching buffers, while :VemTablineGo should be used when using the 'index' option.

However, VemTabLineGo is defined as follows

" User function to switch buffers
function! VemTablineGo(tagnr) abort
    try
        let buffnr = g:vem_tabline#buffers#section.tagnr_map[a:tagnr . g:vem_tabline_number_symbol]
        exec 'buffer' . buffnr
    catch /E716:/
        exec 'buffer ' . a:tagnr
    catch //
        echoerr "VemTabline: Buffer " . a:tagnr . " does not exist"
    endtry
endfunction

because of the catch /E716:/, if the number being passed is not one of the buffer indices, the function won't fail as long as there's a buffer whose number matches the passed one. By buffer index I mean the one displayed in the tabline when using the 'index' option, and by buffer number I mean the one shown by :ls.

I think if the user wants to switch buffer by its number he/she should use :buffer, while :VemTablineGo should be reserved for switching buffers by index.

TL;DR

E716 shouldn't be catched in VemTablineGo. If the number passed is not one of the indices, the function should be left free to fail.

Only current buffer shown in splits + next/previous nav not working

Thanks for this plugin! I was always missing reorderable buffer tabs since my swticht to vim.

I encountered two problems when working with splits:

  • Only the current buffer in the split is show in the tabline
  • The next/previous navigation does not work as expected - it selects another split window.

This is my key map for vem-tabline:

nmap <S-Left> :call vem_tabline#tabline.move_buffer('left')<CR>
nmap <S-Right> :call vem_tabline#tabline.move_buffer('right')<CR>
nmap <C-Left> :call vem_tabline#tabline.select_buffer('left')<CR>
nmap <C-Right> :call vem_tabline#tabline.select_buffer('right')<CR>

Tabline disappears when closing a Floaterm terminal

When using the vim floaterm plugin, after closing a floating terminal (to test this set g:floaterm_autoclose to 2, then call :FloatermNew sh, then exit the shell), the tabline disappears.

After a few seconds it reappears automatically, but it's still annoying that it does that. I've tested other tabline plugins and they don't seem to have this particular problem.

Can this be fixed?

Edit: in general the tabline doesn't disapper, however the "tab" with the current buffer does. The tabline disappears if there are only two buffers one, since when one if them disappears the whole tabline is hidden.

How to change border colour under tabline?

Hello, thank you for this plugin, it's great!

This may not be specific to the plugin, but I'm wondering if you can tell me how I can change the border colour shown in the screenshot below? I am not sure whether colour is coming from the plugin, from vim, or from my terminal.

Thanks!

CleanShot 2020-05-25 at 13 57 02

Default buffer mapping like airline

My feature request is to add default mapping capability for buffers in a similar way to Airline.

The context is that I use airline's tabline to display all buffers. I looked at vem-tabline because airline doesn't have the ability to reorder buffers in the tabline. This would be really useful when I have a large number of buffers open but want to bring 3-5 together to edit them.

Vim-airline has one significant convenience. It creates an internal list of the buffers which can be displayed on the tabline: so you see [N][buffer name]. It sets up Mappings for them (https://github.com/vim-airline/vim-airline/blob/ea7f5d53135db890088666bfb6627e7c6b7388e1/doc/airline.txt#L918). As buffer numbers are fixed, the numbers it displays is an "internal number" and it maps this to the actual buffer number. The effect is that you can see that "4" on the tabline is a particular buffer and then use the mapping (1 ... 9/0) to immediately jump to that buffer.

Buftaline may have an [alternative](To switch buffers by their ordinal number (https://github.com/ap/vim-buftabline/blob/14d208b1fa5f4308383e3ce429d57c84423029f9/doc/buftabline.txt#L77) implementation.

This is more efficient than anything else I know of when you have long running sessions with a large number of buffers.

Using only to close split causes error

When viewing two splits and then collapsing to a single split using :only results in the following error when trying to cycle to the next buffer:

Error detected while processing function 7[5]..8:
line   10:
E16: Invalid range: 2wincmd w

Switching from file to folder doesn't update the tabline status

Hello,

Using Vem Tabline, if I open vim with both a file and a folder (e.g. vim myfile.txt myfolder/) then "myfile.txt" and "myfolder" are displayed in the tabline, but switching between them (using:bnext and :bprev) doesn't update the status of the tabline: the folder name always appears as unselected.

Also, is there a way to change the colors of the numbered tabs displayed on the right of the tabline?

Congrats and thanx very much for this great plugin!

Best regards,
Dupond

VemTablineLocationSelected is not implemented

VemTablineLocationSelected doesn't seem to be implemented, although it's in the documentation.

also, a VemTablineLocationShown would be useful as well. I'll try to do this if you don't already have it uncommitted somewhere, although I haven't really looked into the code yet.

[Feature request] command to go back to last used buffer

A common use case for me is to have a bunch of files open, but to be mostly bouncing between two of them. It would be nice to be able to say

let mapleader ,
nmap <leader>, <Plug>vem_last_buffer-

And then type ,, to bounce between the most recent two files

[Feature request] Config options to not display directory name and modified indicator

Hello!

Vim gives the ability to customize the status bar, so I have set it so that it shows the full directory of the current file, followed by the file name, in the usual form, e.g. ~/my_folder/myfile.txt; I personally finds it easier to read than myfile.txt@my_folder, so it would be nice if there could be a config option that would allow to not display the directory name in the tabline. I hope it makes sense.

In the same spirit, the asterisk added to the buffer/tab name to indicate that it has been modified might also be redundant with the [+] that can be added in the status bar in certain configurations. So may I also suggest to add an option to disable this modified indicator?

Those are just some suggestions of course, please feel free to close this if you find it's not in the scope of your plugin. I'd be sorry to give you the impression that I somehow "spam" your repository issues, mostly since I do find that your plugin is great!

Thanx for reading,
Best regards!

<Plug> mappings not working

The documentation mentions

For example you could set your mappings like:
>
    nmap <leader>h <Plug>vem_tabline_move_buffer_left-
    nmap <leader>l <Plug>vem_tabline_move_buffer_right-
    nmap <leader>p <Plug>vem_tabline_prev_buffer-
    nmap <leader>n <Plug>vem_tabline_next_buffer-
<

But the actual mappings are

nmap <silent> <Plug>vem_prev_buffer- :call vem_tabline#tabline.select_buffer('left')<CR>
nmap <silent> <Plug>vem_next_buffer- :call vem_tabline#tabline.select_buffer('right')<CR>
nmap <silent> <Plug>vem_move_buffer_left- :call vem_tabline#tabline.move_buffer('left')<CR>
nmap <silent> <Plug>vem_move_buffer_right- :call vem_tabline#tabline.move_buffer('right')<CR>

so the mappings in the documentation don't work ๐Ÿ˜…

[feature request] Add DeleteCurrentBuffer to a <Plug> mapping

Basically title. This would mean a cleaner .vimrc for everyone using this plugin, since instead of

nmap <silent> <Leader>x :call DeleteCurrentBuffer()<CR>

function! DeleteCurrentBuffer() abort
  let current_buffer = bufnr('%')
  let next_buffer = g:vem_tabline#tabline.get_replacement_buffer()
  try
    exec 'confirm ' . current_buffer . 'bdelete'
    if next_buffer != 0
      exec next_buffer . 'buffer'
    endif
  catch /E516:/
    " If the operation is cancelled, do nothing
  endtry
endfunction

one could simply have

nmap <Leader>x <Plug>vem_delete_buffer-

Save layout in sessions

Once again thanks for this great plugin!

If I reload a a session (for example after restarting vim), then the buffers get ordered in accordance to last-viewed.

Is any way to save/load the current layout of the buffers along with a session?

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.