Vim Tips Wiki
Register
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 4: Line 4:
 
|previous=1495
 
|previous=1495
 
|next=1499
 
|next=1499
βˆ’
|created=2007
+
|created=February 1, 2007
 
|complexity=basic
 
|complexity=basic
 
|author=fomit
 
|author=fomit
Line 14: Line 14:
 
Often, you might want to delete a set of arguments within bash scripts in Unix environments as an admin.
 
Often, you might want to delete a set of arguments within bash scripts in Unix environments as an admin.
   
βˆ’
So you might think <code>dw</code> (delete word) does the job, because it often does, actually. However, in Unix environments you might also interpret a word in a different way, e.g. a "/path/to/file" can be seen as just one word in terms of the number of arguments. In that case, "dw" will not delete "/path/to/file", instead it will interpret every slash "/" as a separate word, so you have to enter "dw" 6 times.
+
So you might think <tt>dw</tt> (delete word) does the job, because it often does, actually. However, in Unix environments you might also interpret a word in a different way, e.g. a "/path/to/file" can be seen as just one word in terms of the number of arguments. In that case, "dw" will not delete "/path/to/file", instead it will interpret every slash "/" as a separate word, so you have to enter "dw" 6 times.
   
 
Instead, you can dynamically enter your own, currently needed delimiter without changing Vim's global behavior in vimrc by just typing "df " (d f space). That deletes from the cursor position to, and including, the next space.
 
Instead, you can dynamically enter your own, currently needed delimiter without changing Vim's global behavior in vimrc by just typing "df " (d f space). That deletes from the cursor position to, and including, the next space.
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)