ktexteditor - emacsextensions
Text Editors
Score 68%
Description:

A KTextEditor plugin that provides Emacs compatible features such as:

* kill-ring (yank (Ctrl-Y), yank-pop (Alt-Y), kill-ring-save (Alt-W), kill-region (Ctrl-W)
* mark-ring (Ctrl-Space, Ctrl-X,X, Ctrl-U,Space)
* kill-line (Ctrl-K)
* next-line (Ctrl-N), previous-line (Ctrl-P)
* forward-char (Ctrl-F), backward-char (Ctrl-B) for Kate pre 3.4.

Some of these actions are only activated in older KTextEditor versions that don't support them by themselves yet.

Since it is a pure KTextEditor plugin, it is available for a all KDE applications that use the libkatepart for editing, among these are KDevelop, Kile, Kate, Quanta Plus and many more.

It's a great plugin to enhance your KDE texteditors as long as there is no Kemacs.

Comments and suggestions for more features are welcome.

Felix Berger
Last changelog:

12 years ago

0.1.7-3

* Uploaded a new Debian package to reflect the library renaming for the KDE 3.4.3 packages.

0.1.7-2

* Uploaded a new Debian package to reflect the ABI transition of the KDE 3.4 packages.

0.1.7

* Added delete-next-char action.

0.1.6

* Debianized package.
* No code changes.

0.1.5

* yank-pop appears as an atomic command in the undo history.
* Remove the following line-break character when kill-line is called at the end of the line.
* Don't use removeLine() in implementation of kill-line for empty lines.

0.1.4

* Use hardcoded Emacs default max-sizes for mark- and kill-ring.
* Implemented correct kill-ring position after last yank-pop.
* Added sub menu in the KTextEditor's popup context menu.

allister

10 years ago

I did "make" and it says:

*** Creating configure.files
cd . && aclocal-1.7
/bin/bash: aclocal-1.7: command not found
make: *** [aclocal.m4] Error 127

Any ideas?

Report

fresno

10 years ago

That means that you are missing aclocal. Try installing it first. In my SuSe it's fixed installing the package «automake».

Report

ezust

11 years ago

kscope is supposed to be a ktexteditor-based app but I am unable to see any of the emacs extensions from inside kscope. Anyone else have the two programs working nicely together?

Report

C

bflat1

11 years ago

In version 1.4.1, which I just tested, kscope does not provide a settings menu where you can configure the settings of the ktexteditor that is used. Thus, the emacsextensions plugin cannot be enabled.

Please file a bugreport to kscope.

Report

elahav

11 years ago

It works for me.
I installed the emacsextensions plugin, selected it under "Configure Editor"->"Plugins", and got all the entries in KScope's "Edit" menu.

Report

alanezust

12 years ago

thanks for adding deleting-next-char!

repeated calls to emacs kill-line seem to clear the cut buffer, rather than append to it, so that a paste will only paste the last cut line. This is very different from emacs' behavior - does that happen on your end too?

Report

C

bflat1

12 years ago

Yes, it does. As of now I just ignored concatenating coalescent kill-regions in the kill-buffer.

But now that someone caught me ;-), I'll have a look how difficult it would be to mimic Emacs' behavior with respect to this.

Report

C

bflat1

12 years ago

For this to work I would have to find out what the last executed command was.

Unfortunately I couldn't find a way to do it. I tried using the undo count, but this is too fine grained and seems to also change when you move the cursor between two kill-region commands.

:-(

Report

alanezust

12 years ago

Could you add a "delete next character" shortcut to the list of shortcuts? I miss that one...

Report

C

bflat1

12 years ago

Done :-)

The action will only be available in libkatepart versions < 3.4 since the katepart supports it in 3.4 itself.

Report

lucher

12 years ago

Maybe you can even add some NEdit niceties like 'strip wite space' or 'interprete selected text as file name and open' or wyswyg moving of a text selection?

Report

C

bflat1

12 years ago

> Maybe you can even add some NEdit
> niceties like 'strip wite space' or
> 'interprete selected text as file
> name and open' or wyswyg moving of a
> text selection?

Thanks for interest.

If you could point me to some exact specification of these features and I find them useful I might add them.

Please keep in mind, that the plugin should only depend on the KTextEditor::... interfaces documented at:

http://developer.kde.org/documentation/library/cvs-api/interfaces/html/namespaceKTextEditor.html

This confines most features to non-GUI functionality.

Report

awinterz

12 years ago

hmm... do you think it would be possible
to put an emacs-editor submenu on the right-mouse-button?

this might be useful so you don't have to go all the way up to the menu bar Edit.

of course I have the key shortcuts memorized so it doesn't really matter much to me.

Report

C

bflat1

12 years ago

Done.

I don't use it myself, but if it advertises the actions and their shortcuts better, it won't harm.

Felix

Report

awinterz

12 years ago

I've been looking for something to make kate more emacs-like. Thank You.

To make Ctrl-K kill from the point to the end of the line I needed to change the default Delete Line shortcut which is also Ctrl-K. Was that the correct solution?

Report

C

bflat1

12 years ago

Thanks for the feedback!

Yes, that was the correct solution. I was going to write some documentation about that, but haven't come around to doing it yet.

The Emacs kill-line deletes from the current point to the end of the line and also puts the deleted content into the clipboard and kill-ring as opposed to Kate's implementation.

I haven't used the plugin in long editing sessions yet, so more subtle discrepancies from Emacs' implementation might have gone unnoticed. If you notice minor annoyances like the the wrong text being yanked, or yank-popped, let me know.

Regards,
Felix

Report

alanezust

12 years ago

Those extra shortcuts are great, thanks for doing this!

I was wondering though - the ctrl-Y should yank whatever was cut with ctrl-k, but it appears to be an alias for ctrl-V (paste) and pastes whatever was in the cut buffer.

Which would be fine if ctrl-K put its "cut content" into the paste buffer.

Report

alanezust

12 years ago

whoops!

Turns out my ctrl-k was simultaneously bound to "delete line" in the other shortcut menu, which I didn't notice. I removed that binding and now your cut works great.

Report

C

bflat1

12 years ago

I'm glad you worked it out.

Ctrl-K is not fully compatible to Emacs's kill-line yet when you call it at the end of a line. The new line character should be removed then. This will be fixed in the next release.

Regards,
Felix

Report

12 years ago

0.1.7-3

* Uploaded a new Debian package to reflect the library renaming for the KDE 3.4.3 packages.

0.1.7-2

* Uploaded a new Debian package to reflect the ABI transition of the KDE 3.4 packages.

0.1.7

* Added delete-next-char action.

0.1.6

* Debianized package.
* No code changes.

0.1.5

* yank-pop appears as an atomic command in the undo history.
* Remove the following line-break character when kill-line is called at the end of the line.
* Don't use removeLine() in implementation of kill-line for empty lines.

0.1.4

* Use hardcoded Emacs default max-sizes for mark- and kill-ring.
* Implemented correct kill-ring position after last yank-pop.
* Added sub menu in the KTextEditor's popup context menu.

product-maker 18 45

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.1.7
updated Jan 06 2006
added Mar 11 2005
downloads today
0
page views today 0