Difference between revisions of "Shortcuts"

From BaseX Documentation
Jump to navigation Jump to search
(39 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page is part of the [[Getting Started]] Section.
+
This article is about the [[GUI]] of BaseX.
It gives you an overview of the hotkeys available in the GUI of BaseX.
+
It gives you an overview of the most important hotkeys available in the visual frontend.
  
== Global Shortcuts ==
+
<div style="float:left; width:100%;">
 +
 
 +
=Editor=
 +
 
 +
==Code Completions==
 +
 
 +
The GUI editor provides various code completions, which simplify the authoring of complex XQuery applications. Opening elements, comments, quotes or brackets will automatically be closed, and new lines will automatically be indented.
 +
 
 +
If some characters have been entered, and if the [[#Editor Shortcuts|shortcut]] for code completions is pressed (Ctrl Space), a popup menu will appear and provides some code templates. If only one completion is possible, it will automatically be inserted.
 +
 
 +
==Editor Shortcuts==
  
The following shortcuts are available from most GUI components:
+
The text editor can be used to create, edit, save and execute XQuery expressions, XML documents and any other textual files.
 +
</div>
  
 
<div style="float:left; width:48%;">
 
<div style="float:left; width:48%;">
 +
=== Query Execution ===
 +
 
{|width="100%" class="wikitable sortable"
 
{|width="100%" class="wikitable sortable"
 
|-
 
|-
Line 13: Line 26:
 
|'''Mac'''
 
|'''Mac'''
 
|-
 
|-
|valign="top"|Jump to input bar
+
|Execute XQuery
|valign="top"|F6
+
|Ctrl Enter
|valign="top"|⌘ F6
+
|⌘ Enter
 
|-
 
|-
|Jump to next/previous panel
+
|Execute XQUnit tests
|Ctrl (Shift) Tab
+
|Ctrl Shift Enter
|Ctrl (Shift) Tab
+
|⌘ Shift Enter
 
|-
 
|-
|valign="top"|Increase/Decrease font size
+
|Edit external variables
|valign="top"|Ctrl +/-
+
|Ctrl Shift E
|valign="top"|⌘ +/-
+
|⌘ Shift E
 
|-
 
|-
|valign="top"|Reset font size
+
|Result indentation on/off
|valign="top"|Ctrl 0
+
|Ctrl Shift I ({{Announce|new}})
|valign="top"|⌘ 0
+
|⌘ Shift I ({{Announce|new}})
 
|}
 
|}
</div><div style="float:left; width:4%;">&nbsp;
+
 
</div><div style="float:left; width:48%;">
+
=== Custom Editing ===
 +
 
 
{|width="100%" class="wikitable sortable"
 
{|width="100%" class="wikitable sortable"
 
|-
 
|-
Line 37: Line 51:
 
|'''Mac'''
 
|'''Mac'''
 
|-
 
|-
|valign="top"|Browse back/forward
+
|Performs [[#Code Completions|Code Completions]]
|valign="top"|Alt ←/→<br/>Backspace
+
|Ctrl Space
|valign="top"|⌘ ←/→
+
|Ctrl Space
 +
|-
 +
|Sort lines
 +
|Ctrl U
 +
|⌘ U
 +
|-
 +
|(Un)comment selection/line
 +
|Ctrl K
 +
|⌘ K
 +
|-
 +
|Delete line(s)
 +
|Ctrl Shift D
 +
|⌘ Shift D
 +
|-
 +
|Duplicate line(s)
 +
|Ctrl D
 +
|⌘ D
 +
|-
 +
|Lower case
 +
|Ctrl Shift L
 +
|⌘ Shift L
 +
|-
 +
|Upper case
 +
|Ctrl Shift U
 +
|⌘ Shift U
 
|-
 
|-
|Browse one level up
+
|Title case
|Alt ↑
+
|Ctrl Shift T
|⌘ ↑
+
|⌘ Shift T
 
|-
 
|-
|Browse to the root node
+
|Format code (experimental)
|Alt Home
+
|Ctrl Shift F
|⌘ Home
+
|⌘ Shift F
 
|}
 
|}
</div>
 
  
<div style="float:left; width:100%;">
+
=== Finding ===
 
 
== Editor Shortcuts ==
 
  
The text editor can be used to create, edit, save and execute XQuery expressions, XML documents and any other textual files.
 
</div>
 
 
<div style="float:left; width:48%;">
 
=== Custom Editing ===
 
 
{|width="100%" class="wikitable sortable"
 
{|width="100%" class="wikitable sortable"
 
|-
 
|-
Line 66: Line 96:
 
|'''Mac'''
 
|'''Mac'''
 
|-
 
|-
|Performs [[#Code Completions|Code Completions]]
+
|Search highlighted string in project
|Ctrl Space
+
|Ctrl H
|⌘ Space
+
|⌘ Shift H
 +
|-
 +
|Jump to next error in project
 +
|Ctrl . (period)
 +
|⌘ . (period)
 +
|-
 +
|Jump to currently edited file
 +
|Ctrl J
 +
|⌘ J
 +
|-
 +
|Go to line
 +
|Ctrl L
 +
|⌘ L
 +
|-
 +
|Find and replace text
 +
|Ctrl F
 +
|⌘ F
 +
|-
 +
|Find next instance of text
 +
|F3<br/>Ctrl G
 +
|⌘ F3<br/>⌘ G
 
|-
 
|-
|(Un)comment selection/line
+
|Find previous instance of text
|Ctrl K
+
|Shift F3<br/>Ctrl Shift G
|⌘ K
+
|⌘ Shift F3<br/>⌘ Shift G
 
|-
 
|-
|Delete complete line
+
|Jump to file history
|Ctrl Shift D
+
|Ctrl F6 ({{Announce|new}})
|⌘ Shift D
+
|⌘ F6 ({{Announce|new}})
 
|}
 
|}
 +
</div><div style="float:left; width:4%;">&nbsp;
 +
</div><div style="float:left; width:48%;">
  
 
=== Standard Editing ===
 
=== Standard Editing ===
Line 136: Line 188:
 
|}
 
|}
  
</div><div style="float:left; width:4%;">&nbsp;
+
=== Navigation ===
</div><div style="float:left; width:48%;">
 
 
 
=== Finding ===
 
{|width="100%" class="wikitable sortable"
 
|-
 
|'''Description'''
 
|'''Win/Linux'''
 
|'''Mac'''
 
|-
 
|Jump to next error
 
|Ctrl . (period)
 
|⌘ . (period)
 
|-
 
|Go to line
 
|Ctrl L
 
|⌘ L
 
|-
 
|Find and replace text
 
|Ctrl F
 
|⌘ F
 
|-
 
|Find next instance of text
 
|F3<br/>Ctrl G
 
|⌘ F3<br/>⌘ G
 
|-
 
|Find previous instance of text
 
|Shift F3<br/>Ctrl Shift G
 
|⌘ Shift F3<br/>⌘ Shift G
 
|}
 
  
=== Navigation ===
 
 
{|width="100%" class="wikitable sortable"
 
{|width="100%" class="wikitable sortable"
 
|-
 
|-
Line 202: Line 224:
 
|Alt ↑/↓
 
|Alt ↑/↓
 
|}
 
|}
 +
</div>
 +
 +
<div style="float:left; width:100%;">
 +
 +
=GUI=
 +
 +
== Global Shortcuts ==
 +
 +
The following shortcuts are available from most GUI components:
 +
 +
<div style="float:left; width:48%;">
 +
{|width="100%" class="wikitable sortable"
 +
|-
 +
|'''Description'''
 +
|'''Win/Linux'''
 +
|'''Mac'''
 +
|-
 +
|valign="top"|Focus input bar
 +
|valign="top"|F8 ({{Announce|before: F6}})
 +
|valign="top"|⌘ F8 ({{Announce|before: ⌘ F6}})
 +
|-
 +
|valign="top"|Focus editor view
 +
|valign="top"|F12
 +
|valign="top"|⌘ F12
 +
|-
 +
|valign="top"|Focus result view
 +
|valign="top"|Shift F12 ({{Announce|new}})
 +
|valign="top"|Shift ⌘ F12 ({{Announce|new}})
 +
|-
 +
|Jump to next/previous panel
 +
|Ctrl (Shift) Tab
 +
|Ctrl (Shift) Tab
 +
|-
 +
|valign="top"|Increase/Decrease font size
 +
|valign="top"|Ctrl +/-
 +
|valign="top"|⌘ +/-
 +
|-
 +
|valign="top"|Reset font size
 +
|valign="top"|Ctrl 0
 +
|valign="top"|⌘ 0
 +
|}
 +
</div><div style="float:left; width:4%;">&nbsp;
 +
</div><div style="float:left; width:48%;">
 +
{|width="100%" class="wikitable sortable"
 +
|-
 +
|'''Description'''
 +
|'''Win/Linux'''
 +
|'''Mac'''
 +
|-
 +
|valign="top"|Browse back/forward
 +
|valign="top"|Alt ←/→<br/>Backspace
 +
|valign="top"|⌘ ←/→
 +
|-
 +
|Browse one level up
 +
|Alt ↑
 +
|⌘ ↑
 +
|-
 +
|Browse to the root node
 +
|Alt Home
 +
|⌘ Home
 +
|}
 +
</div>
 
</div>
 
</div>
  
Line 207: Line 291:
  
 
== Menu Shortcuts ==
 
== Menu Shortcuts ==
 
{{Mark|Updated with Version 7.8:}}
 
  
 
The following commands and options are also linked from the main menu:
 
The following commands and options are also linked from the main menu:
Line 283: Line 365:
 
|Ctrl P
 
|Ctrl P
 
|⌘ P
 
|⌘ P
|-
 
|Find files
 
|Ctrl Shift F
 
|⌘ Shift F
 
 
|-
 
|-
 
|Toggle result view
 
|Toggle result view
Line 357: Line 435:
  
 
</div>
 
</div>
 +
 
<div style="float:left; width:100%;">
 
<div style="float:left; width:100%;">
  
==Code Completions==
+
Additionally, the names of HTML entities will be converted to their Unicode representation (as an example, {{Code|Auml}} will be translated to {{Code|ä}}).
  
{{Mark|Introduced with Version 7.8:}}
+
=Changelog=
  
The GUI editor provides various code completions, which simplify the authoring of complex XQuery applications. Opening elements, comments, quotes or brackets will automatically be closed, and new lines will automatically be indented. If the [[#Editor Shortcut|shortcut]] for code completions is pressed, the keys listed in the following table will be replaced with their corresponding values. An underscore indicates where the cursor will be placed after the replacement:
+
;Version 10.0
 +
* Updated: Some shortcuts were modified.
  
<div style="float:left; width:48%;">
+
;Version 8.4
{|width="100%" class="wikitable sortable"
+
* Added: Duplicate line (Ctrl D)
|-
 
|'''Key'''
 
|'''Value'''
 
|-
 
|<code>..</code>
 
|<code>parent::node()</code>
 
|-
 
|<code>.</code>
 
|<code>self::node()</code>
 
|-
 
|<code>//</code>
 
|<code>/descendant-or-self::node()/</code>
 
|-
 
|<code>/</code>
 
|<code>root()</code>
 
|-
 
|<code>@</code>
 
|<code>attribute</code>
 
|-
 
|<code>an</code>
 
|<code>ancestor::</code>
 
|-
 
|<code>as</code>
 
|<code>ancestor-or-self::</code>
 
|-
 
|<code>copy</code>
 
|<code>copy $_ := <br/>modify <br/>return </code>
 
|-
 
|<code>cr</code>
 
|<code>&amp;xD;</code>
 
|-
 
|<code>ch</code>
 
|<code>child::</code>
 
|-
 
|<code>ct</code>
 
|<code>contains text</code>
 
|-
 
|<code>de</code>
 
|<code>descendant::</code>
 
|-
 
|<code>ds</code>
 
|<code>descendant-or-self::</code>
 
|-
 
|<code>declnl</code>
 
|<code>declare option output:item-separator "&amp;#xA;";</code>
 
|-
 
|<code>declns</code>
 
|<code>declare namespace _ = "";</code>
 
|-
 
|<code>delete</code>
 
|<code>delete node _</code>
 
|-
 
|<code>dump</code>
 
|<code>prof:dump(_)</code>
 
|-
 
|<code>fo</code>
 
|<code>following::</code>
 
|-
 
|<code>for</code>
 
|<code>for $_ in <br/>return </code>
 
|-
 
|<code>fs</code>
 
|<code>following-sibling::</code>
 
|-
 
|<code>function</code>
 
|<code>declare function _() {<br/>  <br/>};</code>
 
|-
 
|<code>group</code>
 
|<code>group by $_</code>
 
|-
 
|<code>import</code>
 
|<code>import module namespace _ = "";</code>
 
|}
 
</div><div style="float:left; width:4%;">&nbsp;
 
</div><div style="float:left; width:48%;">
 
{|width="100%" class="wikitable sortable"
 
|-
 
|'''Key'''
 
|'''Value'''
 
|-
 
|<code>insert</code>
 
|<code>insert node _ into </code>
 
|-
 
|<code>let</code>
 
|<code>let $_ := <br/>return </code>
 
|-
 
|<code>module</code>
 
|<code>module namespace _ = "";</code>
 
|-
 
|<code>nl</code>
 
|<code>&amp;xA;</code>
 
|-
 
|<code>ns</code>
 
|<code>namespace</code>
 
|-
 
|<code>order</code>
 
|<code>order by _</code>
 
|-
 
|<code>pa</code>
 
|<code>parent::</code>
 
|-
 
|<code>pr</code>
 
|<code>preceding::</code>
 
|-
 
|<code>ps</code>
 
|<code>preceding-sibling::</code>
 
|-
 
|<code>rename</code>
 
|<code>rename node _ as </code>
 
|-
 
|<code>replace value</code>
 
|<code>replace value of node _ with </code>
 
|-
 
|<code>replace</code>
 
|<code>replace node _ with </code>
 
|-
 
|<code>some</code>
 
|<code>some $_ in <br/>satisfies </code>
 
|-
 
|<code>switch</code>
 
|<code>switch(_)<br/>  case  return <br/>  default return </code>
 
|-
 
|<code>tab</code>
 
|<code>&amp;#x9;</code>
 
|-
 
|<code>trace</code>
 
|<code>trace(_ , 'Info: ')</code>
 
|-
 
|<code>try</code>
 
|<code>try {<br/>  _<br/>} catch * {<br/>  <br/>}</code>
 
|-
 
|<code>typeswitch</code>
 
|<code>typeswitch(_)<br/>  case  return <br/>  default return </code>
 
|-
 
|<code>variable</code>
 
|<code>declare variable $_ := ;</code>
 
|}
 
</div>
 
</div>
 
  
<div style="float:left; width:100%;">
+
;Version 8.4
 +
* Added: Lower case (Ctrl Shift L), Upper case (Ctrl Shift U), Title case (Ctrl Shift T)
  
Additionally, the names of HTML entities will be converted to their Unicode representation (as an example, {{Code|Auml}} will be translated to {{Code|ä}}).
+
;Version 8.0
 +
* Added: New code completions, popup menu
  
==Changelog==
+
;Version 7.8.2
 +
* Added: Sort lines (Ctrl U)
  
 
;Version 7.8
 
;Version 7.8
 
 
* Added: [[#Code Completions|Code Completions]],  Project (Ctrl P), Find Files (Ctrl Shift F)
 
* Added: [[#Code Completions|Code Completions]],  Project (Ctrl P), Find Files (Ctrl Shift F)
  
 
;Version 7.5
 
;Version 7.5
 
 
* Added: go to line (Ctrl F)
 
* Added: go to line (Ctrl F)
  
 
;Version 7.3
 
;Version 7.3
 
+
* Added: delete line(s) (Ctrl Shift D), jump to highlighted error (Ctrl .)
* Added: delete complete line (Ctrl Shift D), jump to highlighted error (Ctrl .)
 
 
</div>
 
</div>

Revision as of 10:55, 1 August 2022

This article is about the GUI of BaseX. It gives you an overview of the most important hotkeys available in the visual frontend.

Editor

Code Completions

The GUI editor provides various code completions, which simplify the authoring of complex XQuery applications. Opening elements, comments, quotes or brackets will automatically be closed, and new lines will automatically be indented.

If some characters have been entered, and if the shortcut for code completions is pressed (Ctrl Space), a popup menu will appear and provides some code templates. If only one completion is possible, it will automatically be inserted.

Editor Shortcuts

The text editor can be used to create, edit, save and execute XQuery expressions, XML documents and any other textual files.

Query Execution

Description Win/Linux Mac
Execute XQuery Ctrl Enter ⌘ Enter
Execute XQUnit tests Ctrl Shift Enter ⌘ Shift Enter
Edit external variables Ctrl Shift E ⌘ Shift E
Result indentation on/off Ctrl Shift I (new) ⌘ Shift I (new)

Custom Editing

Description Win/Linux Mac
Performs Code Completions Ctrl Space Ctrl Space
Sort lines Ctrl U ⌘ U
(Un)comment selection/line Ctrl K ⌘ K
Delete line(s) Ctrl Shift D ⌘ Shift D
Duplicate line(s) Ctrl D ⌘ D
Lower case Ctrl Shift L ⌘ Shift L
Upper case Ctrl Shift U ⌘ Shift U
Title case Ctrl Shift T ⌘ Shift T
Format code (experimental) Ctrl Shift F ⌘ Shift F

Finding

Description Win/Linux Mac
Search highlighted string in project Ctrl H ⌘ Shift H
Jump to next error in project Ctrl . (period) ⌘ . (period)
Jump to currently edited file Ctrl J ⌘ J
Go to line Ctrl L ⌘ L
Find and replace text Ctrl F ⌘ F
Find next instance of text F3
Ctrl G
⌘ F3
⌘ G
Find previous instance of text Shift F3
Ctrl Shift G
⌘ Shift F3
⌘ Shift G
Jump to file history Ctrl F6 (new) ⌘ F6 (new)
 

Standard Editing

Description Win/Linux Mac
Undo recent changes Ctrl Z ⌘ Z
Redo recent changes Ctrl Y ⌘ Shift Z
Cut selection Ctrl X
Ctrl Delete
⌘ X
Copy selection to clipboard Ctrl C
Ctrl Insert
⌘ C
Paste from clipboard Ctrl V
Shift Insert
⌘ V
Select All Ctrl A ⌘ A
Delete character left of cursor Backspace Backspace
Delete character right of cursor Delete Delete (fn Backspace)
Delete word left of cursor Ctrl Backspace Alt Backspace
Delete word right of cursor Ctrl Delete Alt Delete
Delete text left of cursor Ctrl Shift Backspace ⌘ Backspace
Delete text right of cursor Ctrl Shift Delete ⌘ Delete

Navigation

Description Win/Linux Mac
Move one character to the left/right ←/→ ←/→
Move one word to the left/right Ctrl ←/→ Alt ←/→
Move to beginning/end of line Home/End ⌘ ←/→
Move one line up/down ↑/↓ ↑/↓
Move one screen-full up/down Page ↑/↓ Page ↑/↓ (fn ↑/↓)
Move to top/bottom Ctrl Home/End ↖/↘ (⌘ ↑/↓)
Scroll one line up/down Ctrl ↑/↓ Alt ↑/↓

GUI

Global Shortcuts

The following shortcuts are available from most GUI components:

Description Win/Linux Mac
Focus input bar F8 (before: F6) ⌘ F8 (before: ⌘ F6)
Focus editor view F12 ⌘ F12
Focus result view Shift F12 (new) Shift ⌘ F12 (new)
Jump to next/previous panel Ctrl (Shift) Tab Ctrl (Shift) Tab
Increase/Decrease font size Ctrl +/- ⌘ +/-
Reset font size Ctrl 0 ⌘ 0
 
Description Win/Linux Mac
Browse back/forward Alt ←/→
Backspace
⌘ ←/→
Browse one level up Alt ↑ ⌘ ↑
Browse to the root node Alt Home ⌘ Home

Menu Shortcuts

The following commands and options are also linked from the main menu:

Database

Description Win/Linux Mac
Create new database Ctrl N ⌘ N
Open/manage existing databases Ctrl M ⌘ M
View/edit database properties Ctrl D ⌘ D
Close opened database Ctrl Shift W ⌘ Shift W
Exit application Ctrl Q ⌘ Q

Editor

Description Win/Linux Mac
Create new tab Ctrl T ⌘ T
Open existing file Ctrl O ⌘ O
Save file Ctrl S ⌘ S
Save copy of file Ctrl Shift S ⌘ Shift S
Close tab Ctrl W, Ctrl F4 ⌘ W, ⌘ F4

View

Description Win/Linux Mac
Toggle query/text editor Ctrl E ⌘ E
Toggle project structure Ctrl P ⌘ P
Toggle result view Ctrl R ⌘ R
Toggle query info view Ctrl I ⌘ I
 

Options

Description Win/Linux Mac
Open preference dialog Ctrl Shift P ⌘ , (comma)

Visualization

Description Win/Linux Mac
Toggle map view Ctrl 1 ⌘ 1
Toggle tree view Ctrl 2 ⌘ 2
Toggle folder view Ctrl 3 ⌘ 3
Toggle plot view Ctrl 4 ⌘ 4
Toggle table view Ctrl 5 ⌘ 5
Toggle explorer view Ctrl 6 ⌘ 6

Help

Description Win/Linux Mac
Show Help F1 F1

Additionally, the names of HTML entities will be converted to their Unicode representation (as an example, Auml will be translated to ä).

Changelog

Version 10.0
  • Updated: Some shortcuts were modified.
Version 8.4
  • Added: Duplicate line (Ctrl D)
Version 8.4
  • Added: Lower case (Ctrl Shift L), Upper case (Ctrl Shift U), Title case (Ctrl Shift T)
Version 8.0
  • Added: New code completions, popup menu
Version 7.8.2
  • Added: Sort lines (Ctrl U)
Version 7.8
Version 7.5
  • Added: go to line (Ctrl F)
Version 7.3
  • Added: delete line(s) (Ctrl Shift D), jump to highlighted error (Ctrl .)