123mac vim tip: changing directories
- Oct 16, 2000The most recent version of vim for the Mac includes a file macvimrc
based on one I wrote. In particular, there are a couple of lines
let HOME = 'Macintosh HD:Desktop Folder:Documents:Benji'
let Desktop = 'Macintosh HD:Desktop Folder'
which you should probably edit before using. If you decide to use
these, you have to remember that these are vim variables, not
environment variables. Since you do not want to go around typing
:execute "cd" HOME
I recommend the following vim command:
" Since environment variables are not allowed on the Mac, the following
" lines allow us to do
" :CD HOME
" :CD Desktop
command! -nargs=1 -complete=var CD execute "cd" <args>
Because of the completion, you may be able to type "D<Tab>" instead of "Desktop".
- Next post in topic >>