mirror of
https://github.com/iggredible/Learn-Vim
synced 2024-11-23 19:13:03 +00:00
Merge pull request #7 from djavrell/master
Ch2 - Add some precision about buffer
This commit is contained in:
commit
d0364f31e7
1 changed files with 9 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue