GithubHelp home page GithubHelp logo

Comments (4)

huanmoon avatar huanmoon commented on May 28, 2024

I've resolved this issue by myself, the tab didn't close because I just did :tabclose but I didn't do :BufferClose

from barbar.nvim.

huanmoon avatar huanmoon commented on May 28, 2024

I've resolved this issue by myself, the tab didn't close because I just did :tabclose but I didn't do :BufferClose

Actually I didn't resolve this issue, I added map('n', '', 'BufferClose tabclose ', opts) to my config but when I press alt+w, it didn't work. It closes the buffer but sometimes it can't close the tab.

from barbar.nvim.

Iron-E avatar Iron-E commented on May 28, 2024

Just so I understand, you want a command which can close a tab and the buffer associated with it?

The problem with the mapping, I suspect, is the lack of VimL's equivalent to a semicolon (|) between statements:

map('n', '<A-w>', 'BufferClose | tabclose ', opts)

If that doesn't work, you can try:

vim.keymap('n', '<A-w>', function()
  vim.cmd.BufferClose()
  vim.cmd.tabclose()
end, opts)

The builtin :bdelete command might also just remove tabs by itself, I'm not sure. Try that as well.

from barbar.nvim.

huanmoon avatar huanmoon commented on May 28, 2024

Just so I understand, you want a command which can close a tab and the buffer associated with it?

The problem with the mapping, I suspect, is the lack of VimL's equivalent to a semicolon (|) between statements:

map('n', '<A-w>', 'BufferClose | tabclose ', opts)

If that doesn't work, you can try:

vim.keymap('n', '<A-w>', function()
  vim.cmd.BufferClose()
  vim.cmd.tabclose()
end, opts)

The builtin :bdelete command might also just remove tabs by itself, I'm not sure. Try that as well.

thanks, it works

from barbar.nvim.

Related Issues (20)

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.