l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
August 5: Social gathering
Next Installfest:
Latest News:
Jul. 4: July, August and September: Security, Photography and Programming for Kids
Page last updated:
2001 Dec 30 17:09

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] VIM
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] VIM

I did :mkvimrc and have editted it.  I can use gvim and it does syntax color
coding, though I sure don't like the colors for perl, are there
different/better/more standard syntax def files for perl?  It does recognize
screen changes in gvim automatically (that's a good thing).

I'd perfer not to use it from the command line as opposed to gvim.  How
would I go about trying to get a color xterm going?

Here are the contents of my .vimrc (duplicate entries exist but I don't know
if there is some special sequence I have to put these in)

version 5.0
let cpo_save=&cpo
set cpo=B
map! <xHome> <Home>
map! <xEnd> <End>
map! <S-xF4> <S-F4>
map! <S-xF3> <S-F3>
map! <S-xF2> <S-F2>
map! <S-xF1> <S-F1>
map! <xF4> <F4>
map! <xF3> <F3>
map! <xF2> <F2>
map! <xF1> <F1>
map <xHome> <Home>
map <xEnd> <End>
map <S-xF4> <S-F4>
map <S-xF3> <S-F3>
map <S-xF2> <S-F2>
map <S-xF1> <S-F1>
map <xF4> <F4>
map <xF3> <F3>
map <xF2> <F2>
map <xF1> <F1>
let &cpo=cpo_save
unlet cpo_save
set background=dark

syntax on
set nocompatible
set tabstop=3
set noexpandtab
set ignorecase
set nowrap
set nobackup
set ruler
set incsearch
highlight normal guifg=white guibg=black
set background=dark
set visualbell
set t_vb=

----- Original Message -----
From: "Mark K. Kim" <markslist@cbreak.org>
To: <vox-tech@franz.mother.com>
Sent: Wednesday, September 26, 2001 3:29 AM
Subject: Re: [vox-tech] VIM

> On Tue, 25 Sep 2001, Jay Strauss wrote:
> > then it takes 3-4 seconds to start.  I don't think this is normal, but
> > well (if someone has an idea why it's taking a long time, please
> I ran VIM under HP/UX back when I was still at UC Davis.  It took 3-4
> seconds to start, too.  I figured it's because the systems are too slow.
> > My question is, you guys say great stuff about using vim to edit perl,
> > xml...but I don't know where to start.
> I find the following very useful:
>    1. Go to your home directory by typing "cd"
>    2. Run VIM and type:
>          :mkvimrc
>       which creates a file called ".vimrc" in your home directory.  This
>       is the file you can edit to set up your Vim defaults.
>    3. Edit ".vimrc" by exitting Vim and typing "vim .vimrc".
>    4. Add the following lines at the bottom:
>          syntax on
>          set nocompatible
>             (This enables advanced features)
>          set tabstop=3
>             (I like tabstops to be 3)
>          set noexpandtab
>             (or "set expandtab", if you want tabs to expand to spaces)
>          set ignorecase
>             (or "set noignorecase", if you want searches to be
>          set nowrap
>             (or "set wrap", if you like lines to wrap)
>          set nobackup
>             (or "set backup", if you like automatically created backup
>          set ruler
>             (Shows row & column all the time)
>          set incsearch
>             (Incremental search as you type what you're searching for)
>          highlight normal guifg=white guibg=black
>             (sets gvim to have white-text-on-black-background)
>          set background=dark
>             (helps syntax highlighting in choosing nice-contrast colors
>             since I use dark backgrounds.)
>          syntax on
>             (Turns on syntax highlighting using the above as a reference
>             contrast)
>          set visualbell
>             (Turns off the annoying noise and turns on flashing screen on
>             instead)
>          set t_vb=
>             (Makes the flashing screen to not do anything.  With the "set
>             visualbell" option, this effectively gets rid of any noises
>             or flashes when you do something bad)
> That's what I like to do... I think I'm missing a few things but you get
> the idea.
> > I need to get some sort of syntax file(s) (I think) that defines the
> > checking, where do I get it, how do I use it?
> It should be already installed with the standard runtime files.  If not,
> HP/UX probably gutted them out.  You can get the original runtime files
> from ftp://ftp.vim.org/.  A close mirror is right there in UCD at
> ftp://nuxi.ucdavis.edu/.  The files that ends in "rt" (ie -
> "vim57rt.tar.gz", where 57 means version 5.7) are the runtime files.
> > Can I display colors if I doing vim from the command line (from an
> Under color xterm, you can, though you don't get as many colors as you do
> under gvim (graphical version of vim that runs under X Window).  However,
> HP/UX has a very peculiar way of handling colors so I've never had very
> good luck with it.  I did have a color xterm at one point but the resizing
> didn't work well and you had to signal xterm that the resizing occurred.
> It's a very painful process.  I'll help you complain to HP, if you'd
> like :)
> > Lastly when I start vim, I type <esc>:h and get the help screen.  It
> > the screen, but what key sequence(s) do I use to control the split
> > (i.e. close one, open one, dictate where to split, move the split...)?
> > trying to read the help but I only get a couple of lines at a time.
> When you type ":h", the first thing the help tells you is how to navigate:
>    h, j, k, l or the arrow keys to move around
>    Ctrl-] to go to a topic
>    Ctrl-t to to back
> If you have questions about syntax highlighting, type:
>    :help syntax
> If you have questions about split screens, type:
>    :help split
> Etc.
> BTW, to control split screens:
>    Ctrl-w, j  -  Move one window down
>    Ctrl-w, k  -  Move one window up
>    Ctrl-w, +  -  Make the window bigger by one line.  Precede by a number
>                  to make it bigger by several lines.
>    Ctrl-w, -  -  Make the window smaller by one line.  Precede by a number
>                  to make it smaller by several lines.
>    :split     -  Spawn a new split window.
>    :e <filename> - Open <filename> in the current window.
> -Mark
> PS: "gvim" has menus with shortcut keys next to the menu item.
> --
> Mark K. Kim
> http://www.cbreak.org/mark/
> PGP key available upon request.

Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.