Code covered by the BSD License  

Highlights from
TextTools

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

TextTools

by Perttu Ranta-aho

 

24 Aug 2009

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

The author wishes to acknowledge the following in the creation of this submission:
EditorMacro - assign a macro to a keyboard key-stroke in the Matlab Editor and Command Window

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
editor Perttu Ranta-aho 24 Aug 2009 15:57:19
undocumented Perttu Ranta-aho 24 Aug 2009 15:57:19
macro Perttu Ranta-aho 24 Aug 2009 15:57:19

Contact us at files@mathworks.com