It's UWAweek 48

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Displaying the 8 articles in this topic
Showing 8 of 919 articles.
Currently 15 other people reading this forum.


 UWA week 32 (2nd semester, week 3) ↓
SVG not supported

Login to reply

👍?
helpful
9:25am Fri 12th Aug, Christofle S.

Since the forums are free I'll put this here for those who are too shy or quiet (Like me) to ask

How to replicate: open vim and paste square.c from labsheet 2 by copy then left clicking on vim

Effect: Anything below a double slash extends the double slash, Every line with an indentation in the original code adds more indentation, everything until the first i in the code is missing.



This article has 1 attachment:

 

SVG not supported

Login to reply

👍?
helpful
9:27am Fri 12th Aug, Christofle S.

A better screenshot



This article has 1 attachment:

 

SVG not supported

Login to reply

👍?
helpful
9:29am Fri 12th Aug, Christofle S.

Wrong screen shot



This article has 1 attachment:

 

SVG not supported

Login to reply

👍?
helpful
9:45am Sat 13th Aug, Christopher M.

"Christofle Sangkanpara" <23*9*7*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> How to replicate: > open vim and paste square.c from labsheet 2 by copy then left clicking on vim > > Effect: > Anything below a double slash extends the double slash, > Every line with an indentation in the original code adds more indentation, > everything until the first i in the code is missing.
Hi Christofle, That's weird - I can't replicate the problem on either my macOS (Monterey 12.5) or Linux (Ubuntu 20.04) machines at home (12MB video attached). I suspect something very odd with your machine's (or personal) vi configuration files. Have you 'done anything' other than work with a standard download/installation?



This article has 1 attachment:

 cut-paste-vi.mov

 UWA week 33 (2nd semester, week 4) ↓
SVG not supported

Login to reply

👍?
helpful
9:14am Mon 15th Aug, Christofle S.

"Christopher McDonald" <ch*i*.*c*o*a*[email protected]*a*e*u*a*> wrote:
> > Hi Christofle, > > That's weird - I can't replicate the problem on either my macOS (Monterey 12.5) or Linux > (Ubuntu 20.04) machines at home (12MB video attached). > > I suspect something very odd with your machine's (or personal) vi configuration files. > Have you 'done anything' other than work with a standard download/installation?
Other than changing Vim's Colourscheme. None. That said I did tap random buttons to see what they did in Vim. I notice that Vim has automated indentation but every other coding program has that and it doesn't add extra indentations.


SVG not supported

Login to reply

👍?
helpful
11:01am Mon 15th Aug, Christopher M.

"Christofle Sangkanpara" <23*9*7*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> Other than changing Vim's Colourscheme. None. That said I did tap random buttons to see what they did in Vim. >
(still weird) but random buttons???
> I notice that Vim has automated indentation but every other coding program has that and it doesn't add extra indentations.
It does, but not usually enabled or set by default: https://linuxhint.com/use-auto-indent-in-vim/


SVG not supported

Login to reply

👍?
helpful
10:17am Tue 16th Aug, Christofle S.

"Christopher McDonald" <ch*i*.*c*o*a*[email protected]*a*e*u*a*> wrote:
> "Christofle Sangkanpara" <23*9*7*[email protected]*u*e*t*u*a*e*u*a*> wrote: > > > Other than changing Vim's Colourscheme. None. That said I did tap random buttons to see what they did in Vim. > > > > (still weird) but random buttons???
You know. q,w,e,r,t,y,u,o(found out how to start editing in vim),p,[,],\. The usual stuff.
> > I notice that Vim has automated indentation but every other coding program has that and it doesn't add extra indentations. > > It does, but not usually enabled or set by default: > > https://linuxhint.com/use-auto-indent-in-vim/
Disabling auto indent fixed the indentation issue. It was enabled by default.


SVG not supported

Login to reply

👍?
helpful
4:19pm Wed 17th Aug, James A.

I think some installations come with things like autoindent and syntax highlighting turned on by default. It certainly seems that way on my home PC (running Linux Mint 20). Given this is a common problem, there's actually a specific mode that (temporarily) cancels auto-formatting designed specifically for copy-pasting into the terminal, `:set paste`. You can then undo it with `:set nopaste` once you're done. There's a bit more on it here: [stackoverflow]

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy