Text deletion commands, find and replace In Linux In Hindi

Vi (Vim) text editor mein text deletion aur find/replace ke liye kuch commands aur shortcuts hote hain. Yahan kuch important text deletion aur find/replace commands hain:

Text deletion commands, find and replace In Linux In Hindi

Text Deletion Commands:

  1. x: x key se current cursor position par ka character delete hota hai.
  2. dw: dw command current cursor position se lekar word ke end tak ke characters ko delete karta hai.
  3. db: db command current cursor position se lekar word ke start tak ke characters ko delete karta hai.
  4. dd: dd command current line ko delete karta hai.
  5. D: D command current cursor position se lekar line ke end tak ke characters ko delete karta hai.
  6. d$: d$ command current cursor position se lekar line ke end tak ke characters ko delete karta hai.
  7. d0: d0 command current cursor position se lekar line ke shuruwat tak ke characters ko delete karta hai.
  8. :x,yd: Is command mein x se y line numbers specify karke un lines ko delete kiya ja sakta hai.
  9. :1,$d: Saari text ko delete karne ke liye :1,$d command ka istemal kiya ja sakta hai.

Find and Replace Commands:

  1. :/pattern: :/pattern command ka istemal kisi pattern ko search karne ke liye hota hai. Jahan pattern aapke search query ka hissa hai.

  2. n: n key se next occurrence of pattern ko dhunda ja sakta hai.

  3. N: N key se previous occurrence of pattern ko dhunda ja sakta hai.

  4. :s/pattern/replace: :s/pattern/replace command ka istemal pattern ko replace karne ke liye hota hai. Jahan pattern aapke search query ka hissa hai aur replace usse replace karne ke liye istemal hota hai.

  5. :s/pattern/replace/g: Is command mein g flag ka istemal kiya ja sakta hai taki saari occurrences ko replace kiya ja sake.

  6. :1,$s/pattern/replace/g: Saari text mein pattern ko replace karne ke liye :1,$s/pattern/replace/g command ka istemal kiya ja sakta hai.

Yeh commands Vim mein text deletion aur find/replace ko control karne mein madadgar hote hain. Aap in commands ka istemal text editing aur manipulation ke liye kar sakte hain.

Leave a Comment