Vim: Substition
First of all you can find information for this while inside Vim using: :help :substitute Replace Names Quickly Say that you have a Deployment yaml example: apiVersion: apps/v1 kind: Deployment metadata: name: nginx-app labels: app: nginx-app spec: replicas: 3 selector: matchLabels: app: nginx-app template: metadata: labels: app: nginx-app spec: containers: - name: nginx-app image: nginx:1.20 ports: - containerPort: 80 And you want to rename it to web-server, instead of going line by line use: :%s/nginx-app/web-server/ ...