# QueryFlag: Settings

> For the complete documentation index, see [llms.txt](https://edgafner.github.io/llms.txt).

> **TL;DR**
> Settings: `Settings | Tools | Database | QueryFlag` (DataGrip: `Settings | Database | QueryFlag`)
>
>
>
> Shortcut: `Ctrl+Alt+S` (macOS: `⌘ ,`), then search for `QueryFlag`

To open the QueryFlag settings, press `Ctrl+Alt+S` (macOS: `⌘ ,`) and select `Tools | Database | QueryFlag`. In DataGrip, select `Database | QueryFlag`.

## Settings reference

Template list
: Lists your templates. Each row shows the database type icon, the template name, and the first 50 characters of the query. If the template's data source is not available in the current project, the row shows "DataSource not found, please check your Databases settings" in red instead of the query.
:
:
:
: Use the Add, Remove, and Edit toolbar buttons to manage templates. See [QueryFlag: Create query templates](queryflag-create-templates.html).
:
:
:
: The Query Flag in DB menu lists templates in the order of this list. New templates go to the end of the list, and so does a template that you change. You cannot sort or reorder the list.

Open console editor
: Opens the query console that QueryFlag creates for each run in the editor, so you can see and edit the query that ran. Default: off.

Allow blank Text
: Runs templates when the selection is empty or contains only spaces. When this option is off, QueryFlag skips the run and shows a warning. Default: off.

## Save changes

Changes on this page take effect when you click Apply or OK. Templates that you create with Add Query Flag in a query console are saved immediately.

## Where QueryFlag stores settings

QueryFlag stores its settings for the whole IDE, not per project, in the `options` folder of the [IDE configuration directory](https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory):

query_flag.xml
: The templates. Backup and Sync does not sync this file.
:
:
:
: To reuse your templates on another computer, copy this file to the same folder there while the IDE is closed. Templates refer to data sources by their ID, so they work only where the same data sources exist, for example in a project whose data sources are shared through version control. Otherwise, edit each template and select its data source again.

query_flag_settings.xml
: The Open console editor and Allow blank Text options.
:
:
:
: If you use [Backup and Sync](https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html) (formerly Settings Sync), these options sync with the Tools category.

Uninstalling QueryFlag does not delete these files, so your templates are still there if you install QueryFlag again.

A template stores the name, ID, and URL of its data source, but no password. The data source in the Database tool window keeps its own connection settings.

## Notifications

QueryFlag shows its warnings in the notification group QueryFlag development. To change how they appear, open `Settings | Appearance & Behavior | Notifications`.

## See also

### Related topics

[QueryFlag: Create query templates](queryflag-create-templates.html) [QueryFlag: Run a query on selected text](work-with-queryflag.html) [QueryFlag: Troubleshooting](queryflag-troubleshooting.html)

### Useful resources

[Query consoles (IntelliJ IDEA help)](https://www.jetbrains.com/help/idea/query-consoles.html) [IDE settings backup and sync (IntelliJ IDEA help)](https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html)

