View Single Post
  #1  
Old 12-10-2013, 02:15 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 920
Post Example: Set Word Delimiters

By default, SecureCRT uses all non-alphanumeric characters (except underscore) as word delimiters when selecting an entire "word" with a double-click action.

Ever wanted double-click word selection to behave differently depending on the current situation? For example:
  • Sometimes you might want double-click to select everything bounded by spaces
  • At other times you may want to be able to select a word at the end of a sentence without the trailing period being included with the selection.

SecureCRT's word delimiter functionality can be customized to allow you to word-select text efficiently using the word delimiters that work best for you most of the time. However, what about those times where you need slightly different word selection behavior? You might opine that configuring a new word delimiter character set might be too much overhead for something you may only need for a short period of time.

This example script shows one way of cycling through different delimiter sets for double-click word selection. Simply open SecureCRT's button bar and map a new button to run this script. Every time you press the button, SecureCRT's word delimiters for that particular session will change, rotating through 5 different word delimiter sets -- one of which being the set defined in Global Options.

The script is written in Python, so it should work for you on any platform officially supported by SecureCRT.
Attached Files
File Type: txt SetWordDelimiters.py.txt (3.4 KB, 1165 views)

Last edited by jdev; 08-24-2018 at 01:06 PM.