Ubuntu – How to select a column or block of text in gedit 3.28.1

18.04gedit

Is it possible to select a column or block of text in Gedit 3.28.1?

The following image is with Kate 17.12.3 but shows what I want:

Column or block selection

Best Answer

  • This answer is based on steeldriver's suggestion to look into gedit-plugin-multi-edit.

    I found a blog post which links to a video demonstrating column selection mode. Even though the links are from 2009, the plugin works in gedit 3.28.1 which is found in Bionic Beaver.

    • Run sudo apt install gedit-plugin-multi-edit.

    • Open gedit > Preferences > Plugins and enable Multi Edit.

    • Then, when the need arises to perform edits involving columns, activate Multi Edit Mode from Tools. The mode will be reflected near the top right corner of the window.

    • Left-click immediately to the left of the letter at the top left of the intended column and select down to include the lowest letter at the bottom right of the intended column.

    • Press Enter.

    • The selected area will change to cover just the column. Make the desired changes. They will be reflected onscreen.

    • Press Escape.

    • Quit Multi Edit Mode.

    Here's a brief animation derived from the video link cited above.

    Animation illustrating column selection and editing:

    Animated gif showing column selection in gedit