Author Topic: Enhancement requests for File Tabs  (Read 2704 times)

chuckf2

  • Community Member
  • Posts: 13
  • Hero Points: 0
Enhancement requests for File Tabs
« on: September 12, 2008, 05:33:10 pm »
In my job I have to record all the files I work on.  It would really speed things up if I could right click on a tab in the File Tabs bar and select something like "Copy path and filename to clipboard". 

I would also like an item called "Load alternate file" which would load the header file if I was in a cpp file or it would load the cpp file if I was on a header file.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Enhancement requests for File Tabs
« Reply #1 on: September 12, 2008, 06:36:23 pm »
Regarding loading alternate file:  Do you know about the edit-associated-file command?  I have it bound to Ctrl+` for easy jumping between cpp/h (and other associated file types).

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Enhancement requests for File Tabs
« Reply #2 on: September 12, 2008, 06:40:50 pm »
Regarding "Copy path and filename to clipboard" -- maybe this will help:

Code: [Select]
/**
 * Copies the complete name of the file (path + name) to the clipboard.
 */
_command copyFileNameComplete() name_info(','VSARG2_MACRO|VSARG2_MARK)
{
   _macro('R',1);
   fileName = p_buf_name;                        //save the actual buffer name in "fileName".
   pushToClipboard(fileName);                    //path + name
}

/**
 * Write the contents of a_string to the clipboard
 */
void pushToClipboard(_str a_string)
{
   message(a_string);                            //print the file name in the status bar.

   //Create an empty clipboard:
   if (0 != push_clipboard_itype("CHAR"))
   {
      message("ERROR: push_clipboard_itype..." );
      return;

   }

   //Add the file name:
   if (0 != append_clipboard_text(a_string))
   {
      message("ERROR: appending to clipboard not possible..." );
      return;
   }
}


From dgmacros.e.  I think I found it on the SlickEdit web site some time ago.

hs2

  • Senior Community Member
  • Posts: 2736
  • Hero Points: 288
Re: Enhancement requests for File Tabs
« Reply #3 on: September 12, 2008, 06:45:30 pm »
Quote
"Copy path and filename to clipboard"
could be done via 'Files toolbar' (command: activate-files-files) + CTRL-C or CTRL-INS. In addition you can write and use a Slick-C own macro.
See also this post for some more details...

HS2