Comments (12)
Interesting... does this happen if you create a new tab in Vim, open a few buffers then close the tab and return to the file with the manual folds? This is essentially all that Vdebug should be doing, so it might be that it's something that Vim does. Unless there's some weird side effect going on!
from vdebug.
Only happens with Vdebug as far as I can tell.
from vdebug.
OK, intriguing. Will investigate.
from vdebug.
Hi there,
Finally been able to give this some time, but I can't reproduce it: folds are remembered for me. Can you give me an example of the steps you're using, with vim commands?
Thanks
from vdebug.
- Open a vim file with folds, or
:set fdm=manual
and make some zM
: close all foldszo
on a fold: open it<F10>
: set a breakpoint<F5>
: start debugging
The fold(s) should be reset/destroyed by this point. Best tried with manual folds for full effect.
Edit: Also, it is not necessary to set a breakpoint. Simply starting the debugger will do it.
from vdebug.
Hi Quinn,
I've managed to reproduce this with setting foldmethod
to marker and setting a manual fold. It appears that reloading the file in vim (e.g. with :e
) clears manual folds defined in that file, and that's what Vdebug is doing - it loads every file that Xdebug (or whichever engine) tells it to, and if you've defined manual folds then they get cleared as a result of Vim's normal behaviour.
Do you know if there's any "soft" loading that Vim can do? I.e. load the file only if there isn't already a buffer, otherwise show that buffer?
Thanks
from vdebug.
function s:edit(filename)
try
execute 'buffer' fnameescape(a:filename)
catch /^Vim\%((\a\+)\)\=:E94/
execute 'edit' fnameescape(a:filename)
endtry
endfunction
Should do the trick.
Edit: added fnameescape() for good measure (unsure if your filenames will already be escaped)
from vdebug.
Nice, thanks for that. I'll give it a whirl when I can.
from vdebug.
Hey Quinn,
I added your function (slightly modified) and managed to get some manual folds remembered. Seems to work pretty well, but if you could give the updated dev branch a go you're probably best placed to test it.
Cheers
from vdebug.
@qstrahl have you given this a go?
Thanks
from vdebug.
Sorry, completely forgot about this! I'd love to close the issue, but currently can't confirm due to #84
from vdebug.
Confirmed fixed as of cb9ebd3
from vdebug.
Related Issues (20)
- modern vdebug: does it play nicely with neovim and xdebug v3.0.2?
- nvim freezes on xdebug connection, then `Error starting Vdebug: <class 'EOFError'>` in the statusline
- Option to disable automatic updating of watch window
- No module found 'dbgp' but I am in a dbgp directory HOT 1
- VdebugEval! Can't get values of array at depth > 1 HOT 3
- Wrong reference in the VimPlug instalation at VimAwesome
- Python program stuck after debugging finish (cursor reach end of program)
- Infinite-ish recursion on singleton classes HOT 1
- No option with key 'autostart' HOT 1
- Vim hangs up connection without stopping on breaking point HOT 3
- Cannot expand or collapse HOT 1
- TypeError when empty xml elements in response HOT 1
- Are there plans for a new release?
- Update README PHP setup with Xdebug HOT 1
- Security concern
- Problems defining close keymap in neovim with lazy plugin manager
- Path maps not working HOT 1
- Error detected while processing /Users/***/vdebug.vim[343]..function Vdebug_load_options[8]..<SNR>11_DefineSigns HOT 1
- Setting up Vdebug without php.ini access
- Syntax warning: invalid escape sequence 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 vdebug.