www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Linux tech tip

reply Georg Wrede <georg.wrede nospam.org> writes:
Ever wanted `lessī to show syntax highliting?

I'm running Fedora Core, but I expect this tip to work on most other 
newish installatios, too.

Add the following line in your .bashrc file:

alias less='/usr/share/vim/vim63/macros/less.sh'

Then you can see shell scripts, perl, config files, C source code, 
makefiles, and almost anything in color.

And whaddayaknow, even D sources!

Those not used to vi or vim need not worry, this hack keeps the normal 
`lessī keystrokes.
Mar 03 2005
parent John Reimer <brk_6502 yahoo.com> writes:
Georg Wrede wrote:
 Ever wanted `lessī to show syntax highliting?
 
 I'm running Fedora Core, but I expect this tip to work on most other 
 newish installatios, too.
 
 Add the following line in your .bashrc file:
 
 alias less='/usr/share/vim/vim63/macros/less.sh'
 
 Then you can see shell scripts, perl, config files, C source code, 
 makefiles, and almost anything in color.
 
 And whaddayaknow, even D sources!
 
 Those not used to vi or vim need not worry, this hack keeps the normal 
 `lessī keystrokes.
Nifty trick! I'll give it a try. Thanks! - JJR
Mar 03 2005