提交译文[talk]:20210418 F(r)iction- Or How I Learnt to Stop Worrying and Start Loving Vim.md

This commit is contained in:
Piaoshi 2021-07-29 00:36:00 +08:00
parent 7f0b0d7783
commit c24ccba054
2 changed files with 151 additions and 179 deletions

View File

@ -1,179 +0,0 @@
[#]: subject: (F(r)iction: Or How I Learnt to Stop Worrying and Start Loving Vim)
[#]: via: (https://news.itsfoss.com/how-i-started-loving-vim/)
[#]: author: (Theena https://news.itsfoss.com/author/theena/)
[#]: collector: (lujun9972)
[#]: translator: (piaoshi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
F(r)iction: Or How I Learnt to Stop Worrying and Start Loving Vim
======
It is Dec 2009, and I am ready to quit my job.
I wanted to focus on writing my first book; neither my commitments at work nor the state of technology was helping.
Writing is hard work.
Few tasks in the modern world can be as singular or as daunting a pursuit as sitting down in front of a blank piece of paper, and asking your brain to vomit out words that communicate an idea to readers. I am not suggesting that writing cant be collaborative of course, but merely illustrating how daunting it can be for writers to set off on a new piece by themselves. This is true for fiction
and non-fiction writing, but since I am a novelist Id like to focus primarily on fiction in this article.
![][1]
Remember what 2009 was like?
Smart phones were 3 years old I still hadnt gone away from feature phones. Laptops were big and bulky. Meanwhile, cloud-based web applications for productivity was in their infancy, and just not good. Technologically speaking, writers like me were using their Gmail accounts (and a very young cloud-based storage called Dropbox) as an always-available option to work on their drafts, even while away from my personal computer. While this was a nice change from what writers had to go through when working with typewriters (or god forbid, pen and paper), it wasnt much.
For one thing, version control of manuscripts was a nightmare. Further, the more tools I added to my tool kit to simplify the workflow, the more I had to switch context both from a UI and a UX sense.
I would start writing drafts on Windows Notepad, save it on a MS Word Document on my PC at home, email myself a copy, keep another copy on Dropbox (since Dropbox wasnt accessible at work), work on the copy of that file at work, email it back to myself at the end of the day, download it on the home computer, saving it under a new name and the respective date so that I would recognize the changes in the file were made at work (as opposed to home)…well you get the picture. If you think this workflow involving Windows Notepad, MS Word, Gmail, and Dropbox is insane, well now you know why I quit my job.
More soberingly, I still know writers, damn good writers too, who use variations of the workflow that I followed in 2009.
Over the next three years, I worked on the manuscript, completing the first draft in 2012. During the three years much had changed with the state of technology. Smart phones were actually pretty great, and some of the complications I had in 2009 had disappeared. I could still work on the same file that I had been working from at home, on my phone (not necessarily fresh writing, but editing had become considerably easier thanks to Dropbox on the phone.) My main writing tool remained Microsofts Windows Notepad and Word, which is how I completed the first draft.
The novel [**First Utterance**][2] was released in 2016 to critical and commercial acclaim.
The end.
Or so I thought.
As soon as I completed the manuscript and sent it to my editor, I had begun working on the second novel. I was no longer quitting my job to work on writing, but I had taken a more pragmatic approach: Id take two weeks off at the end of ever year so that I could go to a little cabin in the mountains to write.
It took me half a day to realize that the things that annoyed me about my [writing tools][3] and workflow had not disappeared, but morphed into a more complex beast. As a writer, I wasnt being productive or as efficient as I wanted.
### Linux in the time of Corona
![][4]
It is 2020 and the world is on the verge of mass hysteria.
What had started out as an isolated novel virus in China was morphing into the first global pandemic since 1911. On March 20th, Sri Lanka followed most of the rest of the world and shutdown.
April in Sri Lanka is the height of the dry season. Temperatures in concrete jungles like Colombo can reach the mid 30s, with humidity in the high 90s. It can drive most people to distraction at the best of times, but stuck at home with no always-on air conditioning while a global pandemic is underway? That is a good recipe for madness.
My madness was Linux or, as we in the open source community call it, distro-hopping.
The more I played around with *nix distros, the more enamoured I came to be with the idea of control. When nothing seems to be within our control not even the simple act of shaking hands with another person then it is only natural we lean towards things where we feel more in control.
Where better to get more control in my life than with my computing? Naturally, this extended to my writing tools and workflow too.
### The path to Vim
Theres a joke about [Vim][5] that describes perfectly my first experience with it. People are obsessive about Vim because they dont know how to close it.
I was attempting to edit a configuration file, and the [fresh install of Ubuntu Server][6] had only Vim pre-installed. First there was panic so much so I restarted the machine thinking the OS wasnt picking up my keyboard. Then when it happened again, the inevitable Google search: [How do I close vim?][7]
_Oh. Thats interesting_, I thought.
_But why?_
To understand why I was even remotely interested in a text editor that was too complex to close, you have to understand how much I adore Windows Notepad.
As a writer, I loved writing on its no-nonsense, no buttons, white-abyss like canvas. It had no spell check. It had no formatting. But I didnt care.
For the writer in me, Notepad was the best writing scratch pad ever devised. Unfortunately, it isnt powerful so even if I start writing my drafts in Notepad, I would move it to MS Word once I had passed a 1000 words Notepad wasnt built for prose, and those limitations would be glaringly obvious when I passed that word limit.
So the first thing I installed I moved all my computing away from Windows, was a good text editor.
[Kate][8] was the first replacement where I felt more comfortable than I did on Windows Notepad it was more powerful (it had spell-checker!), and hey, I could mess around with some hobbyist-type coding in the same environment.
It was love.
But then Vim happened.
The more I learnt about Vim, the more I watched developers live coding on Vim, the more I found myself opening Vim for my text editing needs. I use the phrase text editing in the traditional Unix sense: editing blocks of text in configuration files, or sometimes writing basic Bash scripts.
I still hadnt used Vim remotely for my prose writing needs.
For that I had LibreOffice.
Sort of.
While it is an adequate [replacement for MS Office][9], I found myself underwhelmed. The UI is perhaps even more distracting than MS Word, and with each distro having different packages of LibreOffice, I found myself using a hellishly fragmented tool kit and workflow, to say nothing about how different the UI can look in various distros and desktop environments.
Things had become even more complicated because I had also started my Masters. In this scenario, I was taking notes down on Kate, transferring them to LibreOffice, and then saving it on to my Dropbox.
Context switching was staring at me in the face every day.
Productivity dropped as I had to open and close a number of unrelated applications. I needed one writing tool to meet all my needs as a novelist, as a student, and as a hobbyist coder.
And thats when I realized that the solution to my context switching nightmare was also staring at me in the face at the same time.
By this point, I had used Vim often enough even used it with Termux on my Android phone to be pretty comfortable with the idea of moving everything to Vim. Since it supported markdown syntax, note-taking would also become even easier.
This was just about two months ago.
How am I doing?
It is April 2021.
I started this draft on my phone, [using Vim][10] via Termux (with the aid of a Bluetooth keyboard), while in a taxi. I pushed the file to a GitHub private repo for my writing, from which I pulled the file to my PC, wrote a few more lines, before heading out again. I pulled the new version of the file from GitHub to my phone, made changes, pushed it, repeat, until I emailed the final draft to the editor.
The context switching is now no more.
The distractions that come from writing in word processors is no more.
Editing is infinitely easier, and faster.
My wrists are no longer in pain because I hid my mouse from sight.
It is April 2021.
I am a novelist.
And I write on Vim.
How? Ill discuss the specific of this workflow in the second part of this column series on how non-tech people are using free and open source technology. Stay tuned.
![][11]
I'm not interested
#### _Related_
* [Going Against Google Analytics With Plausible's Co-Founder [Interview]][12]
* ![][13] ![Interview with Plausible founder Marco Saric][14]
* [The Progress Linux has Made in Terms of Gaming is Simply Incredible: Lutris Creator][15]
* ![][13] ![][16]
* [Multi Monitor and HiDPI Setup is Looking Better on Ubuntu 21.04 [My Experience So Far]][17]
* ![][13] ![Multimonitor setup with Ubuntu 21.04][18]
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/how-i-started-loving-vim/
作者:[Theena][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/theena/
[b]: https://github.com/lujun9972
[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM5MCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4=
[2]: https://www.goodreads.com/book/show/29616237-first-utterance
[3]: https://itsfoss.com/open-source-tools-writers/
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM5NScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4=
[5]: https://www.vim.org/
[6]: https://itsfoss.com/install-ubuntu-server-raspberry-pi/
[7]: https://itsfoss.com/how-to-exit-vim/
[8]: https://kate-editor.org/
[9]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/
[10]: https://linuxhandbook.com/basic-vim-commands/
[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4=
[12]: https://news.itsfoss.com/marko-saric-plausible/
[13]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4=
[14]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/Interview-plausible.jpg?fit=1200%2C675&ssl=1&resize=350%2C200
[15]: https://news.itsfoss.com/lutris-creator-interview/
[16]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/lutris-interview-ft.png?fit=1200%2C675&ssl=1&resize=350%2C200
[17]: https://news.itsfoss.com/ubuntu-21-04-multi-monitor-support/
[18]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/multi-monitor-ubuntu-21-itsfoss.jpg?fit=1200%2C675&ssl=1&resize=350%2C200

View File

@ -0,0 +1,151 @@
[#]: subject: (F(r)iction: Or How I Learnt to Stop Worrying and Start Loving Vim)
[#]: via: (https://news.itsfoss.com/how-i-started-loving-vim/)
[#]: author: (Theena https://news.itsfoss.com/author/theena/)
[#]: collector: (lujun9972)
[#]: translator: (piaoshi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
虚构还是摩擦: 我如何学会克服焦虑并开始爱上 Vim
======
时间2009 年 12 月。我准备辞去工作。
我希望专心写我的第一本书;我在工作中的承诺和当是技术状况都阻止不了我。
写作是件苦差事。
在现代世界中,很少有工作像写作这样奇特或者说艰巨的追求 -- 面对一张白纸,坐下来,迫使你的大脑吐出文字,向读者传达一个想法。当然,我并不是说写作不能与他人合作完成,而只是想说明,对于作家来说,自己着手写一部新作品是多么令人生畏。虚构和非虚构写作都是如此。但由于我是一名小说家,我在这篇文章中主要想关注是虚构作品的写作。
![][1]
还记得2009年是什么样子吗
智能手机已经诞生 3 年了 -- 我还没有摆脱功能机。笔记本电脑又大又笨重。同时,用于生产的基于云的网络应用还处于起步阶段,并不那么好用。从技术上讲,像我这样的作家们正在以 Gmail 账户(和一个非常年轻的基于云的存储服务 Dropbox作为一个始终可用的选项来处理自己的草稿即使我的个人电脑不在身边。虽然这与作家们必须要使用打字机上帝保佑笔和纸工作时相比已经是一个很好的变化了但并没有好多少。
首先,对手稿的版本控制是一场噩梦。此外,我为简化工作流程而在工具包中添加的工具越多,我转换写作环境(无论是用户界面还是用户体验)的次数就越多。
我可能是在 Windows 记事本上开始写草稿,然后把它保存在家里电脑上的 MS Word 文档中,用电子邮件发给自己一份副本,同时在 Dropbox 上保留另一份副本(因为在上班时无法访问 Dropbox在公司时对该文件的副本进行处理在一天结束时用电子邮件发给自己在家里的电脑上下载它用一个新的名字和相应的日期保存它这样我就能认出该文件是在工司而不是家里进行修改的……好吧你知道这是怎样一个画面。如果你能感受到这种涉及 Windows 记事本、MS Word、Gmail 和 Dropbox 的工作流程有多么疯狂,那么现在你就知道我为什么辞职了。
让我更清醒的是,我仍然知道一些作家,其中竟然有些还是好作家,依然在使用我 2009 年遵循的工作流程的各种变体。
在接下来的三年里,我致力于我的手稿,在 2012 年完成了初稿。在这三年里,技术状况发生了很大变化。智能手机确实相当给力,我在 2009 年遇到的一些复杂情况已经消失了。我仍然可以用手机处理我在家里外理的文件(不一定是新鲜的写作,但由于手机上的 Dropbox编辑变得相当容易。我的主要写作工具仍然是微软的 Windows 记事本和 Word我就是这样完成初稿的。
小说 [**《第一声》**][2] 于 2016 年出版,获得了评论界和商业界的好评。
结束了。
或许我是这么想的。
刚完成手稿并发给我的编辑,我就已经开始着手第二部小说的写作。我不再离职从事写作,而是采取了一种更务实的方法:我会在每年年底请两个星期的假,这样我就可以到山上的一个小木屋里去写作。
花了半天时间我才意识到,那些让我讨厌的 [写作工具][3] 和工作流程并没有消失,而是演变成了一个更复杂的野兽。作为一个作家,我并不像我想像的那样高产或高效。
### 新冠期间的 Linux
![][4]
时间2020 年。世界正处于集体疯狂的边缘。
起初在中国分离出的一种新型病毒正在演变成 1911 年以来的第一次全球大流行疾病。3 月 20 日,斯里兰卡,跟随世界上大多数国家的脚步,关闭了。
四月是斯里兰卡旱季的高峰。在像科伦坡这样的混凝土丛林中,温度可以达到三十四五度,湿度高达九十八九度。在最好的情况下,它也可以使大多数人精神错乱,更别说在全球大流行病正在进行的时候,被困在没有一直开着空调的家里?真是一个让人疯狂的好温床。
让我的疯狂是 Linux或者说是"发行版跳跃",像我们在开源社区中所说的。
我在各种 *nix 发行版间跳的次数越多,我就对控制的想法越迷恋。当任何事情似乎都不在我们的控制之中时 -- 即使是与另一个人握手这样的简单行为 -- 我们自然会倾向于做那些我们感觉更有控制力的事。
在我的生活中,还有什么比计算机更容易被控制的呢?自然,这也延伸到我的写作工具和工作流程。
### 通往 Vim 之路
有一个关于 [Vim][5] 的笑话完美地描述了我对它的第一次体验:人们对 Vim 难以割舍是因为他们不知道怎么关掉它。
我试图编辑一个配置文件,而 [新安装的 Ubuntu 服务器][6] 只预装了 Vim 文本编辑器。第一次是恐慌 -- 以至于我重新启动了机器,以为操作系统没有识别出我的键盘。然而当它再次发生时,不可避免地,我谷歌搜索:“[我该如何关闭 Vim][7]”
_哦。这真有趣_我想。
_但为什么呢_
要理解我为什么会对一个复杂到无法关闭的文本编辑器有点兴趣,你必须了解我是多么崇拜 Windows 记事本。
作为一个作家,我喜欢在它的没有废话、没有按钮、白纸一样的画布上写作。它没有拼写检查。它没有格式。但这些我并不关心。
对于我这个作家来说,记事本是有史以来最好的草稿写作板。不幸的是,它并不强大 -- 所以即使我会先用记事本写草稿,一旦超过 1000 字,我就会把它移到 MS Word 上 -- 记事本不是为散文而生的,当超过这个字数限制时,这些局限就会凸显出来。
因此,当我把我所有的计算从 Windows 上迁移走时,我第一个要安装的就是一个好的文本编辑器。
[Kate][8] 是第一个让我感到比用 Windows 记事本更舒服的替代品 -- 它更强大(它有拼写检查功能!),而且,我可以在同一个环境中搞一些业余爱好式的编程。
当时它是我的爱。
但后来 Vim 出现了。
我对 Vim 了解得越多,看开发者在 Vim 上现场进行编码的次数越多,我就越发现自己在编辑文本时更想打开 Vim。我在传统的 Unix 意义上使用“文本编辑”这一短语:编辑配置文件中的文本块,或者有时编写基本的 Bash 脚本。
我仍然没有用 Vim 来满足我的散文写作需求。
在这方面我有 Libre Office。
算是吧。
虽然它是一个适当的 [MS Office 替代品][9],但我发现自己没有被它打动。它的用户界面可能比 MS Word 更让人分心,而且每个发行版都有不同的 Libre Office 软件包,我发现自己使用的是一个非常零散的工具包和工作流程,更不用说用户界面在不同的发行版和桌面环境中差异是多么大。
当我开始读我的硕士学位时,事情变得更加复杂了。这是,我要在 Kate 上做笔记,把它们转移到 Libre Office 上,然后保存到我的 Dropbox 上。
情境转换每天都在盯着我看。
生产力下降,因为我不得不打开和关闭一些不相关的应用程序。我需要一个写作工具来满足我所有的需求 -- 作为一个小说家,作为一个学生,作为一个业余的程序员。
这时我意识到,解决我场景切换噩梦的方法也同时在盯着我的脸。
这时,我已经经常使用 Vim -- 甚至在我的安卓手机上利用 Termux 使用它。这使我对要把所有东西都搬到 Vim 上的想法感到相当舒服。由于它支持 Markdown 语法,记笔记也会变得更加容易。
这仅仅是大约两个月前的事。
现在怎么样了?
时间2021 年 4 月。
坐在出租车上,我通过 Termux借助蓝牙键盘[用 Vim][10] 在手机上开始写这个草稿。我把文件推送到 GitHub 上我的用于写作使用的私人仓库,我从那里把文件拉到我的电脑上,又写了几行,然后再次出门。我把新版本的文件从 GitHub 拉到我的手机上,修改,推送,如此往复,直到我把最后的草稿用电子邮件发给编辑。
现在,场景切换的情况已经不复存在。
在文字处理器中写作所带来的分心问题也没有了。
编辑工作变得无比简单,而且更快了。
我的手腕不再疼痛,因为我不再需要鼠标了。
现在是 2021 年 4 月。
我是一名小说家。
而我在 Vim 上写作。
怎么做的?我将在本专栏系列的第二部分讨论这个工作流程的具体内容,即非技术人员如何使用免费和开源技术。敬请关注。
--------------------------------------------------------------------------------
via: https://news.itsfoss.com/how-i-started-loving-vim/
作者:[Theena][a]
选题:[lujun9972][b]
译者:[piaoshi](https://github.com/piaoshi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://news.itsfoss.com/author/theena/
[b]: https://github.com/lujun9972
[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM5MCcgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4=
[2]: https://www.goodreads.com/book/show/29616237-first-utterance
[3]: https://itsfoss.com/open-source-tools-writers/
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM5NScgd2lkdGg9Jzc4MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4=
[5]: https://www.vim.org/
[6]: https://itsfoss.com/install-ubuntu-server-raspberry-pi/
[7]: https://itsfoss.com/how-to-exit-vim/
[8]: https://kate-editor.org/
[9]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/
[10]: https://linuxhandbook.com/basic-vim-commands/