Announcement

Collapse
No announcement yet.

help with Kate and opening new documents in same instance

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help with Kate and opening new documents in same instance

    Hey guys,

    In shopping around for a good editor I've found that the one I prefer best was here all along - Kate. There's one little nuance I'd like to work out with it and I'll be set.

    I'd like for any file I open (more specifically, .html, .php, .css, .js files) to all open in the same instance of Kate rather than in new ones.

    I googled and found this FAQ and answer:

    Is it possible to open all files in the same Kate window?
    Fri, 2006-12-15 18:17 — haumann

    Yes, just go to: kcontrol -> KDE Components -> File Associations -> text -> file type (e.g. plain)

    Now choose kate in the right list, hit “Edit…” and go to the programs tab, change the command to this:

    kate -u %U

    That should do the trick.
    I assume kcontrol is the equivalent of Settings->System Settings, so I went there and clicked the 'Advanced' tab and went to the file association section. At first, just trying to get all .php files to open in the same Kate instance. I then went to applications->x-php in the side menu. I added the known extensions that I work with, and set the default program to open them to Kate. I then proceded to go to embedding tab and clicked "show file in embedded viewer". Saved.

    I don't know if that's what I wanted to do, but clicking php files still opens in new instances of Kate rather than the same single instance.

    What am I doing wrong here? Can this be done easier on the command line or in a config file?

    #2
    Re: help with Kate and opening new documents in same instance

    Can anyone chime in with some insight on this one?
    I'm not sure of the bump procedures here but it has been 3 days.
    Really bugging me, LOL.
    For now I'm just opening things within Kate to keep them all in the same instance. But I do likes me double clicky on the icons to open it Kate, too.

    Comment


      #3
      Re: help with Kate and opening new documents in same instance

      Did you not follow the instructions you found and posted in your original post?

      All you have to do is right-click on the K Icon (Kickoff Application Launcher), click on Menu Editor and click on the + next to Utilities, click on Kate and then edit the Command: to read Kate -u %U and then click on Save. You can then close the Menu Editor.

      Now, when Kate is launched, any other file type you've specified to open with Kate that is clicked will open that file in the current instance of Kate.
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Re: help with Kate and opening new documents in same instance

        Another option is to create a shell alias for kate (that should make kate use an existing kate window even when starting kate from command-line).

        If you use bash, you can define aliases in ~/.bashrc:
        alias kate='kate -u'
        (you'll need to restart the shell or source .bashrc for the new alias to take effect)

        Comment

        Working...
        X