Skip to content
David C. Rankin edited this page Aug 19, 2017 · 12 revisions

Welcome to the Gtkwrite wiki!

The Gtkwrite editor is a project written in C using Gtk+2 that started as a quick small editor and has had bits added to it over time. It will compile as gtkwrite with GtkSourceView (for syntax highlighting, etc.) using the make with=-DWGTKSOURCEVIEW2 define or it can be compiled as gtkedit without GtkSourceView (default) simply by issuing the make command. You should run make clean after each git pull. Packages are available for OpenSuSE 13.1 through Leap 42.2 and the current release and development branch builds are available for Archlinux in the AUR packages of gtkwrite and gtkwrite_git, respectively. Builds successfully on Linux and Windows (see README.md for win32 build requirements)

All common features have associated keyboard shortcuts that are listed in each menu. The toolbar provides convenient access to the most common functionality. (the toolbar can be completely hidden [Ctrl+T] for those that like to work from the keyboard) Features include configurable font selection, syntax and current line highlighting (with language selection and styles provided by GtkSourceView), Smart home/end cursor positioning at softtab stops, Smart tab and backspace to softtab stops, Select all, Block Indent/Unindent to next softtab position or by an absolute number of characters, Incremental/global Find/Replace with options to search the whole buffer, from cursor, or within selection bounds. Find/Replace can be case sensitive/insensitive, whole-word only, and can be performed in the forward/backward direction. A Goto Line dialog provides quick access to any line in large files. The Goto dialog will search once and close if the [Enter] key is used, or remain open allowing multiple line navigation using the [Keypad Enter] (you can input the line or use a slider to relative positions in the file).

Additional feature include Join-Lines, undo/redo and Line Numbers (with GtkSourceView), Saved File Reload, Insert File at Cursor, and all the standard Cut, Copy, Paste, Delete, etc.. File Statistics (characters, words, whitespace, non-whitepace and line count), on-save Trailing Whitespace Removal and POSIX end-of-line insertion. End-of-line detection and conversion between LF, CRLF and CR (Mac, pre-OSX) with persistent EOL setting to use either LF, CRLF, CR, current FILE_EOL or OS_EOL (default). GIO File Monitoring for modification by foreign process. (See the README.md file for further details)

A preferences dialog allows setting Appearance and Editing settings (tab/softtab settings, smart_backspace to softtab stops, word-wrap, smart home-end cursor movement, Default End-of-Line selection (to prompt for conversion if file differs), File Cleanup on save (remove trailing whitespace, require POSIX end-of-file, etc).

There is always more to do and I'm sure there are some better ways to do them, but on balance the project code and source files are in fairly good shape and reasonably commented. Until time permits for further expansion here, I'll leave you with a few screenshots of the menu layout and the primary dialogs:


Editor Screenshot

Menu/Toolbar

File Menu

Edit Menu

View Menu

Tools Menu

Find/Replace Dialog

Settings/Preferences

(*note: if the images are not available, iptables is most likely to blame.. on my end, I've included links to the images as well.)