小说还是折磨：我如何学会克服焦虑并开始爱上 Vim
Vim

> 
> 非技术人员也可以使用 Linux 和开源软件进行非技术工作。这是我的故事。
> 
> 
> 


![](/data/attachment/album/202107/31/110557wpmmpg8p3bmp171y.png)


（LCTT 译注：本文原文标题用 “F(r)iction” 一语双关的表示了<ruby> 小说 <rt>  fiction </rt></ruby>写作过程中的<ruby> 摩擦 <rt>  friction </rt></ruby>苦恼。）


时间：2009 年 12 月。我准备辞去工作。


我希望专心写我的第一本书；我的工作职责和技术环境都没办法让我完成这本书的写作。


写作是件苦差事。


在现代世界中，很少有工作像写作这样奇特或者说艰巨的追求 —— 面对一张白纸，坐下来，迫使你的大脑吐出文字，向读者传达一个想法。当然，我并不是说写作不能与他人合作完成，而只是想说明，对于作家来说，自己着手写一部新作品是多么令人生畏。小说还是非小说写作都是如此。但由于我是一名小说家，我在这篇文章中主要想关注是小说的写作。


![](/data/attachment/album/202107/31/110558aevqpa9uhh9kehph.png)


还记得 2009 年是什么样子吗？


智能手机已经诞生 3 年了 —— 而我还在使用功能机。笔记本电脑又大又笨重。同时，基于云的生产力 Web 应用还处于起步阶段，并不那么好用。从技术上讲，像我这样的作家们正在以 Gmail 账户（和一个非常年轻的基于云的存储服务 Dropbox）作为一个始终可用的选项来处理自己的草稿，即使我的个人电脑不在身边。虽然这与作家们必须要使用打字机（或，上帝保佑，使用笔和纸）工作时相比已经是一个很好的变化了，但并没有好多少。


首先，对手稿的版本控制是一场噩梦。此外，我为简化工作流程而在工具包中添加的工具越多，我转换写作环境（无论是用户界面还是用户体验）的次数就越多。


我是在 Windows 记事本上开始写草稿的，然后把它保存在家里电脑上的 MS Word 文档中，用电子邮件发给自己一份副本，同时在 Dropbox 上保留另一份副本（因为在上班时无法访问 Dropbox），在公司时对该文件的副本进行处理，在一天结束时用电子邮件发给自己，在家里的电脑上下载它，用一个新的名字和相应的日期保存它，这样我就能认出该文件是在公司（而不是家里）进行修改的……好吧，你知道这是怎样一个画面。如果你能感受到这种涉及 Windows 记事本、MS Word、Gmail 和 Dropbox 的工作流程有多么疯狂，那么现在你就知道我为什么辞职了。


让我更清醒的是，我仍然知道一些作家，其中竟然有些还是好作家，依然在使用我 2009 年遵循的工作流程的各种变体。


在接下来的三年里，我一直在写手稿，在 2012 年完成了初稿。在这三年里，技术环境发生了很大变化。智能手机确实相当给力，我在 2009 年遇到的一些复杂情况已经消失了。我仍然可以用手机处理我在家里外理的文件（不一定是新的写作，但由于手机上的 Dropbox，编辑变得相当容易）。我的主要写作工具仍然是微软的 Windows 记事本和 Word，我就是这样完成初稿的。


小说 [《第一声》](https://www.goodreads.com/book/show/29616237-first-utterance) 于 2016 年出版，获得了评论界和商业界的好评。


结束了。


或许我是这么想的。


我一完成手稿发给了编辑，就已经开始着手第二部小说的写作。我不再为写作而辞职，而是采取了一种更务实的方法：我会在每年年底请两个星期的假，这样我就可以到山上的一个小木屋里去写作。


花了半天时间我才意识到，那些让我讨厌的 [写作工具](https://itsfoss.com/open-source-tools-writers/) 和工作流程并没有消失，而是演变成了一个更复杂的野兽。作为一个作家，我并不像我想像的那样高产或高效。


### 新冠期间的 Linux


![](/data/attachment/album/202107/31/110600zm1djnj2dz6m72v6.jpg)


时间：2020 年。世界正处于集体疯狂的边缘。


（为某些原因而删改的文字）一种新型病毒正在演变成 1911 年以来的第一次全球大流行疾病。3 月 20 日，斯里兰卡，跟随世界上大多数国家的脚步，封城了。


四月是斯里兰卡旱季的高峰。在像科伦坡这样的混凝土丛林中，温度可以达到三十多度，湿度高达九十多度。在最好的情况下，它也可以使大多数人精神错乱，更别说在全球大流行病正在进行的时候，被困在没有一直开着空调的家里？真是一个让人疯狂的好温床。


让我的疯狂是 Linux，或者说是“发行版跳跃”，像我们在开源社区中所说的。


我越在各种 \*nix 发行版间蹿来蹿，我就对控制的想法越迷恋。当任何事情似乎都不在我们的控制之中时 —— 即使是与另一个人握手这样的简单行为 —— 我们自然会倾向于做那些我们感觉更有控制力的事。


在我的生活中，还有什么比计算机更容易被控制的呢？自然，这也延伸到我的写作工具和工作流程。


### 通往 Vim 之路


有一个关于 [Vim](https://www.vim.org/) 的笑话完美地描述了我对它的第一次体验：人们对 Vim 难以割舍是因为他们不知道怎么关掉它。


我试图编辑一个配置文件，而 [新安装的 Ubuntu 服务器](https://itsfoss.com/install-ubuntu-server-raspberry-pi/) 只预装了 Vim 文本编辑器。第一次是恐慌 —— 以至于我重新启动了机器，以为操作系统没有识别出我的键盘。然而当它再次发生时，不可避免地，我谷歌搜索：“[我该如何关闭 Vim？](https://itsfoss.com/how-to-exit-vim/)”


*哦。这真有趣*，我想。


*但为什么呢？*


要理解我为什么会对一个复杂到无法关闭的文本编辑器有点兴趣，你必须了解我是多么崇拜 Windows 记事本。


作为一个作家，我喜欢在它的没有废话、没有按钮、白纸一样的画布上写作。它没有拼写检查。它没有格式。但这些我并不关心。


对于我这个作家来说，记事本是有史以来最好的草稿写作板。不幸的是，它并不强大 —— 所以即使我会先用记事本写草稿，一旦超过 1000 字，我就会把它移到 MS Word 上 —— 记事本不是为散文而生的，当超过这个字数限制时，这些局限就会凸显出来。


因此，当我把我所有的计算机工作从 Windows 上迁移走时，我第一个要安装的就是一个好的文本编辑器。


[Kate](https://kate-editor.org/) 是第一个让我感到比用 Windows 记事本更舒服的替代品 —— 它更强大（它有拼写检查功能！），而且，我可以在同一个环境中搞一些业余爱好式的编程。


当时它是我的爱。


但后来 Vim 出现了。


我对 Vim 了解得越多，看开发者在 Vim 上现场进行编码的次数越多，我就越发现自己在编辑文本时更想打开 Vim。我使用 Unix 传统意义上“文本编辑”这一短语：编辑配置文件中的文本块，或者有时编写基本的 Bash 脚本。


我仍然没有用 Vim 来满足我的散文写作需求。


在这方面我有 Libre Office。


算是吧。


虽然它是一个适当的 [MS Office 替代品](https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/)，但我发现自己没有被它打动。它的用户界面可能比 MS Word 更让人分心，而且每个发行版都有不同的 Libre Office 软件包，我发现自己使用的是一个非常零散的工具包和工作流程，更不用说用户界面在不同的发行版和桌面环境中差异是多么大。


事情变得更加复杂了，因为我也开始读我的硕士学位了。这时，我要在 Kate 上做笔记，把它们转移到 Libre Office 上，然后保存到我的 Dropbox 上。


我每天都面临着情境转换。


生产力下降，因为我不得不打开和关闭一些不相关的应用程序。我需要一个写作工具来满足我所有的需求，无论是作为一个小说家，还是一个学生、亦或是一个业余的程序员。


这时我意识到，解决我场景切换噩梦的方法也同样摆在我的面前。


这时，我已经经常使用 Vim —— 甚至在我的安卓手机上利用 Termux 使用它。这使我对要把所有东西都搬到 Vim 上的想法感到相当舒服。由于它支持 Markdown 语法，记笔记也会变得更加容易。


这仅仅是大约两个月前的事。


现在怎么样了？


时间：2021 年 4 月。


坐在出租车上，我通过 Termux（借助蓝牙键盘）[用 Vim](https://linuxhandbook.com/basic-vim-commands/) 在手机上开始写这个草稿。我把文件推送到 GitHub 上我的用于写作使用的私人仓库，我从那里把文件拉到我的电脑上，又写了几行，然后再次出门。我把新版本的文件从 GitHub 拉到我的手机上，修改、推送，如此往复，直到我把最后的草稿用电子邮件发给编辑。


现在，场景切换的情景已经不复存在。


在文字处理器中写作所带来的分心问题也没有了。


编辑工作变得无比简单，而且更快了。


我的手腕不再疼痛，因为我不再需要鼠标了。


现在是 2021 年 4 月。


我是一名小说家。


而我在 Vim 上写作。


怎么做的？我将在本专栏系列的第二部分讨论这个工作流程的具体内容，即非技术人员如何使用免费和开源技术。敬请关注。




---


via: <https://news.itsfoss.com/how-i-started-loving-vim/>


作者：[Theena](https://news.itsfoss.com/author/theena/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[piaoshi](https://github.com/piaoshi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![](/assets/images/pikapods-banner-v3.webp)


![](/assets/images/pikapods-banner-v3.webp)

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 can’t 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 I’d like to focus primarily on fiction in this article.

![](https://news.itsfoss.com/content/images/wordpress/2021/04/Cellphones-different-generations-set.png)

Remember what 2009 was like?

Smart phones were 3 years old – I still hadn’t 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 wasn’t 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 wasn’t 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 Microsoft’s Windows Notepad and Word, which is how I completed the first draft.

The novel [ First Utterance](https://www.goodreads.com/book/show/29616237-first-utterance?ref=news.itsfoss.com) 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: I’d 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](https://itsfoss.com/open-source-tools-writers/?ref=news.itsfoss.com) and workflow had not disappeared, but morphed into a more complex beast. As a writer, I wasn’t being productive or as efficient as I wanted.

## Linux in the time of Corona

![Coronavirus lockdown](https://news.itsfoss.com/content/images/wordpress/2021/04/quarantine.jpg)

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

There’s a joke about [Vim](https://www.vim.org/?ref=news.itsfoss.com) that describes perfectly my first experience with it. People are obsessive about Vim because they don’t know how to close it.

I was attempting to edit a configuration file, and the [fresh install of Ubuntu Server](https://itsfoss.com/install-ubuntu-server-raspberry-pi/?ref=news.itsfoss.com) had only Vim pre-installed. First there was panic – so much so I restarted the machine thinking the OS wasn’t picking up my keyboard. Then when it happened again, the inevitable Google search: ‘[How do I close vim?](https://itsfoss.com/how-to-exit-vim/?ref=news.itsfoss.com)‘

*Oh. That’s 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 didn’t care.

For the writer in me, Notepad was the best writing scratch pad ever devised. Unfortunately, it isn’t 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 wasn’t 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](https://kate-editor.org/?ref=news.itsfoss.com) 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 hadn’t used Vim remotely for my prose writing needs.

For that I had LibreOffice.

Sort of.

While it is an adequate [replacement for MS Office](https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/?ref=news.itsfoss.com), 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 that’s 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](https://linuxhandbook.com/basic-vim-commands/?ref=news.itsfoss.com) 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? I’ll 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.

*Contributed by Theena*

## More from It's FOSS...

- Support us by opting for
[It's FOSS Plus](https://itsfoss.com/#/portal/signup)membership. - Join our
[community forum](https://itsfoss.community/). - 📩 Stay updated with the latest on Linux and Open Source. Get our
[weekly Newsletter](https://itsfoss.com/newsletter/).