Friends, today i am going to tell you how you can edit your file through Vim in Linux, though there are many ways to add, but inside the elevator I am telling you through Vim because we can quickly edit the file, so I am telling you about Vim.
So I’m writing the command given below to see them carefully and type as I wrote.
first step :
- ( vim a.txt ) a.txt is the name of the file
- then press ( I ) with this you will come in insert mode.
- ( Esc ) have to press
- ( shift : )
- ( wq )
would mean saving the file and (q) would mean quit the file
In this way, we can edit the file through Vim . now also know how we copy and paste files through vim
- ( vim a.txt ) after going inside the file, we will put the contents inside the file there and if the content is of one line then one is pressing if two line the content then two is pressing.
- after that we will press (YY) to press twice.
- (shift 🙂
- if you have to make any changes inside a line and you do not know which line to change, then you can put (no) here.
Now let’s see how we provide security inside the file.
- ( vim -x a.txt ) here you have to name your file. ram is the name of the file here but you can keep your file name here.
- Enter password
- renter password
How to remove password
- ( vim a.txt )
- (Esc ) key press
- (type set key………. ) ok here you can enter any of your passwords.
Leave a comment