Hi:
Is there any way to replace all tabs into the corresponding spaces, i.e. if I have:
{TAB}1234
1{TAB}234
12{TAB}34
123{TAB}4
{TAB} should be replaced in the first line by 4 spaces, OK you can search-replace \t by 4 spaces, but in the second line by 3 spaces and so on and this is not so easy
Npp does it "on the fly" perfectly while you write with the "Replace by space" checkbox and the TextFX Edit command "Leading spaces to tabs or tabs to spaces" works fine for the leading spaces, but I need some way do replace correctly text pasted from excel (with tabs between the text).
Does anyone knows any trick for doing so?
Thanks in advance and kind regards
José E
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the response, but I can only use Unicode and the functions of the plugin (at least those in Functions.xml)doesn't allow check the current char or replace
Regards
José E
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd suggest using the SimpleScript or NppJavaScript plugin. The former would be more straightforward to use, but is ANSI only. The latter is Unicode only.
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi:
Is there any way to replace all tabs into the corresponding spaces, i.e. if I have:
{TAB}1234
1{TAB}234
12{TAB}34
123{TAB}4
{TAB} should be replaced in the first line by 4 spaces, OK you can search-replace \t by 4 spaces, but in the second line by 3 spaces and so on and this is not so easy
Npp does it "on the fly" perfectly while you write with the "Replace by space" checkbox and the TextFX Edit command "Leading spaces to tabs or tabs to spaces" works fine for the leading spaces, but I need some way do replace correctly text pasted from excel (with tabs between the text).
Does anyone knows any trick for doing so?
Thanks in advance and kind regards
José E
Thanks for the response, but I can only use Unicode and the functions of the plugin (at least those in Functions.xml)doesn't allow check the current char or replace
Regards
José E
Does cutting the text from the whole document and pasting it in a new document perform conversion on the fly??
CChris
Thanks for the reply, but it doesn't do the conversion neither pasting from excel nor pastin from another Npp tab.
Regards,
José E
I'd suggest using the SimpleScript or NppJavaScript plugin. The former would be more straightforward to use, but is ANSI only. The latter is Unicode only.
CChris