From c3a2917ebb2e84e06f1c307c4b543ef67b59932e Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 4 Dec 2017 10:30:26 +0800 Subject: [PATCH 1/2] translated --- .../20170910 Cool vim feature sessions.md | 93 ++++++++++--------- 1 file changed, 47 insertions(+), 46 deletions(-) rename {sources => translated}/tech/20170910 Cool vim feature sessions.md (60%) diff --git a/sources/tech/20170910 Cool vim feature sessions.md b/translated/tech/20170910 Cool vim feature sessions.md similarity index 60% rename from sources/tech/20170910 Cool vim feature sessions.md rename to translated/tech/20170910 Cool vim feature sessions.md index ed101c429c..462d6362b2 100644 --- a/sources/tech/20170910 Cool vim feature sessions.md +++ b/translated/tech/20170910 Cool vim feature sessions.md @@ -1,46 +1,47 @@ -translating---geekpi - -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). It’s a builtin feature, no fancy plugins needed. - -So I drew a comic about it. - -Basically you can save all your open files and current state with - -``` -: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! - -Some vim plugins that add extra features to vim sessions: - -* [https://github.com/tpope/vim-obsession][1] - -* [https://github.com/mhinz/vim-startify][2] - -* [https://github.com/xolox/vim-session][3] - -Here’s the comic: - -![](https://jvns.ca/images/vimsessions.png) - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2017/09/10/vim-sessions/ - -作者:[Julia Evans ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://jvns.ca/about -[1]:https://github.com/tpope/vim-obsession -[2]:https://github.com/mhinz/vim-startify -[3]:https://github.com/xolox/vim-session -[4]:https://jvns.ca/categories/vim -[5]:https://github.com/jvns/vimconfig/blob/master/vimrc +translating---geekpi + +Cool vim feature: sessions! +vim 的酷功能:会话! +============================================================• + +昨天我在编写我的[vimrc][5]的时候了解到一个很酷的 vim 功能!(主要为了添加 fzf 和 ripgrep 插件)。这是一个内置功能,不需要特别的插件。 + +所以我画了一个漫画。 + +基本上你可以用下面的命令保存所有你打开的文件和当前的状态 + +``` +:mksession ~/.vim/sessions/foo.vim + +``` + +接着用 `:source ~/.vim/sessions/foo.vim` 或者  `vim -S ~/.vim/sessions/foo.vim` 还原会话。非常酷! + +一些 vim 插件给 vim 会话添加了额外的功能: + +* [https://github.com/tpope/vim-obsession][1] + +* [https://github.com/mhinz/vim-startify][2] + +* [https://github.com/xolox/vim-session][3] + +这是漫画: + +![](https://jvns.ca/images/vimsessions.png) + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2017/09/10/vim-sessions/ + +作者:[Julia Evans ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://jvns.ca/about +[1]:https://github.com/tpope/vim-obsession +[2]:https://github.com/mhinz/vim-startify +[3]:https://github.com/xolox/vim-session +[4]:https://jvns.ca/categories/vim +[5]:https://github.com/jvns/vimconfig/blob/master/vimrc From 83af56b418159200225093801e6e1a72dff8fe76 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 4 Dec 2017 10:31:46 +0800 Subject: [PATCH 2/2] Update 20170910 Cool vim feature sessions.md --- translated/tech/20170910 Cool vim feature sessions.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/translated/tech/20170910 Cool vim feature sessions.md b/translated/tech/20170910 Cool vim feature sessions.md index 462d6362b2..49ee43fda1 100644 --- a/translated/tech/20170910 Cool vim feature sessions.md +++ b/translated/tech/20170910 Cool vim feature sessions.md @@ -1,6 +1,3 @@ -translating---geekpi - -Cool vim feature: sessions! vim 的酷功能:会话! ============================================================•