Copying/moving snippets

Nothing is perfect! This is where you can post your ideas and wishes for functions you'd like to see in Help & Manual. Current version only please (H&M7).

Moderators: Alexander Halser, Tim Green

Post Reply
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Copying/moving snippets

Unread post by Rainer Oehry »

I can cut/copy and insert as well as highlight and dragdrop mostly anything (normal text, tables, images, conditions …), just not snippets. I cannot copy or move texts that contain snippets without the snippets being lost.

The snippets are included in a quite straightforward manner in the XML code, so it is not obvious why it shouldn't be possible to move the <snippet source/> section around like anything else?
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Copying/moving snippets

Unread post by Tim Green »

Hi Rainer,

Actually, the snippet is not lost when you copy, it just needs to be refreshed. If you switch to another topic and back to the topic where you inserted it, then you will see the content. Linked snippets don't contain the XML code of the content, they only contain a reference to the snippet name, so HM needs to load and render the content to display the preview.

However, this will only work without restrictions if you copy to the same project. If you copy to a different project the following conditions must be fulfilled:
  • The snippet must be inserted with the From File option and the location of the snippet must be included in the Project Search Path of the project where it is inserted.
    OR
  • The snippet must be inserted from a Style Repository and the project where it is inserted must also be linked to the same style repository.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Re: Copying/moving snippets

Unread post by Rainer Oehry »

Hi Tim,

thank you for your reply. That explains it—I just couldn't understand from the XML source why the snippet info should be lost, and am happy that it isn't …

I probably never found that out because I hate switching to another topic and then back to the one I am working on because the position within the topic is lost—every topic is always opened at the top. If I was in the middle of a longer topic, I have to scroll down to find the position I need to continue working on.

I. Is there a hotkey available that refreshes the current topic—ideally while keeping the scroll and cursor position unchanged?

II. Could you eventually consider changing the behavior of the editor to remember the last scroll and cursor position of every topic, so that I can continue working right where the topic was left? (I am aware that this one is probably not simple.)
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Copying/moving snippets

Unread post by Tim Green »

Hi Rainer,
Rainer Oehry wrote:Is there a hotkey available that refreshes the current topic—ideally while keeping the scroll and cursor position unchanged?

You can reload the topic with Project > Manage Topics > File: Reload topic. You can assign a keyboard shortcut to this and most other functions in View > Program Options > Shortcuts. You can also add the function to the QAT (Quick Access Toolbar) in the top left corner of the Help+Manual title bar (click on the More Buttons down arrow on the right of the QAT to select the functions you want to display).
II. Could you eventually consider changing the behavior of the editor to remember the last scroll and cursor position of every topic, so that I can continue working right where the topic was left? (I am aware that this one is probably not simple.)
Definitely not simple and could add a lot of potentially error-causing overheads to projects. What you can do is use the tabs feature to park topics you are editing in tabs: Right-click on a topic in the TOC and use the context menu to load it in a tab. Each tab is a self-contained editor and retains its position when you move away from it. Note that the leftmost tab has a special status: All browsing happens there, you can't browse in additional tabs. So you need to load the current topic into a tab to park it before moving on to another topic, as that will always be loaded in the leftmost browsing tab.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Re: Copying/moving snippets

Unread post by Rainer Oehry »

Hi Tim,

I am aware of the Reload Topic function, but it does not accomplish what I am looking for:

When I execute Reload Topic (BTW, it’s somewhat inconsistently called “Topic“ and “Topics”) after copying/moving a snippet, I get the message “The selected topic(s) have pending changes. Do you want to reload the original version …” which of course is NOT what I want to do … I want the topic to reload “in place” while keeping/incorporating my current changes—as if I came back from another topic …

Have I misunderstood something here?

Best regards,
Rainer
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Copying/moving snippets

Unread post by Tim Green »

Rainer,

You need to save the project first, of course, for reload to do what you want here. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Rainer Oehry
Posts: 102
Joined: Sun Dec 10, 2017 12:47 pm

Re: Copying/moving snippets

Unread post by Rainer Oehry »

Tim,

thank you, but that does not offer an “in place” refresh either, but “reopens” the topic at the top, and my scroll and cursor positions are lost, and it also requires two mouse clicks on different locations or two different keyboard inputs. So I am not really better off compared to browsing to another topic and switching back … but I will give it a try, maybe it’s less distracting than switching topics back and forth, and saving the currently open project(s) more often is not a bad idea anyway …

Probably a perfect solution is simply not available at the moment.

As we say in my German mother tongue: I will overlive it.

Thank you anyway and best regards,
Rainer
Regards,

Rainer
Head of Technical Writing & Knowledge Management
TIG Technische Informationssysteme GmbH, Rankweil, Austria
Post Reply