Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove a line bashrc linux

Hi as the question says basically, im adding some alias's to my bashrc in linux and its keeps messing up and when i try and go up with the cursor its just types AAA BBBB etc i know 'o' adds a new line but what's remove a line?

like image 912
AngryDuck Avatar asked Sep 17 '26 09:09

AngryDuck


2 Answers

vi can be horrible the first times (like beer). But after some time it can be your friend (beer again).

Basic commands:

  • i start writing
  • Esc back to commands
  • dd delete a line
  • o start writing after current line
  • :wq from commands saves and quits from file
  • j/k move cursor down and up (respectively)
  • h/l move cursor left and right (respectively)

Here you have all the possible commands:

vi commands for each character

like image 108
fedorqui 'SO stop harming' Avatar answered Sep 19 '26 01:09

fedorqui 'SO stop harming'


It seems like you are using Vim if you say o adds a new line. First press the ESC key to switch to normal mode, then use dd to delete a line.

like image 40
Marcos Savoury Avatar answered Sep 19 '26 01:09

Marcos Savoury



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!