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

How to install wordpress on xampp (LINUX)?

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

how to install spotify adblocker in linux?

spotify-adblock-install Before installation of package, INSTALL BUILDING PACKAGES sudo apt-get install build-essential fakeroot devscripts INSTALL RUST WITH THIS COMMANDS curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh OR GO-TO Download RUST IF YOU DON'T HAVE || INSTALL SPOTIFY CLIENT WITH THIS COMMANDS You will first need to configure our debian repository: curl -sS https://download.spotify.com/debian/pubkey_7A3A762FAFD4A51F.gpg | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list Then you can install the Spotify client: sudo apt-get update && sudo apt-get install spotify-client OR GO-TO Download Spotify spotify-adblock More details on this repo spotify-adblock git clone https://github.com/abba23/spotify-adblock.git cd spotify-adblock make INSTALL sudo make install LOOKS LIKE You can integrate it wit...