Merge pull request #7 from djavrell/master

Ch2 - Add some precision about buffer
This commit is contained in:
Igor Irianto 2020-07-23 11:39:57 -05:00 committed by GitHub
commit d0364f31e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,11 @@ Before you start, make sure you have `set hidden` option in your `vimrc`. Withou
# Buffers
A buffer is the in-memory text of a file. When you open a file in Vim, it creates a new buffer. From your terminal, open a new file `file1.js`:
A buffer is a in-memory space where you can write and edit some text. When you are opening a new file in vim its content will be bound to a new buffer:
1. From within vim, open a new buffer `:new` (create a new empty buffer)
2. From your terminal, open a new file `file1.js` (create a new buffer with `file1.js` bind to it)
If your buffer isn't bound to a file yet but you want to save its content, you can save it with `:w </path/to/file>`.
```
vim file1.js