(Uploaded by JohnBot from a locally edited file) |
(change "anon" author to blank; trim "created" date; minor manual clean) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
|previous=195 |
|previous=195 |
||
|next=197 |
|next=197 |
||
− | |created= |
+ | |created=2002 |
|complexity=basic |
|complexity=basic |
||
− | |author= |
+ | |author= |
|version=5.7 |
|version=5.7 |
||
|rating=30/17 |
|rating=30/17 |
||
+ | |category1= |
||
+ | |category2= |
||
}} |
}} |
||
In shell scripts, you often define environment variables for different directory names, for example: |
In shell scripts, you often define environment variables for different directory names, for example: |
||
− | |||
<pre> |
<pre> |
||
JAVA_HOME=/opt/java/jdk1.4 |
JAVA_HOME=/opt/java/jdk1.4 |
||
Line 22: | Line 23: | ||
Since the actual possibility of "=" being in any filename is very less, this char can be removed from the list of valid filename char. |
Since the actual possibility of "=" being in any filename is very less, this char can be removed from the list of valid filename char. |
||
+ | <pre> |
||
− | |||
− | + | set isfname-== |
|
+ | </pre> |
||
Putting the above line in vimrc will remove "=" from the list of valid filename chars. |
Putting the above line in vimrc will remove "=" from the list of valid filename chars. |
||
− | Thus you can easyly complete filenames using |
+ | Thus you can easyly complete filenames using <Ctrl-X> <Ctrl-F> |
==Comments== |
==Comments== |
||
For source code editors of Progress, based on this tip, I used |
For source code editors of Progress, based on this tip, I used |
||
+ | <pre> |
||
− | |||
− | + | set isfname-={,} |
|
+ | </pre> |
||
and now my include files are pulled in automatically with gf when they are in the format {myinclude.i} |
and now my include files are pulled in automatically with gf when they are in the format {myinclude.i} |
Latest revision as of 02:58, 4 December 2009
In shell scripts, you often define environment variables for different directory names, for example:
JAVA_HOME=/opt/java/jdk1.4 PATH=/usr/local/bin:/bin....
Normally typing Ctrl-X Ctrl-F is used to complete FileName under cursor. But this does not work if used on lines given above.
This is because Vim treats "=" sign as a valid filename character.
Since the actual possibility of "=" being in any filename is very less, this char can be removed from the list of valid filename char.
set isfname-==
Putting the above line in vimrc will remove "=" from the list of valid filename chars.
Thus you can easyly complete filenames using <Ctrl-X> <Ctrl-F>
Comments[]
For source code editors of Progress, based on this tip, I used
set isfname-={,}
and now my include files are pulled in automatically with gf when they are in the format {myinclude.i}