Code Monkey home page Code Monkey logo

Comments (3)

pysan3 avatar pysan3 commented on June 7, 2024

Preview is, as the name suggests, a preview window and not meant to be used for editing.
The previewed file content is only temporary generated so press enter or any other key you registered to open the file (just like when you don't have preview window opened) and you are good to go.

Regarding the name of the buffer, that [No Name] refers to the buffer that was opened there from before. The preview window is just a temporary overlay that covers 100% size of the window.
You might understand what's going on better with :Neotree float's preview window.

from neo-tree.nvim.

subratappt avatar subratappt commented on June 7, 2024

@pysan3 Thanks for your reply. When using the "use_float"=true, it is just creating the borders and "NeoTree Preview" title; otherwise the behavior is the same with "use_float"=false.
We can accept the behavior with float, because when the preview is opened in the float window, there should not be any confusion about which file you opened.
But the confusion comes with the "use_float"=false condition; it shows the preview on top of the existing buffer name (buffer tab). It should show the preview with the temp buffer name on a new buffer tab.

from neo-tree.nvim.

pysan3 avatar pysan3 commented on June 7, 2024

But the confusion comes with the "use_float"=false condition; it shows the preview on top of the existing buffer name (buffer tab). It should show the preview with the temp buffer name on a new buffer tab.

The buffer name you are seeing is coming from whatever tabline plugin (eg bufferline.nvim, nvim-cokeline, nougat.nvim, ...) you installed.
Those plugins should order the listed buffers (see :h 'buflisted'). If you load multiple buffers, you'll see that it is just a horizontal list of all opened buffers that has nothing to do with the current window.

To keep it short, the top line in vim is used to list all real opened buffers.
I said real here since neo-tree preview is not really opening the buffer for editing but only for previewing (:h 'nobuflisted') so this is expected.

In fact, if you use bufferline.nvim, you should see all buffer names dimmed (the color of init.lua in the first GIF in bufferline.nvim) meaning that all are not in focus.

We do not control what is shown in the tabline and tabline plugins are doing their job to show a horizontal list of all listed buffers (in your case, there's only one buffer which might make it unclear tho).

If you really don't want to see that line :h showtabline might help you.

from neo-tree.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.