Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving and exiting files #18

Open
ntk148v opened this issue May 13, 2022 · 0 comments
Open

Saving and exiting files #18

ntk148v opened this issue May 13, 2022 · 0 comments
Labels

Comments

@ntk148v
Copy link
Owner

ntk148v commented May 13, 2022


title: Saving and exiting files
path: vim/saving-and-exiting-files.md

Source: https://docstore.mik.ua/orelly/unix3/vi/ch05_03.htm

  • :w Writes (saves) the buffer to the file but does not exit. You can (and should) use :w throughout your editing session to protect your edits against system failure or a major editing error.

  • :q Quits the editor (and returns to the UNIX prompt).

  • :wq Both writes the file and quits the editor. The write happens unconditionally, even if the file was not changed.

  • :x Both writes the file and quits (exits) the editor. The file is written only if it has been modified.

  • What's the difference between :wq and :x? Modification time. If you :x a buffer that hasn’t changed, the modification time will be untouched because the file isn’t re-saved. The :wq command will alter the modification time no matter what.

@ntk148v ntk148v added the vim label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant