change the small sign

This commit is contained in:
maywanting 2016-07-31 00:22:24 +08:00
parent a236f0fac4
commit 15019d3beb
2 changed files with 7 additions and 69 deletions

View File

@ -1,62 +0,0 @@
maywanting
5 tricks for getting started with Vim
=====================================
![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/BUSINESS_peloton.png?itok=nuMbW9d3)
For years, I've wanted to learn Vim, now my preferred Linux text editor and a favorite open source tool among developers and system administrators. And when I say learn, I mean really learn. Master is probably too strong a word, but I'd settle for advanced proficiency. For most of my years using Linux, my skillset included the ability to open a file, use the arrow keys to navigate up and down, switch into insert mode, change some text, save, and exit.
But that's like minimum-viable-Vim. My skill level enabled me edit text documents from the terminal, but hasn't actually empowered me with any of the text editing super powers I've always imagined were possible. And it didn't justify using Vim over the totally capable Pico or Nano.
So why learn Vim at all? Because I do spend an awful lot of time editing text, and I know I could be more efficient at it. And why not Emacs, or a more modern editor like Atom? Because Vim works for me, and at least I have some minimal experience in it. And perhaps, importantly, because it's rare that I encounter a system that I'm working on which doesn't have Vim or it's less-improved cousin (vi) available on it already. If you've always had a desire to learn Emacs, more power to you—I hope the Emacs-analog of these tips will prove useful to you, too.
A few weeks in to this concentrated effort to up my Vim-use ability, the number one tip I have to share is that you actually must use the tool. While it seems like a piece of advice straight from Captain Obvious, I actually found it considerably harder than I expected to stay in the program. Most of my work happens inside of a web browser, and I had to untrain my trigger-like opening of (Gedit) every time I needed to edit a block of text outside of a browser. Gedit had made its way to my quick launcher, and so step one was removing this shortcut and putting Vim there instead.
I've tried a number of things that have helped me learn. Here's a few of them I would recommend if you're looking to learn as well.
### Vimtutor
Sometimes the best place to get started isn't far from the application itself. I found Vimtutor, a tiny application that is basically a tutorial in a text file that you edit as you learn, to be as helpful as anything else in showing me the basics of the commands I had skipped learning through the years. Vimtutor is typically found everywhere Vim is, and is an easy install from your package manager if it's not already on your system.
### GVim
I know not everyone will agree with this one, but I found it useful to stop using the version of Vim that lives in my terminal and start using GVim for my basic editing needs. Naysayers will argue that it encourages using the mouse in an environment designed for keyboards, but I found it helpful to be able to quickly find the command I was looking for in a drop-down menu, reminding myself of the correct command, and then executing it with a keyboard. The alternative was often frustration at the inability to figure out how to do something, which is not a good feeling to be under constantly as you struggle to learn a new editor. No, stopping every few minutes to read a man page or use a search engine to remind you of a key sequence is not the best way to learn something new.
### Keyboard maps
Along with switching to GVim, I also found it handy to have a keyboard "cheat sheet" handy to remind me of the basic keystrokes. There are many available on the web that you can download, print, and set beside your station, but I opted for buying a set of stickers for my laptop keyboard. They were less than ten dollars US and had the added bonus of being a subtle reminder every time I used the laptop to at least try out one new thing as I edited.
### Vimium
As I mentioned, I live in the web browser most of the day. One of the tricks I've found helpful to reinforce the Vim way of navigation is to use [Vimium][1], an open source extension for Chrome that makes Chrome mimick the shortcuts used by Vim. I've found the fewer times I switch contexts for the keyboard shortcuts I'm using, the more likely I am to actually use them. Similar extensions, like [Vimerator][2], exist for Firefox.
### Other human beings
Without a doubt, there's no better way to get help learning something new than to get advice, feedback, and solutions from other people who have gone down a path before you.
If you live in a larger urban area, there might be a Vim meetup group near you. Otherwise, the place to be is the #vim channel on Freenode IRC. One of the more popular channels on Freenode, the #vim channel is always full of helpful individuals willing to offer help with your problems. I find it interesting just to listen to the chatter and see what sorts of problems others are trying to solve to see what I'm missing out on.
------
And so what to make of this effort? So far, so good. The time spent has probably yet to pay for itself in terms of time saved, but I'm always mildly surprised and amused when I find myself with a new reflex, jumping words with the right keypress sequence, or some similarly small feat. I can at least see that every day, the investment is bringing itself a little closer to payoff.
These aren't the only tricks for learning Vim, by far. I also like to point people towards [Vim Adventures][3], an online game in which you navigate using the Vim keystrokes. And just the other day I came across a marvelous visual learning tool at [Vimgifs.com][4], which is exactly what you might expect it to be: illustrated examples with Vim so small they fit nicely in a gif.
Have you invested the time to learn Vim, or really, any program with a keyboard-heavy interface? What worked for you, and, did you think the effort was worth it? Has your productivity changed as much as you thought it would? Lets share stories in the comments below.
--------------------------------------------------------------------------------
via: https://opensource.com/life/16/7/tips-getting-started-vim
作者:[Jason Baker ][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jason-baker
[1]: https://github.com/philc/vimium
[2]: http://www.vimperator.org/
[3]: http://vim-adventures.com/
[4]: http://vimgifs.com/

View File

@ -3,19 +3,19 @@ Vim 学习的 5 个技巧
![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/education/BUSINESS_peloton.png?itok=nuMbW9d3)
多年来,我一直想学 Vim 。如今 Vim 是我最喜欢的 Linux 文本编辑器,也是开发者和系统管理者最喜爱的开源工具。我说的学习,指的是真正意义上的学习。想要精通确实很难,所以我只想要达到熟练的水平。根据我多年使用 Linux 的经验,我会的也仅仅只是打开一个文件,使用上下左右箭头按键来移动光标,切换到 insert 模式,更改一些文本,保存,然后退出。
多年来,我一直想学 Vim。如今 Vim 是我最喜欢的 Linux 文本编辑器,也是开发者和系统管理者最喜爱的开源工具。我说的学习,指的是真正意义上的学习。想要精通确实很难,所以我只想要达到熟练的水平。根据我多年使用 Linux 的经验,我会的也仅仅只是打开一个文件,使用上下左右箭头按键来移动光标,切换到 insert 模式,更改一些文本,保存,然后退出。
但那只是 Vim 的最基本操作。我可以在终端修改文本文档,但是无法使用任何一个我想象中强大的文本处理功能。这样我无法说明 Vim 完全优于 Pico 和 Nano
但那只是 Vim 的最基本操作。我可以在终端修改文本文档,但是无法使用任何一个我想象中强大的文本处理功能。这样我无法说明 Vim 完全优于 Pico 和 Nano。
所以到底为什么要学习 Vim ?因为我需要花费相当多的时间用于编辑文本,而且有很大的效率提升空间。为什么不选择 Emacs ,或者是更为现代化的编辑器例如 Atom ?因为 Vim 适合我,至少我有一丁点的使用经验。而且,很重要的一点就是,在我需要处理的系统上很少碰见没有装 Vim 或者它的简化版Vi。如果你有强烈的欲望想学习 Emacs ,我希望这些对于 Emacs 同类编辑器的建议能对你有所帮助。
所以到底为什么要学习 Vim因为我需要花费相当多的时间用于编辑文本而且有很大的效率提升空间。为什么不选择 Emacs或者是更为现代化的编辑器例如 Atom因为 Vim 适合我,至少我有一丁点的使用经验。而且,很重要的一点就是,在我需要处理的系统上很少碰见没有装 Vim 或者它的简化版Vi。如果你有强烈的欲望想学习 Emacs我希望这些对于 Emacs 同类编辑器的建议能对你有所帮助。
花了几周的时间专注提高我的 Vim 使用技巧之后,我想分享的第一个建议就是必须使用工具。虽然这看起来就是明知故问的回答,但事实上比我所想的在代码层面上还要困难。我的大多数工作是在网页浏览器上进行的,而且我每次都得有针对性的用 Gedit 打开并修改一段浏览器之外的文本。Gedit 需要快捷键来启动,所以第一步就是移出快捷键然后替换成 Vim 的快捷键。
为了跟更好的学习 Vim ,我尝试了很多。如果你也正想学习,以下列举了一些作为推荐。
为了跟更好的学习 Vim我尝试了很多。如果你也正想学习以下列举了一些作为推荐。
### Vimtutor
通常如何开始学习最好就是使用应用本身。我找到一个小的应用叫 Vimtutor 当你在学习编辑一个文本时它能辅导你一些基础知识它向我展示了很多我这些年都忽视的基础命令。Vimtutor 上到处都是 Vim 影子,如果你的系统上没有 Vim Vimtutor可以很容易从你的包管理器上下载。
通常如何开始学习最好就是使用应用本身。我找到一个小的应用叫 Vimtutor当你在学习编辑一个文本时它能辅导你一些基础知识它向我展示了很多我这些年都忽视的基础命令。Vimtutor 上到处都是 Vim 影子,如果你的系统上没有 VimVimtutor可以很容易从你的包管理器上下载。
### GVim
@ -23,11 +23,11 @@ Vim 学习的 5 个技巧
### Keyboard maps
当我转战 GVim 我发现有一个键盘的“作弊表”来提醒我最基础的按键很是便利。网上有很多这种可用的表你可以下载打印然后贴在你身边的某一处地方。但是为了我的笔记本键盘我选择买一沓便签纸。这些便签纸在美国不到10美元而且当我使用键盘编辑文本尝试新的命令的时候可以随时提醒我。
当我转战 GVim我发现有一个键盘的“作弊表”来提醒我最基础的按键很是便利。网上有很多这种可用的表你可以下载打印然后贴在你身边的某一处地方。但是为了我的笔记本键盘我选择买一沓便签纸。这些便签纸在美国不到10美元而且当我使用键盘编辑文本尝试新的命令的时候可以随时提醒我。
### Vimium
上文提到,我工作都在浏览器上进行。其中一条我觉得很有帮助的建议就是,使用 [Vimium](1)来用增强使用 Vim 的体验。Vimium 是 Chrome 浏览器上的一个开源插件,能用 Vim 的指令快捷操作 Chrome。当我有意识的使用快捷键切换文本的次数越少时这说明我越来越多的使用这些快捷键。同样的扩展 Firefox 上也有,例如 [Vimerator](2)。
上文提到,我工作都在浏览器上进行。其中一条我觉得很有帮助的建议就是,使用 [Vimium](1) 来用增强使用 Vim 的体验。Vimium 是 Chrome 浏览器上的一个开源插件,能用 Vim 的指令快捷操作 Chrome。当我有意识的使用快捷键切换文本的次数越少时这说明我越来越多的使用这些快捷键。同样的扩展 Firefox 上也有,例如 [Vimerator](2)。
### 人