Chuyển đến nội dung chính

Bài đăng

Hiển thị các bài đăng có nhãn Linux Basic

Using Vim Editor

The Vim is a tool editor text. It is used as the most popular and powerful tool. In the context of Vim, it can operate in two modes: command mode and insert mode. The editor always starts in command mode. In the command mode, we can move through the text, search, replace, mark blocks and switch the editor to insert mode. The first, we will install Vim. On ubuntu sudo apt-get install vim On CentOS sudo yum install vim We use command vi file_name to open file in the Vim editor. We will start with some basic commands. Basic commands h to move the cursor to the left l to move it to the right k to move it to the up j to move it to the down G to move it to the begin of last line gg to move it to the begin of first line :n to move it to line n of the file Basic operations n dd will delete n lines starting from the current cursor position. u will undo. ctr + r will redo. n dw will delete n words starting from the current cursor position to right. n