Deleting a character in a text file

  • Thread starter K Srinivas Pavan Kumar
  • Start date
K

K Srinivas Pavan Kumar

Guest
What is the command used for deleting a single character in a text file with the help of Vi editor ?
 


To the right of the cursor? Or to the left of the cursor?
 
I have a cheatsheet, attaching it in hope it will be useful. It's for ViM and not for Vi though.
YLInLlY.png
 
With all those cheat codes, it's no wonder the OP was confused! :confused::eek::D
 
With the cursor where you want it, be sure to be in Command mode (hit ESC), then typing the letter "X" (uppercase without quotes) will delete the character to the left of the cursor. :D
 
With the cursor where you want it, be sure to be in Command mode (hit ESC), then typing the letter "X" (uppercase without quotes) will delete the character to the left of the cursor. :D


That's a lotta ^&*( to go thru ! Happy to say no to vi :)
 
I felt the need to include this. :p oh and try searching for "vi cheat sheet" on duck duck go, its one of the predefined 'answers'.
emacs.jpg
 

Staff online


Top