Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 08-19-2011, 04:23 AM
ebogaard ebogaard is offline
Registered User
 
Join Date: Aug 2011
Posts: 2
Copy / paste of tab creates spaces

There are several old threads about this issue, but none of them with a solution:
When I copy some code and paste it somewhere else, the tabs are replaced with spaces. This is very annoying. How can I fix this in Securecrt 6.7.2?
Reply With Quote
  #2  
Old 08-19-2011, 10:16 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi ebogaard,

Thanks for the question. Currently, SecureCRT does not convert whitespace to tabs when copying data from the terminal window. I have created a feature request to add this capability. Should a future release of SecureCRT convert whitespace to tabs, we will post to this thread.

If you would like to be notified directly, please complete and submit the form at the following location:
Submit Feature Request
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 08-19-2011, 05:04 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi ebogaard,

We have an example script (ConvertClipboard--LF-CR--Space-Tab.vbs.txt) from another forum post that illustrates how one can convert spaces in data copied from the SecureCRT terminal window to tabs.

Here is a little history about this issue.

If you're using a remote editor like vi or emacs, it may be rare that any literal Tab (ASCII 9 decimal) characters are ever sent to SecureCRT because remote editors usually "cook" data to make it appear the same on a wide variety of terminal types and screen dimensions. In "cooking" tabular data, a remote application might choose to send spaces or cursor movement escape sequences to provide horizontal separation between elements of text on a line.

Even when not in an editor, shell stty settings may results in an automatic conversion of Tabs to spaces (run 'stty -a | grep tab' at the shell to see if your shell has any special tab settings; run 'man stty' at the shell to see what the settings mean on your particular remote OS).

In the event that a literal Tab character is ever received by SecureCRT from the remote side, SecureCRT has to decide how to display it on the terminal screen since the Tab character is a non-printing ASCII character. By default, SecureCRT displays a Tab character as a sequence of spaces long enough to fill out the current 8-character wide "column".
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730

Last edited by jdev; 02-22-2018 at 12:48 PM.
Reply With Quote
  #4  
Old 08-22-2011, 04:21 AM
ebogaard ebogaard is offline
Registered User
 
Join Date: Aug 2011
Posts: 2
Hi,

the script works OK for what I want to do with it.
It would be great if you could integrate this functionality in SecureCRT, because now I have to switch between windows to paste text with tabs.
Might it be possible to add an option in SecureCRT to always convert a certain number of spaces into a tab?

Thanks

Last edited by ebogaard; 08-22-2011 at 10:29 AM.
Reply With Quote
  #5  
Old 08-22-2011, 09:15 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi ebogaard,

Thanks for the update. I am glad to hear that the example script meets your needs. With regards to integrating this functionality into SecureCRT, I am sure that it is possible. I created the feature request to do so previously in this thread. We will post to this thread if we do add the ability to convert spaces to tabs.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #6  
Old 09-01-2011, 02:32 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
******
Hi all,

I have attached an updated example that does correctly account for the absence of an argument and default to 4 spaces.

Todd
******

Hi ebogaard,

I have attached another example script (ConvertSpacesToTabsWhenCopying.vbs.txt) that is a simplified version of the previous script. It could be mapped to a button or a key combination and simply converts spaces into tabs. There is documentation in the script about how to use it.
Attached Files
File Type: txt ConvertSpacesToTabsWhenCopying.vbs.txt (1.9 KB, 332 views)
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730

Last edited by rtb; 02-22-2012 at 03:34 PM.
Reply With Quote
  #7  
Old 02-22-2012, 02:42 PM
bbrunette bbrunette is offline
Registered User
 
Join Date: Oct 2008
Posts: 7
Hi Todd,
I tried running the script and found that it didn't work without a number-of-spaces argument supplied. It looks like no arguments results in nSpaceCount being set to zero. So I tweaked the script a bit to work correctly.

Bob
Attached Files
File Type: txt ConvertSpacesToTabsWhenCopying.vbs.txt (2.0 KB, 301 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 05:33 PM.