Writing in the editor

Auto-insert, autocomplete, syntax coloring, Markdown preview, and margin markers.

Murfy's editor helps you write faster. Unless noted, the writing aids below work in .tex, .cls, and .sty files. For the formatting shortcuts, see Keyboard shortcuts and tutorial.

Auto-insert

When youThe editor
Press Enter or Tab on a line with \begin{name} that has no matching \end{name}Adds \end{name} below and puts the cursor on the empty line between them
Press Enter on a line that starts with \item inside itemize or enumerateStarts the next line with \item
Press Enter on a line that starts with \item inside descriptionStarts the next line with \item[] and puts the cursor between the brackets
Type {, [, (, \[, \(, or $Types the closing partner for you
Type $$Creates a $$ block with an empty line in the middle and puts the cursor there
Press Backspace between an empty pair {}, [], or ()Deletes both brackets
Type ), ], or } right before the same closing bracketMoves the cursor past it instead of adding another one (in every file type)

Autocomplete

Suggestions appear as you type. Move through them with the arrow keys and press Enter to accept one.

  • Type \ and the first letters of a command to see matching commands.
  • Type \begin{ to see environment names.
  • Inside the braces of these commands, Murfy suggests values from your project:
CommandSuggestions
\usepackage{Package names
\input{, \include{, \subfile{.tex files in the project
\cite{ and related commands such as \citet{ and \citep{Citation keys from the .bib files in the project
\bibliography{.bib files in the project
\bibliographystyle{Bibliography styles
\includegraphics{Image files in the project (.jpg, .jpeg, .png, .pdf, .eps)
\ref{, \eqref{, \pageref{, \nameref{, \autoref{, \Cref{, \cref{, \labelcref{Labels defined with \label in the file you're editing
\pagenumbering{Page numbering styles

Suggestions don't appear inside math.

Syntax coloring

Murfy colors the text according to the file type.

FilesColoring
.tex, .cls, .styLaTeX
.bblIts own coloring for .bbl files
.bibBibTeX
.md, .markdownMarkdown
Other text filesNo special coloring

Markers in the margin

After you compile, errors and warnings from the compile log appear as markers in the margin next to the line numbers, on the matching line of the file. Hover over a marker to read its message.

If Inspections is on in Project settings, syntax problems and missing commands appear as markers in the same place. Inspections don't run on Markdown files.

Preview Markdown files

When a .md file is open, a Preview toggle appears in the file header. Turn it on to see the rendered text instead of the source. Turn it off to edit again. You can also press Ctrl + Shift + M (⌘ + Shift + M on Mac).

The preview supports math formulas, code blocks, and links and images that point to files in your project. People with view access can use Preview too.

Cursor position

Murfy remembers where your cursor was in each file and returns there when you open the file again. This is saved in your browser.