Coder Social home page Coder Social logo

Comments (10)

lervag avatar lervag commented on May 10, 2024

Interesting. This does not happen with me. Do you set the foldlevel somewhere? Try :verbose set foldlevel to see where it was set the last time.

from vimtex.

nasenatmer avatar nasenatmer commented on May 10, 2024

:verbose set foldlevel yields foldlevel=0

Notice, I also tried this in gvim which does show the same behaviour

from vimtex.

lervag avatar lervag commented on May 10, 2024

Strange. I have no idea what causes this. Could you try to create a minimum working example? What version of vim are you using?

from vimtex.

nasenatmer avatar nasenatmer commented on May 10, 2024

Here's a minimum working example which shows the same behaviour:

\documentclass{scrartcl}
\usepackage{biblatex} % one additional line to \documentclass is necessary for folding to happen
\begin{document}
\section{Intro}
Hello
\end{document}

I Included a section to test whether automatic folding at startup works or not. My vim version is the current one from Archlinux, 7.4.459

I also used this mini vimrc, same result. Additionally, I renamed my ftplugin/tex.vim so it doesn't get sourced, but still no change.

But if it works for you and as this still is just a minor problem that actually might be local to my machine only, I think we shouldn't spend too much effort on this. Except if you have any quick idea, I'd be happy to help…

from vimtex.

lervag avatar lervag commented on May 10, 2024

Thanks, your MWE reproduces the problem for me. If I add a line above the documentclass, then the problem goes away. I'll investigate further when I get some time. In the meantime, you could add a simple comment as your first line.

from vimtex.

lervag avatar lervag commented on May 10, 2024

This very simple commit seems to fix the issue. Let me know if it works for you as well.

from vimtex.

nasenatmer avatar nasenatmer commented on May 10, 2024

Indeed. Empty first line solves the problem. Thats a good workaround for the the time being! Do you always have empty or commented first lines?

from vimtex.

lervag avatar lervag commented on May 10, 2024

Haha, sorry, I just forgot to push. Try the latest version.

from vimtex.

nasenatmer avatar nasenatmer commented on May 10, 2024

Works, nice one! Thanks a lot!

from vimtex.

lervag avatar lervag commented on May 10, 2024

Great!

from vimtex.

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.