John H. Robinson, IV said:
> James Keeline wrote:
>> The subject pretty much says it all.  Sometimes I'd like to view a file (not
>> edit it) and less is a good tool.  However, as near as I can tell, it does 
>> not
>> offer the color syntax highlighting as seen in vim.
>
> I don't think so. But vim does. And vim can be configured to be used
> like a pager. See the instructions here:
>
> http://vim.sourceforge.net/tips/tip.php?tip_id=121
>

I was pretty sure that vim needed no real configuration to do this.  I did a 
google
search and found a vim man page that says this:

       Vim behaves differently, depending on the name of the command (the exe-
       cutable may still be the same file).

       vim       The "normal" way, everything is default.

       ex        Start in Ex mode.  Go to Normal mode with the ":vi"  command.
                 Can also be done with the "-e" argument.

       view      Start  in read-only mode.  You will be protected from writing
                 the files.  Can also be done with the "-R" argument.

       gvim gview
                 The GUI version.  Starts a new window.  Can also be done with
                 the "-g" argument.

       rvim rview rgvim rgview
                 Like the above, but with restrictions.  It will not be possi-
                 ble to start shell commands, or suspend  Vim.   Can  also  be
                 done with the "-Z" argument.


Of course key-mappings and syntax highlighting would need configuration still.  
But,
if vim is already doing this, then there shouldn't be much left other than minor
customizations, I would think.


Wade Curry
syntaxman    o       _      _          _
    _o      /\_    _ \\o   (_)\__/o   (_)
  _< \_    _>(_)  (_)/<_     \_| \    _|/'\/
 (_)>(_)  (_)         (_)    (_)     (_)' _\o_




-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to