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 xampp on Any Linux distro?

how to install laravel on linux?

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...