Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

vim :qa!

"type :quit<Enter> to quit VIi: go to INSERT in the place of the cursor
I: go to INSERT mode at the beginning of the line
a: append after the cursor
A: append at the end of line
o: open a new line below the current line
O: open a new line in the place of the current line
Now, answering the question: exiting.

You can exit vi from EX mode:

q: if you haven't made any modifications, or saved them beforehand
q!: ignores any modifications and quit
wq: save and quit
x: this is equal to wq
w and x accept a file name parameter. If you started vi with a filename, you need not give it here again.

At last, the most important: how can you reach EX mode?

EX mode is for long commands that you can see typing at the bottom line of the screen. From COMMAND mode, you push colon, :, and a colon will appear at the bottom line, where you can type the above commands.

From INSERT mode, you need to push ESC, i.e. the Escape button, going to COMMAND mode, and then: to go to EX mode.

If you are unsure, push ESC and that will bring you to command mode.

The robust method is ESC-:-x-Enter which saves your file and quits.M"
Comment

PREVIOUS NEXT
Code Example
Shell :: git change repo 
Shell :: git push branch to remote 
Shell :: git cherry pick commit 
Shell :: ubuntu 18 does not connect to bluetooth earphones 
Shell :: git ignore added folder 
Shell :: create file in linux 
Shell :: ls permission 
Shell :: bash sum numbers 
Shell :: concatenate in bash the output of two commands 
Shell :: bash replace substring in string 
Shell :: open folder from terminal 
Shell :: exit vim without saving 
Shell :: bash variable execute 
Shell :: update ruby version ubuntu 
Shell :: find number of files in a directory linux 
Shell :: install composer phar 
Shell :: where is ubuntu installed in windows 10 
Shell :: removing duplicate input from a file in the command line 
Shell :: cron job 
Shell :: open video linux terminal 
Shell :: git stash stack overflow 
Shell :: letencrpt 
Shell :: how to fork from github to bitbucket 
Shell :: copy everything vim 
Shell :: download chromium-browser/libffmpeg.so 
Shell :: redis-server specify port 
Shell :: How to change boot order on fedora 
Shell :: uninstall yarn 
Shell :: copy first n files linux 
Shell :: git command 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =