/**************************************************************************** ** ** Copyright (c) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator ** ** ** GNU Free Documentation License ** ** Alternatively, this file may be used under the terms of the GNU Free ** Documentation License version 1.3 as published by the Free Software ** Foundation and appearing in the file included in the packaging of this ** file. ** ** ****************************************************************************/ // ********************************************************************** // NOTE: the sections are not ordered by their logical order to avoid // reshuffling the file each time the index order changes (i.e., often). // Run the fixnavi.pl script to adjust the links to the index order. // ********************************************************************** /*! \contentspage index.html \previouspage creator-editor-functions.html \page creator-coding-navigating.html \nextpage creator-highlighting.html \title Working in Edit Mode This section describes how to use the \gui Edit mode. For more information about using the sidebar, see \l{Browsing Project Contents}. \section1 Using the Editor Toolbar The editor toolbar is located at the top of the editor view. The editor toolbar is context sensitive and shows items relevant to the file currently open in the editor. \image qtcreator-editortoolbar-symbols.png Use the toolbar to navigate between open files and symbols in use. To browse backward or forward through your location history, click \inlineimage qtcreator-back.png (\gui {Go Back}) and \inlineimage qtcreator-forward.png (\gui {Go Forward}). To go to any open file, select it from the \gui{Open files} drop-down menu (1). Right-click the menu title and select \gui {Copy Full Path to Clipboard} to copy the path and name of the current file to the clipboard. To jump to any symbol used in the current file, select it from the \gui Symbols drop-down menu (2). By default, the symbols are displayed in the order in which they appear in the file. Right-click the menu title and select \gui {Sort Alphabetically} to arrange the symbols in alphabetic order. \section1 Splitting the Editor View Split the editor view when you want to work on and view multiple files on the same screen. \image qtcreator-spliteditorview.png You can split the editor view in the following ways: \list \o To split the editor view into a top and bottom view, select \gui Window > \gui Split, press \key{Ctrl+E, 2}, or select the \inlineimage qtcreator-split-button.png (\gui Split) button and then select \gui Split. Split command creates views below the currently active editor view. \o To split the editor view into adjacent views, select \gui Window > \gui{Split Side by Side}, press \key{Ctrl+E, 3}, or select \gui {Split > Split Side by Side}. Side by side split command creates views to the right of the currently active editor view. \endlist To move between split views, select \gui Window > \gui{Go to Next Split} or press \key{Ctrl+E, O}. To remove a split view, place the cursor within the view you want to remove and select \gui Window > \gui{Remove Current Split}, press \key{Ctrl+E, 0}, or select the \inlineimage qtcreator-remove-split-button.png (\gui {Remove Split}) button. To remove all but the currently selected split view, select \gui Window > \gui{Remove All Splits} or press \key{Ctrl+E, 1}. \section1 Using Bookmarks To insert or delete a bookmark: \list \o Right-click the line number and select \gui{Toggle Bookmark}. \o Press \key Shift and click the left margin at a line. \o Press \key{Ctrl+M} when the cursor is on a line. \endlist \image qtcreator-togglebookmark.png To go to previous bookmark in the current session, press \key{Ctrl+,}. To go to next bookmark in the current session, press \key{Ctrl+.}. \section1 Moving to Symbol Definition or Declaration You can move directly to the definition or the declaration of a symbol by holding the \key Ctrl and clicking the symbol. To enable this moving function, in \gui Tools > \gui{Options} > \gui{Text Editor} > \gui Behavior, select \gui{Enable mouse navigation}. You can also select the symbol and press \key F2, or right-click the symbol and select \gui {Follow Symbol Under Cursor} to move to its definition or declaration. This feature is supported for namespaces, classes, methods, variables, include statements, and macros. To switch between the definition and declaration of a symbol, press \key {Shift+F2} or right-click the symbol and select \gui {Switch Between Method Declaration/Definition}. \section1 Using Update Code Model To refresh the internal information in \QC pertaining to your code, select \gui{Tools} > \gui{C++} > \gui{Update Code Model}. \note In \QC indexing updates the code automatically. Use \gui{Update Code Model} only as an emergency command. */