Chapter18.Editing Text Files

team bbl


Chapter 18. Editing Text Files

Text files are files that contain only text characters, with no formatting information. HTML files, program source code, and many Linux configuration files are text files. Although you can edit text files with a word processor, it's generally simpler to use a text editoran application that has only the features necessary to edit text.

Many text editors have a GUI interface. If you are working on your desktop, a GUI editor is useful. However, sometimes you need a command-based editor to use at the command line. This chapter provides instructions for using a GUI editor and a command-based editor:

  • Kate: (KDE Advanced Text Editor) A basic text editor with a GUI, similar to Notepad. However, Kate has many more capabilities than Notepad.

  • vi: A command-based text editor, suitable for use at the command line. vi is installed on every Linux and UNIX system, regardless of what other text editors are installed. Many Linux distributions provide an updated version of vi called vim. Any commands that work in vi also work in vim.

    If you come from a Windows background, the vi text-based environment may be unfamiliar to you. In vi, you press keys to execute editing commands that change the file contents. You may be more familiar with clicking icons or selecting menu items to change the file.

Both editors allow basic editing, such as insert text, delete text, replace text, copy text. Both editors also have major advanced features and features useful for programmers, such as:

  • Multiple document editing: Can have many documents open at the same time. Can copy from one file to another.

  • Plug-ins: Can add plug-ins for additional functionality. For instance, Kate has a spell checker plug-in.

  • Syntax highlighting: Colored highlighting of source code syntax.

    team bbl



    Spring Into Linux
    Spring Into Linux
    ISBN: 0131853546
    EAN: 2147483647
    Year: 2005
    Pages: 362
    Authors: Janet Valade

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net