Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help4407


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting (CITS4407).
 
Options:
RSS cloud
Jump to:

iTerm2 - Auto Coloring

1 of 390 articles shown, currently no other people reading this forum.
photo
From: David T.  O.P.
Date: Sat 9th May, 2:24pm
Actions: 
        Login-to-reply

 

Thanks Chris. That works a treat!

Much appreciated,
David


"Christopher McDonald" <ch*i*.*c*o*a*[email protected]*a*e*u*a*> wrote:

> "David Tang" <22*7*2*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> 
> > Hi Chris,
> > In the 23/4/2020 lecture recording, I noticed that you were using iTerm2 on MacOSX and 
> > managed to get it to recognise and automatically colour variables, commands, strings etc 
> > for easy readability by either:
> > 1. adding this shebang to the header: #!/bin/bash. or
> > 2. adding the .sh extension to a shell file
> > 
> > I haven't managed to replicate this sucessfully.
> > Where am I going wrong? Can you please provide further instruction?
> 
> 
> Hello David,
> 
> What you're describing is not directly related to iTerm2 or macOS, but to configuring the
> vim editor to recognise and colour code from common programming languages
> (and works on Linux, too).
> 
> Firstly, see if you already have a .vimrc file :
> 
>   ls -l ~/.vimrc
> 
> If you don't we're going to create/give you one; if you do have one we need to append to it.
> Download the file:
> 
>   https://teaching.csse.uwa.edu.au/units/CITS4407/resources/vim-colours
> 
> (should be 2513 bytes long), and then execute:
> 
>   cat vim-colours >> ~/.vimrc
> 
> to create or append to the file.
> 
> The next time you run vi or vim, it should show coloured code.
> 
> ??

Related articles

iTerm2 - Auto Coloring (all 5) RSS
├─ original   Wed 6th May, 2:32pm, David T.
├─ reply 1   Wed 6th May, 4:59pm, Christopher M.
├─ THIS   Sat 9th May, 2:24pm, David T.  O.P.
├─ reply 3   Mon 11th May, 4:04pm, David T.  O.P.
└─ reply 4   Mon 11th May, 5:06pm, Christopher M.
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020