File Exchange

image thumbnail

TextTools

version 1.0 (3.25 KB) by

Collection of small macros for text manipulation

0 Downloads

Updated

View License

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!

Comments and Ratings (0)

MATLAB Release
MATLAB 7.5 (R2007b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today