Smart RTLPersian and Arabic text, easier to read inside your code. Smart RTL automatically improves right-to-left display for Persian and Arabic text in the standard VS Code editor: tag content, attributes, strings, and comments. It updates as you type and scroll, without rewriting your source files. Preview · Free · Publisher: Arsam Kalhor ( Install from Visual Studio Marketplace InstallOpen Extensions ( Or run:
You can also open Quick Open (
UseDetection runs automatically after activation. Open a file containing Persian or Arabic text and start editing.
Actual editor previewThese screenshots show the same unmodified Before — Smart RTL disabledAfter — Smart RTL enabledThe images show actual editor rendering. Smart RTL does not style code blocks in this README or in the Marketplace preview. Raw mixed-direction code can look different there; open the example in VS Code to compare the result. Copyable source examples — not an editor rendering previewText inside tags and attributes:
Strings and comments:
Copy these snippets into an HTML or JavaScript file in VS Code. No direction markers are embedded in the source. Features
SettingsSearch for persianSmartRtl in Settings, or add these options to
PrivacyAll processing happens locally. Smart RTL sends no network requests, collects no telemetry, and does not upload your code. It does not modify VS Code's installation files. Preview limitationsSmart RTL improves text display; it is not a complete native bidirectional editing engine. Cursor movement, selection, word wrapping, fonts, themes, and input methods can affect the result. Detection uses Arabic-script letters and common code delimiters rather than a complete parser for every language. Quotes, tags, braces, slashes, and other delimiters can split a phrase into separate segments. Syntax highlighting can also split a phrase across multiple rendered tokens. Persian and Arabic are not distinguished linguistically. The implementation uses fixed CSS through VS Code text decorations. Additional direction styling is a compatibility workaround, not an official Verified environment: VS Code 1.142.0 on Linux, including the example's rendered direction, mouse click position, typing, Undo, split editors, and scrolling. Windows, macOS, IME, and every combination of wrapping, cursor, selection, and syntax highlighting have not been verified. The extension affects the editor display only. For an RTL website, set راهنمای فارسیSmart RTL نمایش متن فارسی و عربی را داخل ادیتور VS Code خواناتر میکند؛ از متن داخل تگها و ویژگیها گرفته تا رشتهها و کامنتها. تشخیص پس از فعالشدن افزونه خودکار است و با تایپ و اسکرول بهروز میشود. نصب و استفادهدر بخش Extensions، عبارت Smart RTL را جستوجو و افزونهٔ Arsam Kalhor را نصب کنید؛ یا از صفحهٔ Marketplace استفاده کنید. برای روشن یا خاموشکردن، روی FA RTL در نوار پایین کلیک کنید یا دستور Smart RTL: Toggle را از Command Palette اجرا کنید. اگر زبان فایل در نیمفاصله، حروف فارسی و ترکیب فارسی با کلمات انگلیسی و عدد در قطعهٔ تشخیصدادهشده پشتیبانی میشوند. تنظیمات پیشفرض در بخش Settings همین راهنما آمدهاند؛ برای پیداکردن آنها در تنظیمات VS Code عبارت persianSmartRtl را جستوجو کنید. پیشنمایش واقعیتصویرهای بخش Actual editor preview از یک کد یکسان در VS Code گرفته شدهاند؛ تصویر اول با افزونهٔ خاموش و تصویر دوم با افزونهٔ روشن است. افزونه داخل پیشنمایش README یا Marketplace اجرا نمیشود. بلوک کد زیر بخش بازشدنی فقط برای کپی است و نمایش نتیجهٔ افزونه محسوب نمیشود. حریم خصوصی و محدودیتهاپردازش کاملاً محلی است؛ افزونه متن فایل را تغییر نمیدهد، کاراکتر مخفی اضافه نمیکند و کد شما را به جایی نمیفرستد. این نسخه پیشنمایش است و جایگزین پشتیبانی بومی کامل RTL برای مکاننما، انتخاب و شکستن خط نیست. تشخیص بر اساس حروف و جداکنندههای رایج کد انجام میشود؛ قالبهای پیچیده و رنگآمیزی کد ممکن است یک عبارت را به چند قطعه تقسیم کنند. نمایش و تعاملهای نمونه در VS Code 1.142.0 روی Linux بررسی شدهاند. Windows، macOS، روشهای ورودی IME و همهٔ ترکیبهای زبان، فونت و تم بررسی نشدهاند. برای راستبهچپبودن خود صفحهٔ وب همچنان باید DevelopmentWith Node.js 22 or later and Python 3:
To refresh the real before/after screenshots, run The VSIX is written to The integration runner requires Linux, LicenseMIT. See the |