vinsworldcom / nppQuickText

Notepad++ plugin for text snippet substitution.
GNU General Public License v2.0
21 stars 3 forks source link

\t TAB key simulation is demanded #22

Closed mikered2 closed 3 years ago

mikered2 commented 3 years ago

like \n I need \t to simulate TAB key press. i like to code python blocks identation with tab and not with spaces.

vinsworldcom commented 3 years ago

I can look into it, but you'll need to edit the QuickText.ini file manually - you won't be able to use the "Setting" menu to add TAB as TAB key cannot be entered in the text box control - it just switches to the next control on the Settings window. Using a literal '\t' in the text box will be a literal '\t'. I don't think trying to guess user intent in the Settings dialog is worth it.

Currently, when reading the QuickText.ini file, I change "\n" to actual carriage return / line feeds as per the document's EOL setting. I think that may be the correct way to to "\t" as well - query the TAB setting (keep tabs or expand) and treat accordingly.

Cheers.

vinsworldcom commented 3 years ago

Actually, just tested and you can cut / paste a TAB into the Settings "Substitution Text" text box. So you can just type in the text you want, cut / paste TABs instead of 4 or however many spaces and it not only saves correctly into the QuickText.ini file, but when you use the Tags, they insert TABs correctly into the doc. I just tested for Makefile which requires TABs, not spaces for indents.

Cheers.

mikered2 commented 3 years ago

Thumbs Up.Thanks

vinsworldcom commented 3 years ago

No fix needed.

vinsworldcom commented 2 years ago

You can also use Ctrl+Tab in the "Substitution Text" box in Settings to insert a tab character.