Kate Text Editor-- Advanced Configuration and Command-Line Tips - page 2
Configuration Tips and Tricks
The command-line interface is accessed via the F7 key. It allows you to set many of the editor options: for example, set-replace-tabs on will set indentation to use spaces rather than a tab character. There's an autocomplete function available for the settings, as seen in Figure 1 (below).
If you input a setting without the appropriate argument you get a brief help message. For most of these settings, the argument is a boolean, so off/on/true/false/1/0 will all work. To return to the main window from the command-line, hit ESC (you will also be automatically returned after each command); to return to the command-line again, hit F7 again.
You can access the search and replace functions via the command line. s///[ig] and %s///[ig] provide a sed-like search and replace option, either in the current line, or the whole file (if the % is included). As with sed, you can create back-references, and the i and g options offer case-insensitivity and global matching (the default is to match only the first occurrence of the pattern in each line) respectively.
replace:options pattern replacement offers slightly more configurability, with options including replace:b (search backwards from cursor) and replace:e (search only in the current selection). replace:p will prompt for permission to replace, and replace:v will match whole words only. The r option interprets the pattern as a regular expression, in which case you can use parentheses and \N to do captures.
Using the terminal emulator
The terminal emulator can be opened from the Window->Tool Views menu. It enabling you to navigate around in the terminal, change file permissions, and run scripts, without exiting Kate. It's especially useful if you set the "sync terminal emulator with active document" option (in the General Config menu): this means that the terminal emulator will cd into the relevant directory when you open a file.
Bookmarks allow you to mark your place in a file and then go back to it. Set a bookmark with Ctrl-B, from the Bookmarks menu, or by clicking on the icon border. then move down the bookmarks with Alt+PageDown/PageUp. The icon border can be turned off/on with F6, as well as from the config menu – it's off by default.
In the final part of this series, I'll look at some of the features that Kate has for coders, including syntax highlighting, code folding, indenting, and commenting.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Debian Gives Up on Upstart, Ubuntu and Linux Kernel Updates