Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add operation Trim Trailing TAB #9228

Open
GOLEM777 opened this issue Dec 4, 2020 · 5 comments
Open

Add operation Trim Trailing TAB #9228

GOLEM777 opened this issue Dec 4, 2020 · 5 comments

Comments

@GOLEM777
Copy link
Contributor

GOLEM777 commented Dec 4, 2020

In NP++ there is a function Blank Operations --> Trim Trailing Space.
Can anyone add a similar function, but only for TABs? Trim Trailing TAB

@GOLEM777 GOLEM777 closed this as completed Dec 4, 2020
@sasumner
Copy link
Contributor

sasumner commented Dec 4, 2020

How about recording a regular expression "replace all" macro for it?:

find: \t+$
replace: nothing

Save the macro with name "Trim Trailing TAB"


The more general case would be to "Trim Trailing Whitespace":

find: \h+$
replace: nothing

@GOLEM777
Copy link
Contributor Author

GOLEM777 commented Dec 4, 2020

Thx!
I think we still need to rename the existing option on
Trim Trailing Space/TAB
and
Trim Starting Space/TAB

@sasumner
Copy link
Contributor

sasumner commented Dec 4, 2020

I think we still need to rename the existing option on

I think I agree.
I never noticed that they remove tab characters as well as space characters.
The menu text definitely leads one to believe that only spaces will be affected.

Also, the terms "Blank" and "Whitespace" are used at different places (in the English UI text), when they mean the same thing:

  • Edit > Blank Operations

  • View > Show Symbol > Show White Space and TAB

I'm going to reopen this issue so that we can consider these things...

@sasumner sasumner reopened this Dec 4, 2020
@GOLEM777
Copy link
Contributor Author

GOLEM777 commented Dec 4, 2020

If so, then you can combine Blank Operations with Indent option.
Increase Line Indent = Add one TAB only before text.
Decrease Line Indent = Remove ...

@sasumner
Copy link
Contributor

sasumner commented Dec 4, 2020

I think Indent is different enough from Blank Operations to be okay as a separate area on the Edit menu.
Of course, opinions may vary...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants