Maximum PC

Discover Code Writer

-

ALTHOUGH MOST COMPETENT PROGRAMMER­S can write code using anything from Microsoft Notepad to the back of an envelope, the majority of serious coders prefer to have a dedicated applicatio­n for programmin­g purposes.

Coder-friendly applicatio­ns such as Code Writer are designed by programmer­s for programmer­s. This means that on first launch, you can automatica­lly create code files with the correct extension, such as .html. The app also supports syntax highlighti­ng and easy navigation of large files.

Code Writer isn’t a fully-fledged IDE, and as such doesn’t contain a built-in compiler or an easy way to automatica­lly publish code to popular websites, such as GitHub. However, its stripped-down interface and bare-bones features mean that you can master the basics and streamline your coding in a matter of minutes.

In this guide, you’ll discover how to create and edit simple files using Code Writer. You’ll also learn how to harness the app’s powerful Command Palette, which enables you to work with multiple files, search for specific terms, and automate tasks such as indenting multiple lines of code. Code Writer also supports keyboard shortcuts for virtually every command, enabling you to reach brutal levels of programmin­g efficiency without using a mouse. –NATE DRAKE

1

SETUP

On first launch, Code Writer displays a handy overlay, explaining the basics of what each section does. This is shown once only, but don’t fret too much, because the interface is very intuitive. To create a document, click “New” on the righthand side of the screen. Code Writer now prompts you to choose a document type, such as HTML [ Image A]. The code template is formatted with default headers and footers, so you can start coding right away. By default, code files are saved to your “Documents” folder. Click the “Save” button at the top-left, then “Save As” to choose a new file name and location.

2

HOW TO LOAD CODE

If you’ve created a new file using Code Writer, it opens automatica­lly next time you launch the program. If you’ve already created other code files in a separate program, click the “Open” button at the top-right, and navigate to your file(s) of choice. If you open multiple files, you can switch between these by double-clicking the file name listed on the right of the screen. All changes to documents are auto-saved, so each time you reopen a file, it’s exactly as you left it. Any files you saved yourself appear with a checkbox next to the file name. Code Writer places an “x” next to names of files it saved automatica­lly.

3

EDITING YOUR CODE

Once your chosen files are open, editing your code is fairly straightfo­rward. You can scroll, click, and alter text just as you would in Microsoft Notepad. If you have a large number of lines of code to work through, click the “Editing” button on the right-hand side of the page. This displays a handy collection of common commands [ Image B]. Some of these, such as “Cut & Paste,” are self-explanator­y. Click a section and choose “Comment Lines” to annotate your code. To indent or outdent lines in a particular section, simply highlight it with your mouse, and click the correspond­ing button. If your code is case-sensitive, don’t overlook the “Uppercase” and “Lowercase” options.

4

COMMAND PALETTE

The command palette is a quick and easy way to use Code Writer’s features via the keyboard. You can launch it in a number of different modes, each of which carries out different functions. For instance, hold down Ctrl-P to launch the command palette in default mode. From here, you can easily search through all your code files and launch them. Hold down Ctrl-Shift-P for the palette’s command mode; this contains a number of Code Writer’s more advanced features [ Image C]. For instance, select “Change File Types” to save code in a different format. You can also carry out surgical editing with the “Line,” “Cut,” and “Paste” functions. Whichever mode you choose, you can use the up and down arrows

to switch between functions. Press Esc to dismiss the command palette altogether.

5

SEARCH AND REPLACE CODE

Code Writer has a simple but excellent search feature. To get started, click the “Search” button on the righthand side to open the Find dialog. From here, you can enter your search term and click “Find Next” to start scanning your code. Pay close attention to the checkboxes, which allow you to match the case, whole words, and regular expression­s.

>> To replace text, simply toggle the replace mode by clicking the arrow next to the search box. Fill in the fields marked “Find what” and “Replace with,” then choose either “Replace Next” or “Replace All.”

6

SHARE YOUR CODE

Code Writer has no built-in collaborat­ion tools, nor can you automatica­lly publish content to GitHub. You can, however, share code files via Mail, Microsoft OneNote, Skype, and a few other select apps. To use this feature, save the file on which you are currently working, then click the “Share” button on the right-hand side. From here, you can enter your contact name and select an app for sharing. Files are sent in the same format in which they are saved—HTML, for example.

7

THEME EDITOR

While most users appreciate Code Writer for its simple minimalist­ic interface, you can make some tweaks if you wish. Click “Settings” at the bottom-right of the screen to view the Editor preference­s. Code Writer offers three themes: Dark (default), Light, and Obsidian. From here, you can also change the font type and text size [ Image D]. This only affects the Code Writer interface, and doesn’t change your code formatting. If you still have trouble navigating your code, enable “Current Line Highlighti­ng” to easily track the line on which you are currently working.

8

CUSTOMIZE FILE TYPES

Code Writer supports a number of programmin­g languages, but this can be truly overwhelmi­ng if you only use one or two. You may also wish to work with code files that aren’t supported by default in the app.

>> To view supported code files, click the “Settings” button at the bottom-right, then select the “File Types” tab [ Image E]. Uncheck the box next to any programmin­g languages you don’t use. In future, these won’t be displayed as an option when you click to create new code. To add a custom file extension, click the “+” button while selecting a supported programmin­g language. This creates a custom extension with a default name of .ext1. Click and type to edit the new file name and extension.

 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ??

Newspapers in English

Newspapers from United States