Color code my Vi Editor

2010-07-21 Fir de Conversatie duffman
Hi,

I tried to look up information online on this but wasn't able to find
anything that worked.  I used Vi at my old job and loved the editing
features it provided.  I've moved to a new place now and I am the only
developer here.  I logged into a SunOS Unix box (bash shell) and
while things work my vi editor looks very bland (no colors schemes and
bw) which makes reading and writing code difficult.  When I looked up
info I found that I have to put the color coding information into
my .vimrc file in my home directory.  I am in a corporation and under
my home /home/myName I don't have a .vimrc file.  I found a sample one
online that I copied but it didn't have any effect on my vi editor.  I
also tried syntax on commands by vi said it wasn't recognized by vi.

Can anyone please help make my vi editor colorful?

Many thanks!

-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: Color code my Vi Editor

2010-07-21 Fir de Conversatie Milan Vancura
 Can anyone please help make my vi editor colorful?

Hi, it is a big difference between 'vi' and 'vim'. You work with plain 'vi' as
being on solaris, probably. So the right answer should be 'install vim'.
Try http://sunfreeware.com/

After vim installation, I recommend:

:help coloring

And if it did not help your problem, you may ask at v...@vim.org

Regards,

Milan Vancura

-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: Color code my Vi Editor

2010-07-21 Fir de Conversatie Matt Wozniski
On Wed, Jul 21, 2010 at 10:11 AM, duffman wrote:
 Hi,

 I tried to look up information online on this but wasn't able to find
 anything that worked.  I used Vi at my old job and loved the editing
 features it provided.  I've moved to a new place now and I am the only
 developer here.  I logged into a SunOS Unix box (bash shell) and
 while things work my vi editor looks very bland (no colors schemes and
 bw) which makes reading and writing code difficult.  When I looked up
 info I found that I have to put the color coding information into
 my .vimrc file in my home directory.  I am in a corporation and under
 my home /home/myName I don't have a .vimrc file.  I found a sample one
 online that I copied but it didn't have any effect on my vi editor.  I
 also tried syntax on commands by vi said it wasn't recognized by vi.

 Can anyone please help make my vi editor colorful?

 Many thanks!

On a Solaris box, it's relatively unlikely that `vi' runs vim.  You
can check by doing :version - that will either fail entirely (meaning
you're not running vim) or show a bunch of information including
-syntax (meaning you are using a vim binary, but that syntax
highlighting support wasn't compiled in).  Either way, the solution
will be to find a better package or compile vim from source.

~Matt

-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: Color code my Vi Editor

2010-07-21 Fir de Conversatie Gary Johnson
On 2010-07-21, duffman wrote:
 Hi,
 
 I tried to look up information online on this but wasn't able to find
 anything that worked.  I used Vi at my old job and loved the editing
 features it provided.  I've moved to a new place now and I am the only
 developer here.  I logged into a SunOS Unix box (bash shell) and
 while things work my vi editor looks very bland (no colors schemes and
 bw) which makes reading and writing code difficult.  When I looked up
 info I found that I have to put the color coding information into
 my .vimrc file in my home directory.  I am in a corporation and under
 my home /home/myName I don't have a .vimrc file.  I found a sample one
 online that I copied but it didn't have any effect on my vi editor.  I
 also tried syntax on commands by vi said it wasn't recognized by vi.
 
 Can anyone please help make my vi editor colorful?

The SunOS vi is not Vim, so it does not read ~/.vimrc.  Instead, it
looks for configuration information in ~/.exrc.

I don't think the SunOS vi supports color.  (I'll have access to a
SunOS machine later today but I don't at the moment.)  If you want a
colorful vi, you'll have to install some other vi, such as Vim.
You can either ask your system administrator to do this for you, or
you can build your own Vim, install it in ~/bin, and add ~/bin to
your PATH.

The best way to get the Vim source these days is to use Mercurial,
but you probably don't have Mercurial on that SunOS system, either,
so you would have to install that as well.

Installing programs such as Mercurial and Vim is not difficult.  Let
us know if it is feasible for you to do that and we can give you
whatever further instructions you might need.

Regards,
Gary

-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: Color code my Vi Editor

2010-07-21 Fir de Conversatie duffman
Many thanks for your replies! I am working at a big corporation and
the IT-powers that be have access to most root level modifications.  I
have read/write permissions on my home directory (/home/myName).
Could I install the vim editor under my directory? If so, any pointers
on what to do? Once downloaded is there a script I can run that'd
perform the installation?

Is this what I should download?
http://www.vim.org/download.php#unix

Thanks again for your help.


On Jul 21, 11:25 am, Gary Johnson garyj...@spocom.com wrote:
 On 2010-07-21, duffman wrote:
  Hi,

  I tried to look up information online on this but wasn't able to find
  anything that worked.  I used Vi at my old job and loved the editing
  features it provided.  I've moved to a new place now and I am the only
  developer here.  I logged into a SunOS Unix box (bash shell) and
  while things work my vi editor looks very bland (no colors schemes and
  bw) which makes reading and writing code difficult.  When I looked up
  info I found that I have to put the color coding information into
  my .vimrc file in my home directory.  I am in a corporation and under
  my home /home/myName I don't have a .vimrc file.  I found a sample one
  online that I copied but it didn't have any effect on my vi editor.  I
  also tried syntax on commands by vi said it wasn't recognized by vi.

  Can anyone please help make my vi editor colorful?

 The SunOS vi is not Vim, so it does not read ~/.vimrc.  Instead, it
 looks for configuration information in ~/.exrc.

 I don't think the SunOS vi supports color.  (I'll have access to a
 SunOS machine later today but I don't at the moment.)  If you want a
 colorful vi, you'll have to install some other vi, such as Vim.
 You can either ask your system administrator to do this for you, or
 you can build your own Vim, install it in ~/bin, and add ~/bin to
 your PATH.

 The best way to get the Vim source these days is to use Mercurial,
 but you probably don't have Mercurial on that SunOS system, either,
 so you would have to install that as well.

 Installing programs such as Mercurial and Vim is not difficult.  Let
 us know if it is feasible for you to do that and we can give you
 whatever further instructions you might need.

 Regards,
 Gary

-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: Color code my Vi Editor

2010-07-21 Fir de Conversatie Ben Fritz


On Jul 21, 1:17 pm, duffman samarthsangh...@gmail.com wrote:
 Many thanks for your replies! I am working at a big corporation and
 the IT-powers that be have access to most root level modifications.  I
 have read/write permissions on my home directory (/home/myName).
 Could I install the vim editor under my directory? If so, any pointers
 on what to do? Once downloaded is there a script I can run that'd
 perform the installation?

 Is this what I should download?http://www.vim.org/download.php#unix

 Thanks again for your help.


Please bottom-post to this list.

Yes, it is perfectly possible to compile and run Vim from your home
directory, if you have the space available for it (you probably do).

The link you give will work, but it can be easier to get a fully up-to-
date version, with all bugfixes, using the Mercurial repository. See
http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial

You will then need to compile the source code which you have
downloaded. See http://vim.wikia.com/wiki/Building_Vim

After compiling the source code, you should be able to just run Vim
from the location in which it resides. Setting up aliases will
probably be helpful for this.

Before trying any of this, it may behoove you to see if 'vim' is
already installed. Instead of 'vi file.blah' type 'vim file.blah' and
see if it works. Or just type 'which vim' to see if it finds anything.

Of course, another option is to as the IT-powers to upgrade your Vim
version.

Or, install Vim on your normal workstation...it runs great on most
operating systems out there. You can even get a GUI-enabled Vim (gvim)
that way. See http://vim.wikia.com/wiki/Download

You did not specify, did you log onto this SunOS station directly, or
via a remote terminal like PuTTY? There are some tricks you may need
to do to get color working properly in this situation, even after you
get a real Vim running.

-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: Color code my Vi Editor

2010-07-21 Fir de Conversatie Tony Mechelynck

On 21/07/10 20:35, Dominique Pellé wrote:

duffman wrote:


Many thanks for your replies! I am working at a big corporation and
the IT-powers that be have access to most root level modifications.  I
have read/write permissions on my home directory (/home/myName).
Could I install the vim editor under my directory? If so, any pointers
on what to do? Once downloaded is there a script I can run that'd
perform the installation?

Is this what I should download?
http://www.vim.org/download.php#unix

Thanks again for your help.


Hi

You can certainly install vim without root access.  I'm in the same
exact same situation at work. Here is how you can install Vim from
sources:

# Create a directory where to put your installed software
$ mkdir ~/opt

# Create a directory where to put source codes which you download
$ mkdir ~/sb
$ cd ~/sb

# Download sources. I recommend using Mercurial, which you may
# have to install if not available, again, no need to be root.
$ hg clone https://vim.googlecode.com/hg/ vim
$ cd vim

# Configure Vim.  You need to pass the --prefix option since
# you don't have root access (or else it would try to install Vim
# in /usr/local/... where you don't have permission)
$ ./configure --with-features=huge --prefix=$HOME/opt

# Compile Vim
$ make

# Install Vim (this will install Vim files into $HOME/opt/...)
$ make install

Then edit your ~/.bashrc (or ~/.cshrc, depending on your shell) to add
$HOME/opt/bin into your PATH.

That's it.  You may try ./configure --help to see what other
options are available when running the configure script.

The way to install Vim from sources is the same as for most
other softwares on Unix:

Another solution is to ask root to install Vim.  A good
Unix administrator should always install Vim :-)

PS1: please bottom post when posting to this mailing list
PS2: this question was more suitable for the vim_use mailing list
(vim_dev is for the development of Vim).

-- Dominique



See also:
http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

and in order to install Vim into subdirectories of $HOME/opt/ as above 
by using the method described in compunix.htm you'll need to include the 
following as part of the configuration-setting script to be sourced:


export CONF_ARGS=--prefix=$HOME/opt

and make sure (with this example) that $HOME/opt/bin exists and is in 
your $PATH.


If Dominique hadn't recommended something else, I might have just 
suggested --prefix=$HOME which would have put:


the Vim executable at $HOME/bin/vim
the runtime files at  $HOME/share/vim/vim72 (Vim 7.2)
   or at  $HOME/share/vim/vim73b (Vim 7.3b)
and searched user scripts under   $HOME/share/vim/vimfiles/
  and under   $HOME/.vim/

With $HOME/opt intead, $HOME/.vim stays there and all the rest move to 
$HOME/opt/bin/ and to subdirs of $HOME/opt/share/.


Note that you can only set one $CONF_ARGS variable of course; if you 
have several arguments to set by means of it, put them space-separated 
into a single value. (For some arguments, as shown in my conpunix.htm 
HowTo page, there are separate environment variables).



Best regards,
Tony.
--
When a Banker jumps out of a window, jump after him -- that's where the
money is.
-- Robespierre

--
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php