[TxMt] Insert File/Path names + open a file without using a GUI

Thomas Aylott (subtleGradient) oblivious at subtlegradient.com
Sat Mar 10 22:10:29 UTC 2007


On Mar 10, 2007, at 1:19 PM, Hans-Jörg Bibiko wrote:

> 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
>
> <FileName Completion.tmCommand>
>
> 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)

It's been a while now and mine is totally out of date, but have you  
seen my Filename / Filepath Completion?
http://subtlegradient.com/articles/2006/11/02/filename-filepath- 
completion-for-textmate-screencast

Might have saved you some time to just fix mine, oh well.
I'll have to try yours out and see how it works. Maybe I won't have  
to upgrade mine afterall ;)

thomas Aylott — subtleGradient — CrazyEgg — sixteenColors


More information about the textmate mailing list