Re: to enable C or C++ syntax highlighting in Vi Editor



SaranJothy wrote:

> i have logged in as root and hence root directory is my
> homedir.
> But .vimrc is not there. .
>
> i have tried ls -a command in that directory.
>

The .vimrc file is a configuration file for Vi editor. If it does not
exist, you have to create it. This will enable the syntax everytime you
open VI.

Otherwise, you can do the following after you have opened the VI
editor:

1. press <Esc> enter into command mode.
2. type the following:
:set syntax=on
Exactly as i have. This will enable syntax for this session of VI.

--
Madhav.

.



Relevant Pages

  • Re: VIM : used for Fortran files .f or .f90
    ... So I put the command in my .vimrc file: ... it is still recognised as a fixed source form file!! ... " Switch syntax highlighting on, ...
    (comp.editors)
  • Re: VIM : used for Fortran files .f or .f90
    ... So I put the command in my .vimrc file: ... If I put in my existing fortran source file: ... " Switch syntax highlighting on, ...
    (comp.editors)
  • Re: vim: switch-like mapping
    ... > and I get back to ASCII quotation mark with command ... > do this switching between the two modes? ... If you can get the value into your .vimrc file, ...
    (comp.editors)