The file list
Next on is the file list. The file list is something very special because it bears powerful features that ease your work with a lot of files and directories. So let's have a look!
You can always show/hide the list by pressing
Note that this shortcut has no effect if you are using the expanded display mode of the sidebar. See the Settings page for more on this.
The file list shows you all directories and files inside the directory that is currently selected in the tree view, but not like a normal file browser: the file list treats all subdirectories as equals, and shows you all of them one after another! Therefore you don't need to traverse further into the directory tree to reach buried directories.
If snippets are not visible, both directories and files will be shown as one-liner. Yet, if you activate the snippets, you will see additional information: directories will show you the amount of children they have — separated by type. The files, on the other hand, always show you their last modification date. If a file contains an ID, it will be displayed next. And if a file contains tags, the number will be shown after that. If you hover over the number of tags, you can see a small tooltip that shows you all tags that are in the file.
You can toggle the snippets via the View-menu or by pressing
If you want to sort directories, you can do this from within the file list. Simply move the mouse over any directory and two indicators will appear showing you the current state of sorting. Click on the first (with an arrow from A to Z) to toggle the sorting by name ascending or descending. The second toggles the sorting chronologically ascending or descending. Subdirectories will not be sorted this way — only files.
Also you can traverse the directory tree by clicking on the directories. A simple click will select the directory, while an
ALT-click will select its parent directory. This is useful if you have to switch directories often, but prefer the thin mode of the sidebar and don't want to hit switch to the tree view repeatedly.
Each time you select a directory in the tree view, the file list will display all files and directories in this directory. Simply put, it flattens all your different subdirectories and files from the tree-like structure that is being resembled by the directory list into a two-dimensional list. The list will always change its contents whenever you select a different directory in the tree view.
The list only displays all directories and files within the currently selected directory. Therefore it works a little bit like a very fast search function. You only see the files in a specific directory and, when you move down level by level, less and less files are visible until only one directory and its files are visible. Given a good structure inside your root, this is a powerful way to only have those files in the list that you actually need.
As the file list flattens your complex directory tree, it has to make some assumptions on how to adequately display the files. Therefore the following rules help you distinguish where the files are actually present on your disk:
- The currently selected directory name (indicated with a small label with green colour in light mode and a dark background with grey color in dark mode) will be on top of the list of files. Always.
- All files that are inside this directory are placed directly beneath this directory name.
- All subdirectories that are inside this directory will always be at the bottom of the file list, i.e. after the files that are present in the selected directory.
- If directories are empty, they will be placed immediately after each other with no files in between.
So what is important to remember is: All directories will be displayed as if they reside on the very same level; as if they weren't nested. To identify which directories contain which, please refer to the tree view.
The files and directories in Zettlr are always sorted by name ascending. So a directory beginning with an "A" will always be higher than a "D". Also, directories containing a zero will always come first, those containing a nine afterwards. But remember that a "10" will be placed before a "2" because the sorting only looks at one single character at a time and 1 is smaller than 2. If you want to use numbers for sorting, add leading zeroes.
Actions in the file list
There are many actions that refer to the list. First, just select a tile to open any file and display its contents in the editor.
You can move your files into different locations. Just drag them from the file list onto a directory in the directory tree. The directory you are hovering over will receive a slight shimmer to indicate where your file is going to be moved. Just drop the file there, to move it or drop the file everywhere else to abort the moving and revert the file to its original position.
If you drag a file outside of the app, you are able to share the file with other programs. To cancel this dragging-out, simply release the mouse over your app again.
Another useful feature of the file list is to help you distinguish what search results are the most relevant. Once you've executed a search, the list will change its colour like a chameleon. It will paint all files in 50 shades of green (yep, I've just made that joke). The greener a file is, the more relevant the file is to your current search.
This is a feature one might call a "heatmap" for fulltext searches.
Please remember that the list is highly adaptable and will morph a lot while you use the app. For instance, it will not only display all files and directories in the currently selected directory, but also hides files with no results from the preview list, when the list is in search-mode.