Re: path shortcuts (variables?) on commandline?

2007-05-17 Thread Maciej Kalisiak

Perfect!  Thanks!

On 5/17/07, Timothy Adams <[EMAIL PROTECTED]> wrote:

:cabbr desktop c:\docume~1\user\Desktop


RE: path shortcuts (variables?) on commandline?

2007-05-17 Thread Timothy Adams
I'd just use an abbreviation

:cabbr desktop c:\docume~1\user\Desktop

Then you can just do:

:e desktop\sub\sub\sub\file.ext

When you hit the \ (or space, or whatever) after desktop the abbreviation will 
fill in w/ c:\etc

Be warned that this will do so whenever you type desktop in command mode, so if 
that's a problem make the abbreviation something you're less likely to use 
(dtpath or something).

*tim* 

-Original Message-
From: Maciej Kalisiak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 17, 2007 1:32 PM
To: vim@vim.org
Subject: path shortcuts (variables?) on commandline?

Can anyone recommend any nice shortcuts for entering common long paths on the 
commandline?  My situation: I am running on Windows XP and often end up typing 
:e c:/Documents\ and\ Settings/User/Desktop/foo/bar/...  I currently use 
Tab/completion to get each path element, but this is still very slow, 
especially considering how frequently I enter the Desktop subpath.  Ideally I'd 
like to use some sort of variable, along the lines of :e %DESKTOP%/foo/bar, but 
not sure what the most sane way to do this is, considering the large variety of 
variable types in Vim.


path shortcuts (variables?) on commandline?

2007-05-17 Thread Maciej Kalisiak

Can anyone recommend any nice shortcuts for entering common long paths
on the commandline?  My situation: I am running on Windows XP and
often end up typing :e c:/Documents\ and\
Settings/User/Desktop/foo/bar/...  I currently use Tab/completion to
get each path element, but this is still very slow, especially
considering how frequently I enter the Desktop subpath.  Ideally I'd
like to use some sort of variable, along the lines of :e
%DESKTOP%/foo/bar, but not sure what the most sane way to do this is,
considering the large variety of variable types in Vim.