Comments (5)
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.
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.
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.
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.
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)
- [Feature Request] Add function callbacks for before entering and leaving Goyo
- Lightline issue HOT 1
- Conflict with BufAdd and BufNewFile autocommands in my .vimrc
- Clarify docs around g:goyo_linenr
- Allow carriage returns
- Goyo, fzf and tabs issue. HOT 3
- Unknown Function: Running Goyo on Ubunti 22.04 HOT 4
- Remove ^^^^^^^^^^^^ at the end of page HOT 4
- Fix to syntax highlighting breaking (in lua)
- goyo doesn't hide lualine HOT 2
- Goyo enter and exit does not remove tmux HOT 5
- Determing if Goyo is Enabled via VimScript HOT 1
- Options are not mantained when changing buffers with fzf HOT 1
- Relationship between wrapmargin and textwidth setting in vimrc and goyo mode formatting/rendering
- Not allowed to change the window layout in this autocmd when quitting Goyo HOT 12
- When enabled, goyo creates empty buffers surrounding the current buffer in its window HOT 2
- wrong cursor position when switching between buffers
- Do not disable statusline? HOT 1
- Compatibility with BufExplorer
- Installable without a plugin manager HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goyo.vim.