Skip to content

A gedit plugin to paste text with the indent at cursor position by pressing Ctrl-Shift-V

License

Notifications You must be signed in to change notification settings

zb3/gedit-indented-paste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gedit-indented-paste

This plugin allows you to paste text with the indent at cursor position. It trims common indent occuring in each non-blank line of the pasted text and prepends the indent at cursor position to each pasted line (except the first one).

To paste like that, press Ctrl + Shift + V. For pasting PRIMARY clipboard contents, use Shift + Middle click (which uses the current cursor).

What this plugin doesn't do

This plugin doesn't detect and convert the indentation style of the pasted text to match the indentation style of the current file. That's mainly because it's not universally possible to detect that correctly just by analysing the text, since there are many corner cases (like docblock, indented arguments, "half indents" etc) that would make the conversion behave inconsistently. You'd probably want a language-dependent code formatter anyway.

Installation

  1. Make sure your gedit version is up to date.
  2. Copy project folder to ~/.local/share/gedit/plugins
  3. Enable this plugin.

About

A gedit plugin to paste text with the indent at cursor position by pressing Ctrl-Shift-V

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages