[Feature request] right-to-left editing for each tab
-
Currently, the CONTROL-ALT-R/L enable right to left or left to right editing globally: all the opened tabs are affected by the control at once. As a person that has to write in both English and Hebrew very often, I can tell you this is highly undesirable. The left-to-right/left controls MUST be tab independent, for you have very often documents in English opened in one tab, and another document in Arab, Hebrew etc. opened in another tab. For global behavior, nothing prevents to add a default control in the preference menu if desired, but I think this is far less important.
-
There was a discussion on this recently, see this post.
It also links to a github post which is where feature requests are made in order to get the developers attention.
Not sure there has been much movement though to date.
I suggest you add your weight to that github post.
Terry
-
@Terry-R Don’t find the link to Github. Could you add a link to the github post?
-
@maimonid-toledano
You didn’t read the entire thread, it’s in one of the posts in that threadTerry
-
@Terry-R Finally found it. OK I’ve added a comment there.
-
Another link where this has been discussed before: https://community.notepad-plus-plus.org/topic/21701/keep-rtl-ltr-per-tab
This (RTL) is a specific attribute of a more general lack in Notepad++: per tab settings
The most common per-tab request is that “word wrap” be non-global and apply to the file tabs individually – that way a user could have certain tabs (e.g. their C++ source code) non-line-wrapped, and other tabs (e.g. maybe their .txt files with notes about their source code) line-wrapped like a word-processor would do.
-
@Alan-Kilborn
thx. You said there you can control some of these things with Python-script plugin. Could you indicate me how you do that? -
It could be done via scripting for RTL like I show HERE for wrapping.
-
Here’s an example of a possible script:
# -*- coding: utf-8 -*- # references: # https://community.notepad-plus-plus.org/topic/24849/ from Npp import * #------------------------------------------------------------------------------- class TDTFAT(object): def __init__(self): self.rtl_by_buffer_id_dict = {} notepad.callback(self.bufferactivated_callback, [NOTIFICATION.BUFFERACTIVATED]) def bufferactivated_callback(self, args): bid = args['bufferID'] menu_cmd = MENUCOMMAND.EDIT_LTR if bid in self.rtl_by_buffer_id_dict and self.rtl_by_buffer_id_dict[bid] == 1: menu_cmd = MENUCOMMAND.EDIT_RTL notepad.menuCommand(menu_cmd) def toggle_text_direction_mode(self): bid = notepad.getCurrentBufferID() if bid in self.rtl_by_buffer_id_dict: self.rtl_by_buffer_id_dict[bid] = 1 if self.rtl_by_buffer_id_dict[bid] == 0 else 0 # toggle else: self.rtl_by_buffer_id_dict[bid] = 1 # turn rtl on for current file notepad.menuCommand(MENUCOMMAND.EDIT_RTL if self.rtl_by_buffer_id_dict[bid] else MENUCOMMAND.EDIT_LTR) self.sb_output('Text direction is {} for active tab'.format('RTL' if self.rtl_by_buffer_id_dict[bid] else 'LTR')) def sb_output(self, *args): # output to N++'s status bar (will be overwritten by N++ e.g. when active tab is changed) notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, ' '.join(map(str, args))) #------------------------------------------------------------------------------- # to run via another file, e.g., startup.py, put these lines (uncommented and unindented) in that file: # import TextDirectionToggleForActiveTab # tdtfat = tdtfat.TDTFAT() # when this script is run interactively, it will toggle the text direction setting on the currently active tab if __name__ == '__main__': try: tdtfat except NameError: tdtfat = TDTFAT() tdtfat.toggle_text_direction_mode()
For newbie info on PythonScripts, see https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript
-
-
@Alan-Kilborn Thank you Alan. I will try it.