I'm using Linux mint and using the vi command vĩ đại create text files, now that I created a text tệp tin and saved it. How tự I get back into vĩ đại edit the text tệp tin again?

vi helloWorld.txt

asked Feb 29, năm nhâm thìn at 8:46

Try this command:

sudo gedit helloWorld.txt

it, will open up a text editor vĩ đại edit your tệp tin.

OR

sudo nano helloWorld.txt

Here, you can edit your tệp tin in the terminal window.

answered Feb 29, năm nhâm thìn at 9:04

4

Open the tệp tin again using vi. and then press " i " or press insert key ,

For save and quit

  Enter Esc    

and write the following command

  :wq

without save and quit

  :q!

Husam

8,5683 gold badges39 silver badges45 bronze badges

answered Apr 1, 2019 at 14:03

Open the tệp tin again using vi. and then press the insert button vĩ đại begin editing it.

answered Feb 29, năm nhâm thìn at 8:50

2

If you are still inside the vi editor, you might be in a different mode from the one you want. Hit ESC a couple of times (until it rings or flashes) and then "i" vĩ đại enter INSERT mode or "a" vĩ đại enter APPEND mode (they are the same, just start before or after current character).

If you are back at the command prompt, make sure you can locate the tệp tin, then navigate vĩ đại that directory and perform the mentioned "vi helloWorld.txt". Once you are in the editor, you'll need vĩ đại kiểm tra the vi reference vĩ đại know how vĩ đại perform the editions you want (you may want vĩ đại google "vi reference" or "vi cheat sheet").

Once the edition is done, hit ESC again, then type :wq vĩ đại save your work or :q! vĩ đại quit without saving.

For quick reference, here you have a text-based cheat sheet.

answered Feb 29, năm nhâm thìn at 8:58

Another way vĩ đại open a tệp tin is, by using vim

Step 1: lập cập command vim FILENAME

Step 2: Press i vĩ đại edit

Step 3: If you want vĩ đại save, press esc then enter :wq and hit enter

Step 4: If you don't want vĩ đại save, press esc then enter :q!

That's it.

You can open the tệp tin again using vi helloworld.txt and then use cat /path/your_file vĩ đại view it.

answered Oct 16, 2018 at 17:56

To re-edit a tệp tin in your terminal using the vi command, you can follow these steps:

  1. Open your terminal.
  2. Use the following command vĩ đại open the text tệp tin in vi: vi helloWorld.txt
  3. Once the tệp tin is open, you can make any changes vĩ đại the text.
  4. To start editing, press the i key vĩ đại enter insert mode. This allows you vĩ đại type and edit the text.
  5. After making your changes, press the Esc key vĩ đại exit insert mode.
  6. To save the changes and exit vi, type :wq (colon, w, q) and press Enter. This command saves the changes and quits vi.

Now, if you want vĩ đại get back into the text tệp tin vĩ đại edit it again, you can repeat the same command: vi helloWorld.txt. This will open the tệp tin in vi, and you can continue editing as before. you doesn't have root access type this

sudo su

If you want vĩ đại use nano editor vĩ đại create oe edit tệp tin in same directory where you headed

  1. nano filename.format

eg:- nano helloWorld.txt

  1. Ctrl+o

  2. Enter
    
  3. Ctrl+x
    

If you want vĩ đại use nano editor vĩ đại tệp tin in other directory where you headed

  1. nano location/filename.txt
    

eg1:- nano Downloads/helloWorld.txt

2