Code covered by the BSD License  

Highlights from
TextTools

Be the first to rate this file! 11 Downloads (last 30 days) File Size: 3.25 KB File ID: #25122

TextTools

by

 

Collection of small macros for text manipulation

| Watch this File

File Information
Description

TextTools provides a small collection of macros for text manipulation. They are intended to be used together with EditorMacro http://www.mathworks.com/matlabcentral/fileexchange/24615.
 
Included macros are:
       transpose_chars
              Swap characters around the caret
       transpose_words
              Swap words around the caret
       capitalize
              Capitalize word starting from caret location
       fill_comment
              Wrap current comment paragraph. Selects current comment paragraph and wraps and indents it.
              Follows Editor's comment width preference.

Syntax:
     tt = TextTools;
     ttMacro = TextTools(MacroName)
 
Examples:
     tt = TextTools;
     EditorMacro('Alt-Q',tt.fill_comment,'run')
  
     EditorMacro('Shift-Ctrl-T',TextTools('transpose_words'),'run')
 
 
 Warning:
     This code heavily relies on undocumented and unsupported Matlab functionality. Use at your own risk!

Acknowledgements

Editor Macro Assign A Macro To A Keyboard Key Stroke In The Matlab Editor And Command Window inspired this file.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us