Skip to main content

cut, yank and paste in VIM

vimKey Copy(yank) in vim
yiw - yank the current word
yw - yank from the current cursor location to start of next word
yb - yank from current cursor location to the end of the previous word
yy - yank the whole line (along with the newline character)
4yy - yank 4 lines (along with the newline character)
y$ - yank from the current cursor location to the end of the line.

Cut in Vim
diw - delete (cut) current word
dw - delete (cut) from the current cursor location to the start of the next word
db - delete (cut) from the current cursor location to the end of the previous word
dd - delete (cut) the whole line (along with the newline character)
4dd - delete (cut) 4 lines (along with the newline character)
d$ - delete (cut) from current cursor location to the end of the line
d^ - delete (cut) from the current cursor location to the start of the line
di" - delete inside double quotation place your cursor inside "  "

Paste in Vim
p text after cursor P text before cursor

Comments

Popular posts from this blog

Best md file reader and writer with open source

Obsidian Obsidian is a personal knowledge base and note-taking software application that operates on Markdown files. It allows users to make internal links for notes and then to visualize the connections as a graph. It is designed to help users organize and structure their thoughts and knowledge in a flexible, non-linear way. Official link Marktext A simple and elegant open-source markdown editor that focused on speed and usability Official link Joplin Joplin is a free and open-source desktop and mobile note-taking application written for Unix-like and Microsoft Windows operating systems, as well as iOS, Android, and Linux/Windows terminals, written in JavaScript. The desktop app is made using Electron, while the mobile app uses React Native. Official link

update kali linux grub via live linux i.e linux mint

chatgpt say and it works. Identify Kali Linux Partition: Use the following command to identify the partition where Kali Linux is installed. This will help you determine the correct partition number (e.g., /dev/nvme0n1p2, /dev/sdb2, etc.) for later steps. sudo fdisk -l Mount Kali Linux Partition: Create a mount point (a directory where you will access Kali Linux's root file system) and mount the Kali Linux partition. Replace /dev/sdXY with the appropriate partition identifier you found in the previous step (e.g., /dev/sda1, /dev/sdb2, etc.). sudo mkdir /mnt/kali sudo mount /dev/sdXY /mnt/kali Bind Mount the Required Directories: Bind mount the /dev, /sys, and /proc directories from the Linux Mint system into the Kali Linux mount. This step is necessary to ensure that GRUB can detect hardware and system information correctly. sudo mount --bind /dev /mnt/kali/dev sudo mount --bind /sys /mnt/kali/sys sudo mount --bind /proc /mnt/kali/proc Chroot into Kali Linux: Change the roo...