Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
DisplayFusion
FileSeek
HashTools
LogFusion
Notepad Replacer
Online Base64 Decoder
Online Base64 Encoder
Online JSON Formatter
ShellSend
TrayStatus
VoiceBot
WallpaperFusion
Window Inspector
More Apps...
DisplayFusion
CheckCentral
CloudShow
ClipboardFusion
FileSeek
TrayStatus
VoiceBot
WallpaperFusion
Clipboard
Fusion
by Binary Fortress Software
Download
Download
Change Log
Download Beta
Beta Change Log
License (EULA)
Features
Features
HotKeys
Macros
Triggers
Clipboard Syncing
Clipboard Manager
Languages
Free vs Pro
Apps
More
Screenshots
Macros
Languages
Help
Help Guide
FAQ
Discussions
Contact Us
Find My License
Mailing Address
Advanced Settings
Purchase
Login / Register
WARNING: You currently have Javascript disabled!
This website will not function correctly without Javascript enabled.
Title
Message
OK
Confirm
Yes
No
Indent/Unindent Text
Return to ClipboardFusion Macros
Description
Use this Macro to indent or unindent text. Use a positive value for indentSize to indent (move text to the right by 1 tab), use a negative value to unindent (move text to the left by 1 tab).
Language
C#.net
Minimum Version
3.3+
Created By
Splat
Contributors
-
Date Created
Aug 19, 2014
Date Last Modified
Aug 19, 2014
Macro Code
Copy
Select All
using System; using System.Text.RegularExpressions; public static class ClipboardFusionHelper { public static string ProcessText(string text) { int indentSize = 1; //Use negative or positve values char indentChar = '\t'; //Tab character if (indentSize > 0) text = Regex.Replace(text, @"^", new string(indentChar, indentSize), RegexOptions.Multiline); else if (indentSize < 0) text = Regex.Replace(text, @"^" + new string(indentChar, Math.Abs(indentSize)), "", RegexOptions.Multiline); return text; } }