Ubuntu – How to delete a line using a shortcut in Gedit gedit Is there any shortcut for it? If not is it possible to set a key for this operation? I am using Ubuntu 14.04 LTS. Best Answer yes you can using Ctrl + D as you can see in this page under the Shortcut keys for editing files: Gedit shortcut keys Related SolutionsUbuntu – Two gedit plugins clash. How to change shortcut keys, or enable/disable a plugin I wrote the following python script (download) that enables/disables the Multi-edit plugin: #!/usr/env/python import re import commands active_plugins = commands.getoutput("gconftool --get /apps/gedit-2/plugins/active-plugins") r1 = re.compile(r'multi_edit') if r1.search(active_plugins): # Disable multi-edit plugin active_plugins = re.sub("multi_edit,|,multi_edit","", active_plugins) else: # Enable multi-edit plugin active_plugins = re.sub("]",",multi_edit]", active_plugins) commands.getoutput("gconftool --set --type=list --list-type=string /apps/gedit-2/plugins/active-plugins "+active_plugins) To toggle Multi-edit with a keyboard shortcut: Save the script as toggle-multi-edit.py in your home folder. Open up System → Preferences → Keyboard Shortcuts. Click Add and put python /home/<user>/toggle-multi-edit.py for the Command, replacing <user> with your actual username. Ubuntu – Gedit has an unlisted Ctrl-D shortcut which deletes a line. How to override it I like the idea to do a binary edit. However the process described above seems too cumbersome. Here is a much simpler and more reliable way: sudo sed -i "s/delete_from_cursor/_elete_from_cursor/g" /usr/bin/gedit Related QuestionUbuntu – Two gedit plugins clash. How to change shortcut keys, or enable/disable a pluginUbuntu – Gedit has an unlisted Ctrl-D shortcut which deletes a line. How to override itUbuntu – Gedit – cannot open displayUbuntu – How to downgrade Gedit to a previous (3.10.4) Version in Ubuntu 16.04 LTSUbuntu – gedit: is there a keyboard shortcut in gedit itself to insert date and time
Best Answer
yes you can using Ctrl + D as you can see in this page under the Shortcut keys for editing files: Gedit shortcut keys