Giter VIP home page Giter VIP logo

Comments (5)

junegunn avatar junegunn commented on August 17, 2024

This one is tricky. Actually Goyo command opens the current buffer in a separate window in a new tab. Your modifications to the folds are then only local to this new window. In order to apply the updated folds back to the original window, Goyo has to save the information using mkview command. However the command seems to have backward compatibility issue, in other words, it works differently on older versions on Vim. So I'm not sure if I want to implement this at the moment.

from goyo.vim.

rafaeln avatar rafaeln commented on August 17, 2024

What if you implemented a version check at the beginning of the script to decide whether to activate this functionality?

On Monday, April 28, 2014, Junegunn Choi [email protected] wrote:

This one is tricky. Actually Goyo command opens the current buffer in a
separate window in a new tab. Your modifications to the folds are then only
local to this new window. In order to apply the updated folds back to the
original window, Goyo has to save the information using mkview command.
However the command seems to have backward compatibility issue, in other
words, it works differently on older versions on Vim. So I'm not sure if I
want to implement this at the moment.

Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-41556959
.

from goyo.vim.

junegunn avatar junegunn commented on August 17, 2024

I've confirmed that :mkview works as expected on Vim 7.0 as well, I was mistaken. So, I was able to implement fold preservation using mkview and source (not loadview). However, I'm running into a number of nasty problems: enew triggered on unnamed or "nofile" buffers, syntax highlighting occasionally lost, mkview not working with close, etc. Currently I can't spend more time on this issue, but I'll try to keep you updated with the progress. And feel free to send me a pull request if you know a better way of doing it.

from goyo.vim.

rafaeln avatar rafaeln commented on August 17, 2024

I read the documentation of mkview and I concluded it did too many things. It would be nice to have a pair of functions that only saved/restored the folding. But since they don't exist, I also don't think it's worth anyone's time to try and implement this feature. I guess I'll just close this bug.

from goyo.vim.

junegunn avatar junegunn commented on August 17, 2024

I thought I was going to keep this issue open. But I guess you're right, obviously there's no clean way to accomplish it. Thanks.

from goyo.vim.

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.