Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [code-folding]

Code folding is a feature of some text editors and IDEs that allow some text to be temporarily hidden or "collapsed" in order to hide detail.

2
votes
1answer
63 views

Folding code between defined functions in Overleaf

I am using Overleaf with compiler pdfLaTeX (not sure if this is important), and want to have subsections of different colors, such as the example shown below after the end of the question. It all ...
7
votes
1answer
152 views

Code folding specific environments with TeXstudio?

Using TeXstudio, it is possible to fold sections of code. On the left hand side there appear small arrow markers which if you click will fold sections of code. Here is an example. and after clicking ...
0
votes
0answers
32 views

AUCTeX fold mode: How to fold all environments

In AUCTeX fold mode, C-c C-o C-e folds the environment where the cursor is. How can I fold all environments (not macros) in a buffer?
1
vote
0answers
84 views

How to save folded code in Texmaker? [closed]

I'm using Texmaker 5.0.2 on Ubuntu 17.04. Is there any way to save the foldings I set in my LaTeX code? I tried saving session but it doesn't seem to work.
1
vote
0answers
70 views

Macro to fold-in %BEGIN_FOLD on opening file?

is there any way to get TeXstudio to always display all %BEGIN_FOLD ... %END_FOLD blocks folded in when opening a file? Possibly using a macro? Thanks a lot! rmh
1
vote
0answers
400 views

How do I hide large comments that is already commented out?

\documentclass{article} \usepackage{comment} \begin{document} \begin{comment} lots of stuff here \end{comment} \end{document} Is there a way to "hide" or minimise the entire comment ...
2
votes
1answer
439 views

Code folding in Kile

Kile allows me to fold the ocde in between begin-end blocks. However, I am interested in manually grouping parts of the text. Is there a way to do that? To give an example from another IDE, Netbeans ...
8
votes
1answer
4k views

How to code-fold in TeX-Studio or LaTeX in general?

I want to fold the whole part before \begin{document} where it is just formatting the LaTeX document. Is there a way to do this in LaTeX, in general, or at least in TeXstudio? Could I use some \begin{}...
3
votes
1answer
743 views

Folding commented sections in Texstudio 2.6.6

I want to know, if and how can I apply code folding to commented out sections in Texstudio 2.6.6?
0
votes
0answers
368 views

LaTeX editor with in-line folding

Quick question. Are there LaTeX editors that can do in-line folding? That is, that can fold a demarcated piece of code or text without having that piece of code or text on its own line or group of ...
2
votes
0answers
250 views

AUCTeX folding and square brackets in math mode

I want to use the folding functionality of AUCTeX, mainly to replace math macros with the corresponding symbols. But at the same time I want to continue to use square or curly brackets additionally to ...
4
votes
1answer
147 views

Auctex: bug in LaTeX-mark-environment?

Before I send this on to the developers, I'd like to know if others can confirm this problem. Consider these two environments: \begin{flalign*} sdfsdf \end{flalign*} \begin{flalign*} && ...
1
vote
1answer
1k views

How can I fold sections containing include commands in TeXMaker?

I have used Emacs to edit my .tex files and I got used to the fold/unfold option. I am back to TeXMaker for some time and I would like to also fold/unfold sections, subsections and so on. This can be ...
1
vote
1answer
296 views

Folding file-specific macros in AUCTeX

What is the best way to have AUCTeX fold some math macros specifically for one file? For example in this very trivial example: \documentclass{minimal} \newcommand{\foo}{\lambda} \begin{document} $\...
1
vote
1answer
534 views

How to use code folding with Aquamacs?

I would like to use code folding with Aquamacs but I don't find any reference to do it. I would like to fold the figure and the paragraph. I've already tried all the combination listed here. Can ...
9
votes
1answer
2k views

vim: nice folding function

I use Latex-Box but I really like vim-latex (a.k.a Latex-Suite) folding. I tried to copy Latex-Suite's folding.vim file to my ftplugin/tex folder but cannot make it work. Has anyone written a nice ...
3
votes
1answer
119 views

Maintain display of arguments for certain folded environments with AUCTeX

When working with some environments (function and friends from l3doc prompted this), it is desirable to have the environment's arguments visible at all times: Some text that, in reality, shouldn't be ...
24
votes
1answer
969 views

Folding braces in Emacs/AucTeX

I have some code looking like this: 142 \newcommand*\john[2]{ 143 blah blah blah blah 144 blah blah 145 blah blah blah 146 blah 147 } 148 149 \newcommand*\peter[3]{ 150 blah blah ...
10
votes
2answers
4k views

Folding entire section in AUCTeX?

I'm new to AUCTeX and I wonder: is it possible to fold entire sections or subsections of a LaTeX document for a better overview, so that they are only represented by their headline (kind of a tree ...
16
votes
2answers
7k views

Code folding in LaTeX

The editor that I use, Texmaker, provides code folding only for things in the language, like \section and \begin{foo} ... \end{foo}. I would like to be able to make my own folding sections, like in ...
4
votes
3answers
698 views

Is there an editor with code block folding, one click dvi-ps-pdf compilation, etc?

I am a Windows user and using TeXnicCenter now. But I want to change to another one because TeXnicCenter does not provide us with a code block folding. The new editor I want to use: runs on Windows. ...
10
votes
2answers
2k views

Can one “fold” part of the paragraphs in LyX

By "folding", I mean condense some part of the codes, and by one click , you can unfold them.