You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Using [Vundle](https://github.com/VundleVim/Vundle.vim)
41
41
42
-
First, declare the plugin in you`.vimrc`
42
+
First, declare the plugin in your`.vimrc`
43
43
```vim
44
44
Plugin 'mboughaba/vim-lessmess'
45
45
```
@@ -51,7 +51,7 @@ Then run plugin install command
51
51
52
52
3. Using [Plug](https://github.com/junegunn/vim-plug)
53
53
54
-
First, declare the plug in you`.vimrc`
54
+
First, declare the plug in your`.vimrc`
55
55
```vim
56
56
Plug 'mboughaba/vim-lessmess'
57
57
```
@@ -70,11 +70,11 @@ This is fully tested and blazing fast but if you don't mind white-spaces in your
70
70
71
71
72
72
## Usage
73
-
Out of the box, this plugin will clean trailing white-space, fix mixed-indent and remove empty lines at the end of a file when the file is saved.
73
+
Out of the box, this plugin will clean trailing white-spaces, fix mixed-indents and remove empty lines at the end of a file when the file is being saved.
74
74
In more technical details, there are two important functions `LessmessExecute` and `LessmessDisplayToggle`.
75
75
76
76
77
-
### Automagically remove all annoying white-spaces :heavy_check_mark:
77
+
### Automagically :dizzy:remove all annoying white-spaces :heavy_check_mark:
78
78
White-spaces removal `onsave` is enabled by default. Just save the buffer and the file is clean.
79
79
80
80
@@ -83,18 +83,18 @@ First, to disable lessmess `onsave` make sure to include the configuration below
83
83
```vim
84
84
let g:enable_lessmess_onsave = 0
85
85
```
86
-
To remove (on demand) trailing white-spaces, fix mixed-indent and remove newlines at the end of file all at once, call the following command:
86
+
To remove `ondemand`trailing white-spaces, fix mixed-indents and remove newlines at the end of file all at once, call the following command:
87
87
```vim
88
88
LessmessExecute
89
89
```
90
90
91
91
92
92
### Simple white-spaces highlighting
93
-
I personally don't see a need of white-space highlighting, if I know they will be removed when I save. Nevertheless, to toggle highlighting of hidden characters, use command below.
93
+
I personally don't see a need of white-space highlighting, as long as I am confident they will be removed when I save. Nevertheless, to toggle highlighting of hidden characters, use command below.
94
94
```vim
95
95
LessmessDisplayToggle
96
96
```
97
-
This is simply calling vim native toggle list, I highly believe that syntax highlighting for white-spaces is a bit overkill. So why not just use ViM built-in list.
97
+
This is simply calling vim native toggle list, I highly believe that syntax highlighting for white-spaces is a bit overkill in many cases so why not just use something as simple as ViM built-in list.
98
98
99
99
100
100
### Configuration
@@ -103,7 +103,7 @@ This is simply calling vim native toggle list, I highly believe that syntax high
103
103
LessmessToggle
104
104
```
105
105
106
-
2. Plugin can be disabled per buffer. An example would disabling white-spaces trimming for all `vader` test files
106
+
2. Plugin can be disabled per buffer. An example would disabling white-space trimming for all `vader` test files
107
107
```vim
108
108
"
109
109
" Lessmess disable by FileType
@@ -120,8 +120,8 @@ let g:disable_lessmess = 1
120
120
```
121
121
122
122
123
-
### Handy tool
124
-
When **Lessmess is disabled**, white-spaces can be removed by calling `force` execute:
123
+
### Handy tool:wrench:
124
+
When **Lessmess is disabled**, white-spaces can be removed by calling `force` execute:hammer::
125
125
```vim
126
126
LessmessForceExecute
127
127
```
@@ -134,8 +134,8 @@ LessmessStatus
134
134
```
135
135
136
136
137
-
# Advanced configuration
138
-
1. Lessmess can be configured to request user's confirmation before removing white-space. To enable this feature following configuration need to be added to the user's `.vimrc`
137
+
###Advanced configuration
138
+
1. Lessmess can be configured to request user's confirmation before removing white-spaces. To enable this feature, following configuration need to be added to the user's `.vimrc`
139
139
```vim
140
140
let g:confirm_whitespace_removal = 1
141
141
```
@@ -153,11 +153,14 @@ test/vader/run
153
153
154
154
155
155
## Self promotion
156
-
Why this one and not the other two or three trailing white-spaces removal plugins?
156
+
Why this one and not the other two trailing white-spaces removal plugins:question:
157
157
1. This is fully `autoloaded`, slowing down your ViM startup time was not an option
158
158
2. This is designed with performance in mind. The plugin doesn't do live updates, it does the heavy lifting when ViM is idle.
159
159
1. Making use of Vim jobs is in the pipe.
160
160
3. Absolutely no configuration is required to get started. Everything follows the [KISS principle](https://en.wikipedia.org/wiki/KISS_principle)
161
161
4. This plugin is fully unit tested using [Vader](https://github.com/junegunn/vader.vim)
162
162
5. This running on [Travis CI](https://travis-ci.org/mboughaba/vim-lessmess)
163
163
6. This is actively maintained
164
+
7. More features can be added easily on top of the base we have so far
165
+
166
+
:wave: Hey :grey_exclamation: if you like the plugin and find it useful hit :star:
0 commit comments