Giter Club home page Giter Club logo

Comments (8)

xolox avatar xolox commented on July 19, 2024

What do you mean specifically with "I open multiple buffers"? Because the plug-in doesn't persist your buffer list, it persists the arrangement of tab pages and/or split windows and the files they contain.

So if you open multiple tab pages and/or windows and only some of those are restored it's a bug in my plug-in. If however you were expecting that your buffer list would be persisted then I have to disappoint you: I don't consciously use hidden buffers in Vim so have never had the need to persist them. If you'd like me to add this feature (persistence of open buffers) then feel free to say so. Note that it might take me a week or two to add this since I'm a bit busy at the moment.

from vim-session.

cgrinds avatar cgrinds commented on July 19, 2024

Hi Peter - There is a very good chance I misunderstood the purpose of the plugin :)
I'm fairly new to VIM and may be misunderstanding buffer vs tab vs window. I'm coming from an editor that would persist/restore all files I had open.

For example, if I editing 30 files and quit my editor, the next time I restart it all 30 files are opened, cursor in the same place, etc.

Does you plugin support that feature? I'm off to read more about the difference between buffers, windows, tabs, etc. :)

from vim-session.

xolox avatar xolox commented on July 19, 2024

When you edit multiple files in Vim there are several ways to switch between those files while inside Vim:

  • You can edit one file at a time (a single tab page with a single window). In this case you have to switch between files using Vim commands such as :edit, :buffer or :next and :prev. The session plug-in will only persist the one file you are editing at the time you save your session.
  • You can split Vim's main window into several horizontal and/or vertical 'split windows' that are visible at the same time using :split commands. The session plug-in is supposed to persist any split window layout but right now only supports very simple scenarios like a single horizontal or vertical split.
  • You can open multiple tab pages using Vim commands such as :tabedit. Only one tab page is visible at the same time but there are labels at the top of Vim's interface, one for each tab page. The session plug-in is supposed to restore every tab page you have open at the time you save your session.

Also in case you didn't know Vim supports multiple split windows inside a single tab page. Like I explained above my session plug-in is supposed to fully support this but isn't very good at restoring complex split window layouts at the moment.

Does this help clear up any confusion?

from vim-session.

cgrinds avatar cgrinds commented on July 19, 2024

I think so - this was helpful too http://stackoverflow.com/questions/102384/using-vims-tabs-like-buffers

I created 3 tabs and opened 3 files in those tabs. You plugin works as described. When I restart, 3 tabs with those 3 files are opened.

I guess I'm trying to use VIM in a way that it wasn't designed to be used. Tabs don't scale with a large number of files. I currently have 403 files open in my other editor and it works without a problem. They're saved/restored quickly, I can switch between them quickly with a few keypresses, etc.

Do you know of a VIM plugin that would accomplish the same? I think buffers would do it but I'll need to figure out how to persist buffers. The various buffer commands are exactly what is needed for quick navigation between files in a way that a visual tab can't support.

from vim-session.

xolox avatar xolox commented on July 19, 2024

I actually think Vim was designed exactly like you want to use it. I'm pretty sure Vim has supported buffers far longer than split windows and tab pages, which only appeared in Vim 7. And though I personally never edit more than 50 files Vim should support this just fine!

It's just my plug-in that doesn't persist open buffers at the moment... I'll see if I can add this feature today, it shouldn't be too much work.

from vim-session.

xolox avatar xolox commented on July 19, 2024

I just uploaded v1.2.2 to www.vim.org which includes experimental support for buffer list persistence. The feature should be enabled by default (if you haven't changed Vim's sessionoptions option). Please try it out and see if it works for you.

from vim-session.

cgrinds avatar cgrinds commented on July 19, 2024

Hi Peter - I opened 30 or so file, used SaveSession and quit VIM. When I restarted, all files were reopened as buffers. Looks like this does the trick. Thanks.

from vim-session.

xolox avatar xolox commented on July 19, 2024

No problem, I'm glad to hear that it works for you. Closing this issue now. Happy Vimming! :-)

from vim-session.

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.