Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

vim delete line

# Basic syntax:
dd

# Note, add a number in from of dd to delete that many lines, e.g.:
5dd # Delete the next 5 lines
Comment

vim delete all lines

:1,$d
Comment

vim delete every other line

:1d|g/^/+d  # Every other odd line
Comment

vim delete from delimeter to end of line for all lines

# Basic syntax:
:%norm $T<delimiter>D
# Where:
#	- % indicates that the command should be applied on all lines
#	- norm indicates that the command is to be run in normal mode
#	- $T - not sure - probably something like "to end of line"
#	- D indicates delete
Comment

vim delete every other line

:g/^/+d  # Every other even line
Comment

Vim deleting all lines containing pattern

//Delete all lines containing profile
:g/profile/d
Comment

vim select lines and delete

# Press v and you are in visual mode
# Select the lines
# Press x
Comment

PREVIOUS NEXT
Code Example
Shell :: git asking for passphrase after restart 
Shell :: learn typeorm 
Shell :: command to uninstall windows store 
Shell :: remove a file in ubuntu 
Shell :: Command to create a new Vue app 
Shell :: Files by size 
Shell :: check if cuda installed 
Shell :: git a clean history 
Shell :: find exclude directories 
Shell :: how to install vim on macos 
Shell :: install spotify on ubuntu 
Shell :: yarn install production only 
Shell :: terminal public ip 
Shell :: what is my ip address ? 
Shell :: ispconfig ubuntu 18.04 
Shell :: merge master into local branch 
Shell :: bash exit code 
Shell :: installing sonarqube on ubuntu 
Shell :: install cute fish on ubuntu 
Shell :: terraform plugin for vim 
Shell :: install node on fish-shell 
Shell :: folium 
Shell :: get previous git stash 
Shell :: how to install and connect to ftp on ubuntu 18 
Shell :: git pull new branch from remote 
Shell :: ansible Permission denied (publickey,password). 
Shell :: allow a port in centos 8 stackoverflow 
Shell :: This script makes a backup of my home directory. 
Shell :: installing ruby on rails ubuntu 20.04 
Shell :: bash echo a checkMark based on condition 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =