x VIM Command

How to use x Command in Linux VIM editor?

Explanation


x stands for Cut
This command is used to cut a particular character from the file. The character is saved in the clipboard. The text in the clipboard can be pasted at required position.

Usage:

x

Example:


Steps to cut text from the file using the vim editor.
  • Open the file test.txt using the command
    $ vim test.txt
  • We can notice the text in the file. Let us consider how to cut the letter 't' in the word 'Tutorial'.
    Cut (x) Vim Command
  • To remove the letter 't', move the cursor to desired position and then
    Press x
  • The text after the cut operation will be as follows
    Cut Particular Character from File Vim

Ask Questions

Ask Question