Copying and yanking text in Linux In Hindi

Vi (Vim) text editor mein text copying, yanking, cutting, aur pasting ke liye commands aur shortcuts hote hain, jinse aap text manipulation kar sakte hain. Iske alawa, aap set commands, abbreviations, aur map commands ka bhi istemal karke Vim ko customize kar sakte hain.

Copying and Yanking Text:

  1. Y: Y key se current line ko yank (copy) kiya jata hai. Yanked text Vim ke clipboard (register) mein save ho jata hai.
  2. yy: yy command current line ko yank (copy) karta hai.
  3. Yw: Yw command current cursor position se lekar word ke end tak ke text ko yank karta hai.
  4. Y$: Y$ command current cursor position se lekar line ke end tak ke text ko yank karta hai.

Cutting and Pasting Text:

  1. x: x key se current cursor position par ka character cut (delete) hota hai.
  2. dd: dd command current line ko cut (delete) karta hai.
  3. D: D command current cursor position se lekar line ke end tak ke text ko cut (delete) karta hai.
  4. :x,yd: Is command mein x se y line numbers specify karke un lines ko cut (delete) kiya ja sakta hai.
  5. p: p key se yanked (copied) text ko current cursor position ke baad paste kiya ja sakta hai.
  6. P: P key se yanked (copied) text ko current cursor position ke pehle paste kiya ja sakta hai.

Set Commands:

  • :set option_name: Vim ke various options ko set karne ke liye :set command ka istemal hota hai. Jaise ki :set number line numbers ko display karne ke liye.

Abbreviations:

  • Abbreviations ka istemal frequently used text snippets ko type karne ke liye kiya jata hai. :ab command ka istemal abbreviations ko define karne ke liye hota hai.

Example:

:ab omw On my way!

Ab, jab aap “omw” type karenge, to Vim usko “On my way!” mein automatically replace karega.

Map Commands:

  • Map commands ka istemal keyboard shortcuts ko custom define karne ke liye hota hai. :map command ka istemal key mappings ko define karne ke liye hota hai.

Example:

:map <F2> :w<CR>

Is example mein, <F2> key press karne par :w<CR> (save command) execute hoga.

Yeh commands Vim ko customize karne aur text manipulation ko aur bhi efficient banane mein madadgar hote hain. Vim ka documentation aur online resources se aur adhik commands aur customizations ke bare mein janakari prapt ki ja sakti hai.

Leave a Comment