I want to comment in visual studio in Persian (which is a right to left language) like this:
//.برای نگهداری مقدار اولیه ی کالا می باشد value_ متغیر
But it seems the code editor does not support RTL languages and reorders the words so the result is:
//متغیر _value برای نگهداری مقدار اولیه ی کالا می باشد.
That does not read as I expected!
Anybody have a solution for this problem?
To move the text to the right, click Edit > Shift Right. To move the text to the left, press Shift+Tab. To move the text to the left, click Edit > Shift Left.
Comment Code Block Ctrl+K+C/Ctrl+K+U If you select a block of code and use the key sequence Ctrl+K+C, you'll comment out the section of code. Ctrl+K+U will uncomment the code.
You can simply put an RLE (RIGHT-TO-LEFT EMBEDDING, U+202B)
character before your paragraph. This control character is also supported in browsers and most text editors.
Without RLE:
// متغیر _value برای نگهداری مقدار اولیه ی کالا می باشد.
With RLE:
// متغیر _value برای نگهداری مقدار اولیه ی کالا می باشد.
I use this template for my RTL comments (you must press END
button, not going between quotation marks):
// ''
Also for Python:
# ''
In Visual Studio Code, you have to set "editor.renderControlCharacters": false
in settings.
Also you can set a keyboard shortcut for editor.action.toggleRenderControlCharacter
.
I recently wrote an extension for vscode that allows you to leave comments from right to left. You can use the result that returns, in Visual Studio or any other program. "RTL Comment Support" do it for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With