carpentries-incubator / carpentries-incubator/collaborative-git-and-github-lesson

Consider adding short instructions if using VIM

Open
#45 0 comments 1 reaction 0 assignees View on GitHub
enhancement idea
Dominant language
R
Stars
0
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Vim is actually not much worse than Nano if explained in advance. E.g. this?

__Basic Tutorial: How to Create, Edit, Save, and Exit a File Using Vim__

__Step 1__: Open or Create a File with Vim
Open your terminal.To create or open a file, type:
```vim filename.txt```
__Step 2__: Enter Insert Mode to Edit the File
When you open Vim, you start in Normal Mode (used for navigation and commands).
To start editing, press `i` to enter Insert Mode. You'll see `-- INSERT -- ` at the bottom of the screen. Now you can type and edit the file as needed.

__Step 3__: Save Your Changes
To save your changes, first exit Insert Mode by pressing `Esc`. This returns you to Normal Mode.
Type `:w` and press `Enter`. This writes (saves) the file to disk. You'll see a message like `"filename.txt" [New] 1L, 10C ` written at the bottom.

__Step 4__: Exit Vim
After saving, you can exit Vim by typing `:q` and pressing `Enter`.
If you haven't saved your changes and try to quit, Vim will warn you. To force quit without saving, type `:q!`.

__Step 5__: Save and Exit in One Command
If you want to save and exit in one step:
Press `Esc` to ensure you're in Normal Mode.
Type `:wq` and press `Enter`. This saves the file and quits Vim.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.