Re: Mac Questions

2007-01-07 Thread A.J.Mechelynck

Brett Calcott wrote:

>

If you type "echo $SHELL" (without the quotes) at the Terminal app
command-line, what is the answer?




/bin/bash for both gui and command line versions.


Brett



Hm, then let's wait and see what the Mac guys have to say.


Best regards,
Tony.


Re: Mac Questions

2007-01-07 Thread Brett Calcott

>

If you type "echo $SHELL" (without the quotes) at the Terminal app
command-line, what is the answer?




/bin/bash for both gui and command line versions.


Brett


Re: Mac Questions

2007-01-07 Thread A.J.Mechelynck

Brett Calcott wrote:

>
> 1. How do I distinguish between the command line and gui versions.
> Both appear to respond 'True' to has("gui"). Is there another feature
> that I should be looking for.

Many non-Windows versions of GUI-enabled Vim can also run in console 
mode.
"classical" way for a script to determine whether it is being sourced 
by gvim

or by Console Vim is to check has("gui_running").


Yay! Thanks for that Tony.




> 2. Where does the gui version get its initial environment from? I want
> to add some extra stuff to PATH. I know I can do this using $PATH in
> the .vimrc, but I would rather do it at some global level.
>
I don't know the answer to this one, except that it gets its 
environment the
same way as any other program. If Mac is sufficiently similar to Linux 
(both
are Unix-like OSes after all) non-login shells may get it from 
shell-specific
files like ~/.bashrc, ~/.cshrc, etc. (For details,see the manpage for 
your
shell.) (Note: Files whose names start with a dot are normally not 
listed in
directory listings. Use "ls -a" (possibly with other options) to make 
them

appear.)



I thought the same thing. But it does not appear to source my
.bash_profile or .bashrc.

Anyone out there got some clues...?

Thanks
Brett



If you type "echo $SHELL" (without the quotes) at the Terminal app 
command-line, what is the answer?



Best regards,
Tony.


Re: Mac Questions

2007-01-07 Thread Brett Calcott

>
> 1. How do I distinguish between the command line and gui versions.
> Both appear to respond 'True' to has("gui"). Is there another feature
> that I should be looking for.

Many non-Windows versions of GUI-enabled Vim can also run in console mode.
"classical" way for a script to determine whether it is being sourced by gvim
or by Console Vim is to check has("gui_running").


Yay! Thanks for that Tony.




> 2. Where does the gui version get its initial environment from? I want
> to add some extra stuff to PATH. I know I can do this using $PATH in
> the .vimrc, but I would rather do it at some global level.
>
I don't know the answer to this one, except that it gets its environment the
same way as any other program. If Mac is sufficiently similar to Linux (both
are Unix-like OSes after all) non-login shells may get it from shell-specific
files like ~/.bashrc, ~/.cshrc, etc. (For details,see the manpage for your
shell.) (Note: Files whose names start with a dot are normally not listed in
directory listings. Use "ls -a" (possibly with other options) to make them
appear.)



I thought the same thing. But it does not appear to source my
.bash_profile or .bashrc.

Anyone out there got some clues...?

Thanks
Brett


Re: Mac Questions

2007-01-07 Thread A.J.Mechelynck

Brett Calcott wrote:

Hi all,

I have just got a Macbook (switching from windows) and have downloaded
and compiled the latest version of Vim on it. It all works fine, but I
have a few questions.

1. How do I distinguish between the command line and gui versions.
Both appear to respond 'True' to has("gui"). Is there another feature
that I should be looking for.


Many non-Windows versions of GUI-enabled Vim can also run in console mode. The 
"classical" way for a script to determine whether it is being sourced by gvim 
or by Console Vim is to check has("gui_running").




2. Where does the gui version get its initial environment from? I want
to add some extra stuff to PATH. I know I can do this using $PATH in
the .vimrc, but I would rather do it at some global level.

Thanks for any aid,
Brett



I don't know the answer to this one, except that it gets its environment the 
same way as any other program. If Mac is sufficiently similar to Linux (both 
are Unix-like OSes after all) non-login shells may get it from shell-specific 
files like ~/.bashrc, ~/.cshrc, etc. (For details,see the manpage for your 
shell.) (Note: Files whose names start with a dot are normally not listed in 
directory listings. Use "ls -a" (possibly with other options) to make them 
appear.)



Best regards,
Tony.


Mac Questions

2007-01-07 Thread Brett Calcott

Hi all,

I have just got a Macbook (switching from windows) and have downloaded
and compiled the latest version of Vim on it. It all works fine, but I
have a few questions.

1. How do I distinguish between the command line and gui versions.
Both appear to respond 'True' to has("gui"). Is there another feature
that I should be looking for.

2. Where does the gui version get its initial environment from? I want
to add some extra stuff to PATH. I know I can do this using $PATH in
the .vimrc, but I would rather do it at some global level.

Thanks for any aid,
Brett


RE: gvim window maximize in freebsd6

2007-01-07 Thread Vu The Cuong
thanks for quick response :D
 

-Original Message-
From: A.J.Mechelynck [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 08, 2007 7:33 AM
To: vuthecuong
Cc: vim@vim.org
Subject: Re: gvim window maximize in freebsd6

vuthecuong wrote:
> In windows, this command " au GUIEnter * simalt ~x  " will make gvim 
> window to become maximize.
> How about in freebsd? When I used above command in freebsd, it cannot 
> maximize Thanks in advanced
> 
> 
> 

":simalt ~x" simulates "Alt-Space x", invoking that menu, if there is
any. It is not cross-language, and, as you saw, not always
cross-platform.

The command

if has("gui_running")
set lines= columns=
endif

will enlarge the GUI screen to within one character cell of the OS
viewport.

Ordering of statements may be important:
1) set 'guifont' (which changes the character cell's pixel size)
2) set 'lines' and 'columns'
3) set '(no)equalalways', 'winheight', 'winminheight' etc. (which depend
on the Vim screen size).


Best regards,
Tony.



Re: gvim window maximize in freebsd6

2007-01-07 Thread A.J.Mechelynck

vuthecuong wrote:

In windows, this command " au GUIEnter * simalt ~x  " will
make gvim window to become maximize.
How about in freebsd? When I used above command in freebsd,
it cannot maximize
Thanks in advanced





":simalt ~x" simulates "Alt-Space x", invoking that menu, if there is any. It 
is not cross-language, and, as you saw, not always cross-platform.


The command

if has("gui_running")
set lines= columns=
endif

will enlarge the GUI screen to within one character cell of the OS viewport.

Ordering of statements may be important:
1) set 'guifont' (which changes the character cell's pixel size)
2) set 'lines' and 'columns'
3) set '(no)equalalways', 'winheight', 'winminheight' etc. (which depend on 
the Vim screen size).



Best regards,
Tony.


gvim window maximize in freebsd6

2007-01-07 Thread vuthecuong

In windows, this command " au GUIEnter * simalt ~x  " will
make gvim window to become maximize.
How about in freebsd? When I used above command in freebsd,
it cannot maximize
Thanks in advanced




Re: Hello world & vim related software

2007-01-07 Thread zzapper
Adrien BUSTANY <[EMAIL PROTECTED]> wrote in news:45A01454.5030100
@mymadcat.com:

> [ This message is an ad for a GPLed software I wrote for my everyday vim
> usage. You've been warned :-) ]
> Hi there,
> Since the day I discovered sessions with vim I cannot live without them.
> I wanted a quick way to launch gvim -S mysessionfile and couldn't find
> one, so I developed a little app based on GTK 2.10 which answers my needs.
> The app sits in the tray (I believe it's freedesktop compatible though
> I'm not sure). You can use it to register where your vim session files
> are, and then it makes them available through a simple popup menu. That
> way, all your projects will stand one click away :)
> The homepage is http://mymadcat.com/vimsessions/

I've never really used sessions much (for no particular reason)  I'd probably 
use an alias (Cygwin on win32)

eg
alias vproj='gvim x[1-3].php doc.txt'

-- 
zzapper
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips