Anything that removes extra spaces before end of lines?
Anything that removes extra spaces before end of lines?
I was wondering if you know any editor plugin that would remove extra spaces (and tabs) before end of lines?
Preferably also giving a warning when I try to save a file which has such unnecessary characters...
I hate opening my source files in vim and seeing such spaces highlighted in red.
Preferably also giving a warning when I try to save a file which has such unnecessary characters...
I hate opening my source files in vim and seeing such spaces highlighted in red.
- HaRT
- Moderator
- Posts: 10866
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 221 times
- Been thanked: 358 times
Re: Anything that removes extra spaces before end of lines?
There are lots of such plugins. The most mature and powerful is [ESC]. Of course, it does much more than that.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Re: Anything that removes extra spaces before end of lines?
But how do I setup Esc to do what I need?
The manual is only in Russian.
The manual is only in Russian.
-
- Posts: 6840
- Joined: Thu 23 Mar, 2006 21:36
- Location: Israel
- Has thanked: 41 times
- Been thanked: 530 times
Re: Anything that removes extra spaces before end of lines?
Alternatively, you can use the following macro:kamil wrote:I was wondering if you know any editor plugin that would remove extra spaces (and tabs) before end of lines?
Preferably also giving a warning when I try to save a file which has such unnecessary characters...
I hate opening my source files in vim and seeing such spaces highlighted in red.
- HaRT
- Moderator
- Posts: 10866
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 221 times
- Been thanked: 358 times
Re: Anything that removes extra spaces before end of lines?
Configs are in English. Find “killspace” there.kamil wrote:But how do I setup Esc to do what I need?
The manual is only in Russian.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Re: Anything that removes extra spaces before end of lines?
This is perfect and works just how I need.Shmuel wrote:Alternatively, you can use the following macro
Also I learned about lua macros, BTW
Thanks a lot!
Re: Anything that removes extra spaces before end of lines?
Oh - I see now... Just had to add my extension to esc_sources.xmlHaRT wrote:Configs are in English. Find “killspace” there.kamil wrote:But how do I setup Esc to do what I need?
The manual is only in Russian.
Cheers!
-
- Posts: 6840
- Joined: Thu 23 Mar, 2006 21:36
- Location: Israel
- Has thanked: 41 times
- Been thanked: 530 times
Re: Anything that removes extra spaces before end of lines?
kamil
I've edited the macro.
Pay attention to filemask field. Set it according to to your preference. Do NOT include extensions of binary files there.
I've edited the macro.
Pay attention to filemask field. Set it according to to your preference. Do NOT include extensions of binary files there.