Merge pull request #6436 from geekpi/master

translated
This commit is contained in:
geekpi 2017-12-04 10:32:04 +08:00 committed by GitHub
commit 161ca94b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,22 +1,20 @@
translating---geekpi vim 的酷功能:会话!
Cool vim feature: sessions!
============================================================• ============================================================•
Yesterday I learned about an awesome vim feature while working on my [vimrc][5]! (to add fzf & ripgrep search plugins mainly). Its a builtin feature, no fancy plugins needed. 昨天我在编写我的[vimrc][5]的时候了解到一个很酷的 vim 功能!(主要为了添加 fzf 和 ripgrep 插件)。这是一个内置功能,不需要特别的插件。
So I drew a comic about it. 所以我画了一个漫画。
Basically you can save all your open files and current state with 基本上你可以用下面的命令保存所有你打开的文件和当前的状态
``` ```
:mksession ~/.vim/sessions/foo.vim :mksession ~/.vim/sessions/foo.vim
``` ```
and then later restore it with either `:source ~/.vim/sessions/foo.vim` or `vim -S ~/.vim/sessions/foo.vim`. Super cool! 接着用 `:source ~/.vim/sessions/foo.vim` 或者  `vim -S ~/.vim/sessions/foo.vim` 还原会话。非常酷!
Some vim plugins that add extra features to vim sessions: 一些 vim 插件给 vim 会话添加了额外的功能:
* [https://github.com/tpope/vim-obsession][1] * [https://github.com/tpope/vim-obsession][1]
@ -24,7 +22,7 @@ Some vim plugins that add extra features to vim sessions:
* [https://github.com/xolox/vim-session][3] * [https://github.com/xolox/vim-session][3]
Heres the comic: 这是漫画:
![](https://jvns.ca/images/vimsessions.png) ![](https://jvns.ca/images/vimsessions.png)
@ -33,7 +31,7 @@ Heres the comic:
via: https://jvns.ca/blog/2017/09/10/vim-sessions/ via: https://jvns.ca/blog/2017/09/10/vim-sessions/
作者:[Julia Evans ][a] 作者:[Julia Evans ][a]
译者:[译者ID](https://github.com/译者ID) 译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出