[TxMt] Insert File/Path names + open a file without using a GUI
Hans-Jörg Bibiko
bibiko at eva.mpg.de
Sat Mar 10 18:19:41 UTC 2007
Hi,
I rewrote my Command 'Insert File/Path Name + AutoCorrect'.
Key: CTRL+TAB
Scope: none
BTW I use this Command very often to open a file without a mouse or
GUI. Just type:
'mate ' and invoke this Command, and finally press CTRL+R.
To illustrate that Command I did a screencast (without sound because
my mic is out of order, but there are written comments)
http://www.bibiko.de/TM_InsertFilePathNames.mov (ca. 5.7MB)
Comments are welcome!
Best,
Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileName Completion.tmCommand
Type: application/octet-stream
Size: 5906 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20070310/6d73c5d5/attachment.tmCommand>
-------------- next part --------------
Some features:
- simulates the TAB behaviour on a console with pull down menu,
auto correction by looking backwards for a vaild begin of a path/
file name,
and supports relative path names using TM_DIRECTORY
- it tries to complete that file name according to the file name
before the caret's position
(i.e.: It is possible to use this command not only at the end of
the line but also at the end of a
given path within the line and even inside a given path to
change it.)
- to auto-complete files beginning with a dot type:
e.g.: '~/.p' to look for dot files beginning with p
'~/.+' to list all dot files in the home directory
- if TM_BUNDLE_SUPPORT, TM_SUPPORT_PATH, etc. occures in a line it
will use this directory as start point
Hints:
The path ./ will be substitue with $TM_DIRECTORY!
../ is also supported for relative paths using $TM_DIRECTORY as root!
You can use wildcards. e.g. ~/Pictures/.*jpg (for all jpg files)
[case sensitive!]
Symlinks are supported but not for changing a given path name.
You can use TAB to jump to the end of the line, or if there is a
space in front of the
inserted path name you can jump to that space to delete or to
insert a /.
(Because this command inserts the text as snippet)
More information about the textmate
mailing list