Vim Tips Wiki
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=1107
 
|previous=1107
 
|next=1109
 
|next=1109
βˆ’
|created=2006
+
|created=January 16, 2006
 
|complexity=basic
 
|complexity=basic
 
|author=l1th10n
 
|author=l1th10n
Line 13: Line 13:
 
}}
 
}}
 
{{dodgy|What exactly does this have to do with Vim? Please give a detailed example of how to use this in Vim (including before and after text)}}
 
{{dodgy|What exactly does this have to do with Vim? Please give a detailed example of how to use this in Vim (including before and after text)}}
βˆ’
When writing bash scripts and sudoers files, it can be tedious to determine the paths of the commands. Here is a procedure to use the <code>which</code> command to return the path of the selected word:
+
When writing bash scripts and sudoers files, it can be tedious to determine the paths of the commands. Here is a procedure to use the <tt>which</tt> command to return the path of the selected word:
   
 
<pre>
 
<pre>
Line 44: Line 44:
 
On Windows, you will have to translate ';' (instead of ':') into ',', and replace 'cat' by 'cat.exe'.
 
On Windows, you will have to translate ';' (instead of ':') into ',', and replace 'cat' by 'cat.exe'.
   
βˆ’
These solutions will work even without 'which' installed on the system. The path translation mechanism is wrapped in <code>:SearchInPATH</code> from {{script|id=229}}.
+
These solutions will work even without 'which' installed on the system. The path translation mechanism is wrapped in <tt>:SearchInPATH</tt> from {{script|id=229}}.
   
 
----
 
----
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)