Bug 496902

Summary: Enable selecting another file and inserting its contents into the current file at the cursor from within Kate
Product: [Applications] kate Reporter: Allen Winter <winter>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: VERIFIED FIXED    
Severity: wishlist CC: christoph, john.kizer
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Allen Winter 2024-12-01 19:34:04 UTC
This is a feature that I miss from an editor I used for a long time before switching to kate...

There was an Insert File option on the File menu that opens a file chooser and inserts ths selected file into the current document at the current position.
Comment 1 John Kizer 2024-12-11 04:22:43 UTC
Seems like a reasonable wishlist item, moving to Confirmed

(You're probably thinking of a graphical editor...the program I'm thinking of with that feature is nano!)
Comment 2 Allen Winter 2024-12-16 12:29:22 UTC
(In reply to John Kizer from comment #1)
> Seems like a reasonable wishlist item, moving to Confirmed
> 
> (You're probably thinking of a graphical editor...the program I'm thinking
> of with that feature is nano!)

in my case it is emacs
Comment 3 Bug Janitor Service 2024-12-17 14:06:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1679
Comment 4 Bug Janitor Service 2024-12-22 11:13:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/766
Comment 5 Christoph Cullmann 2024-12-26 18:49:28 UTC
Git commit 204817b8e54f6d337ad0e37840ffed564561097b by Christoph Cullmann, on behalf of ambar chakravartty.
Committed on 26/12/2024 at 18:49.
Pushed by cullmann into branch 'master'.

"Paste From File" feature for Kate to select a file and insert it's contents into the current file

This feature allows the user to open a file and insert the entire contents of that file at the cursor position of the currently open file.

M  +2    -1    src/data/katepart5ui.rc
M  +26   -23   src/document/katedocument.cpp
M  +5    -0    src/document/katedocument.h
M  +15   -0    src/view/kateview.cpp
M  +5    -0    src/view/kateview.h

https://invent.kde.org/frameworks/ktexteditor/-/commit/204817b8e54f6d337ad0e37840ffed564561097b
Comment 6 Allen Winter 2024-12-26 20:16:23 UTC
Looking good.
thanks so much
Comment 7 Christoph Cullmann 2024-12-26 20:34:41 UTC
Thanks to Ambar to implement that.