Registered Member
|
Howdy,
I usually have a single session of KDevelop (4.3.1 on Kubuntu 12.04.2) open for all editing tasks, which includes my project source, but I edit external files with it too. I like having things open in one place and using the same UI metaphor all the time, Kate is just lacking relatively. For files in my project all the standard stuff works fine. But often when I'm in a file browser (Krusader 99% of the time) I want to be able to open a file by using the context-menu, or even better, just double clicking for source files associated with KDevelop. Invariably this results in a "session already open" type error message. I can drag files into my existing session just fine (The fact that I have to drop it "just there" bugs me slightly, but fine...), but it just takes a bit longer to do. Mostly I've come to just "not do that" and using the built-in file browser, but it's still annoying... having to "re-find" a file I've just found. So I played with the command line and tried doing:
Hoping that I'd usually have the same session open and setting my "associated" command accordingly would give me what I want. But it just pops my existing session into focus without opening the file (in perceived contradiction to the help text). Is this a bug fixed in later versions (I doubt it I've had this problem for years)? Or is there another way to do this? |
Global Moderator
|
Hey,
you can do this:
Granted, not very elegant, but if you put it into a shellscript called kdevelop-open or so it should work just fine. Oh you'll need adjustments of course if you have more than one instance of kdevelop open, but you said you haven't so it should work. Cheers, Sven
I'm working on the KDevelop IDE.
|
Registered Member
|
Sven, my man, that works beautifully! Thank you!
For future souls, my script ended up like this:
That should always "just work", assuming kdevelop is open. Edit: Can't image why kdevelop wouldn't be open. |
Registered Member
|
Edited the above script with a line for giving kdevelop focus after it opens the file.
|
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]