The drag functionality is enabled by default. The copy action might not be available in macOS since it can conflict with global OS shortcuts.
#Make a custom mouse pointer inscartach code#
To copy a code selection, keeping Ctrl pressed, drag it to the target location. To move a code fragment, select it and drag the selection to the target location. Move and copy code fragments by dragging them in the editor. To make it easier to distinguish between statements to be extracted and statements to be removed, P圜harm uses different background colors. P圜harm shows a popup with all actions available in the current context. Place the caret at the expression you want to remove or unwrap. The caret is moved to the position where you can start typing the next statement.
![make a custom mouse pointer inscartach make a custom mouse pointer inscartach](https://en.scratch-wiki.info/w/images/Vector_Editor.png)
P圜harm inserts the required trailing comma automatically in structs, slices, and other composite literals. In the editor, press Ctrl+Shift+Enter or from the main menu select Code | Complete Current Statement. If moving of the statement is not allowed in the current context, the actions will be disabled. P圜harm moves the selected statement performing a syntax check. In the editor, place the caret at the needed statement and press Ctrl+Shift+Up to move a statement up or Ctrl+Shift+Down to move a statement down. To move (swap) a code element to the left or to the right, place the caret at it, or select it and press Ctrl+Alt+Shift+Left for left or Ctrl+Alt+Shift+Right for right. To move a line up or down, press Alt+Shift+Up or Alt+Shift+Down respectively. Press Ctrl+/ again on the same line to uncomment it. To comment a line of code, place the caret at the appropriate line and press Ctrl+/. Press Alt+Enter or click to select this intention. You can also use the Break string on '\n' intention to split string literals. P圜harm splits the string and provides the correct syntax. To split string literals into two parts, press Enter. Note that P圜harm checks the code style settings and eliminates unwanted spaces and redundant characters. You can also join string literals, a field or variable declaration, and a statement. Keep pressing the keys until all the needed elements are joined. To join lines, place the caret at the line to which you want to join the other lines and press Ctrl+Shift+J. To delete a line, place the caret at the line you need and press Ctrl+Y. If you need to assign shortcuts to those actions, refer to Configure keyboard shortcuts for more information. These actions might be helpful when you work with property files, data sets, text files, log files, and so on. To sort lines alphabetically in the whole file or in a code selection, from the main menu, select Edit | Sort Lines or Edit | Reverse Lines. P圜harm moves the caret to the previous line. To add a line before the current one, press Ctrl+Alt+Enter. To add a line after the current one, press Shift+Enter. If you need to undo or redo your changes, press Ctrl+Z/ Ctrl+Shift+Z respectively. P圜harm offers several useful shortcuts for manipulating code lines. P圜harm creates a string in the format that depends on a symbol at caret. Place the caret at a certain line of code and press Ctrl+Alt+Shift+C (or select Copy Reference from the context menu or from the Edit menu). You can copy the reference to a line or a symbol. When you copy and paste code to the editor, P圜harm displays the hidden (special) characters represented by their Unicode name abbreviation. The default number of items stored in the clipboard history is 100.
![make a custom mouse pointer inscartach make a custom mouse pointer inscartach](https://miro.medium.com/max/1400/1*e5EM9mTQmZryFPcBv2_NpA.jpeg)
In the dialog that opens, select your entry and click Paste. To paste from history, in the editor, from the context menu, select Copy/Paste Special | Paste from History ( Ctrl+Shift+V). P圜harm keeps track of everything you copy to the clipboard. You can press Ctrl+V to paste the copied reference anywhere. When you select the Copy Reference ( Ctrl+Alt+Shift+C) option, P圜harm creates a reference string that includes the line number of the selected line or symbol. Place the caret at a line or a symbol, right-click to open the context menu, select Copy/Paste Special | Copy Reference. If you need to paste just plain text, press Ctrl+Alt+Shift+V. If nothing is selected, P圜harm automatically copies as is the whole line where the caret is located.īy default, when you paste anything in the editor, P圜harm performs "smart" paste, for example, pasting multiple lines in comments will automatically add the appropriate markers to the lines you are pasting. You can use the standard shortcuts to copy Ctrl+C and paste Ctrl+V any selected code fragment.