I´m having some trouble working with Winedt 8 and 9 and VerbatimPlus add-on. Here is my MWE.

File "main.tex"

\usepackage[utf8]{inputenc} % Codificação da entrada
\usepackage{lmodern}        % Fonte Latin Modern
\usepackage[T1]{fontenc}    % Codificação da Saída
\usepackage[brazil]{babel}  % Português Brasil

% including file with document divisions

  \section{Not to show in Tree view}


File "listingerror.tex"


To understand the problem just look at the images below. The first shows the Winedt 9 tree view of the document structure without the VerbatimPlus installed. It´s the known problem of Winedt not working right with verbatim-like environments like lstlisting

Winedt 9 without VerbatimPlus installed

The second image shows the same file but now with the VerbatimPlus installed. The problem is that the syntax highlight is correct, but the tree view is not. It´s gathering the content of the lstinputlisting as real divisions of the document not considering it´s a verbatim environment.

enter image description here

I hope I made myself clear about the problem. What I want is have the correct tree view and corret highlight of the document in winedt. Anybody knows how to fix it?

  • Thanks @T.Verron I read a lot here but it´s my first question. Hope everything is ok with the rules of the tex.sx.
    – Smarzaro
    Commented Nov 14, 2014 at 11:12

1 Answer 1


Update (2017-02-14)

The workaround desribed in this answer is not needed anymore if you upgrade to WinEdt 10.2.

WinEdt 10.2 considers verbatim input like the one inserted with \lstinputlisting like "verbatim" stuff, that is nothing inside them is collected in its Tree and Gather interfaces and it is not used for folding purposes.

Original answer

There's no easy solution for this.

The only way not to collect sectional commands is to not collect the file.

To do that, Go to "Options" -> "Options Interface" and double-click the "Input Directives" branch:

enter image description here

A local copy of Input.ini gets opened. In this file remove the lines


At this point press Shift+Ctrl+F9 to reload the file.

Now the unwanted sectional commands coming from listingerror.tex are not collected anymore:

enter image description here

  • thanks. It worked. I don´t see the point to winedt gather the contents of a verbatim-like environment. If VerbatimPlus made this modification to the input.ini the macro for installations should be updated. Or maybe there is a point I´m missing. Anyway, thanks again.
    – Smarzaro
    Commented Nov 15, 2014 at 12:36
  • @karlkoeller, is it possible to add new verbatim environment to VerbatimPlus?
    – fajar
    Commented Nov 21, 2014 at 0:29
  • 1
    @fajar I've answered your question Commented Nov 30, 2014 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .