I have a line like this:
foobar
since you see that there are many spaces between the first column and βfoobarβ. If I have a pointer in the first column, is there a key binding to remove spaces before "foobar"?
d w
Will remove all spaces if you are in the first column.
dtf
Delete to F
There are no other simple commands. You can use regex, but it would be harder to write.
My bad answer @Mat is even better ( dw ).
dw
Simple answer
... which executes [d] elete [w] ord. If you want to remove all spaces in the entire document before all occurrences of "foobar":
:%s/^\s*foobar/foobar/
Method 1: Go to the line and :s/^ *//g
:s/^ *//g
Path 2: Go to the first blank space of this line and press dw
Source: https://habr.com/ru/post/914962/More articles:Django-MPTT full path to child pages, how to do? - django-urlsUnable to implement password filter - c ++InstanceClass.NewInstance vs InstanceClass.Create - oopHow to load balance in a RabbitMQ cluster? - amazon-web-servicesSend message from server to client with dnode - javascriptPHP updates MYSQL's many-to-many relationship - phpvim: how to remove spaces between cursor and code? - vimIs it possible to use ASP.NET to globally block all cookies (including third-party) that are deleted when someone is on my site? - browserHow can I switch between two images - jqueryShould I use view restrictions or the minimum window size? - user-interfaceAll Articles