iT邦幫忙

2019 iT 邦幫忙鐵人賽

DAY 5
0
自我挑戰組

Experience of a backend novice系列 第 5

爲什麼要使用Vim?

Day five
Why would we use Vim?
爲什麼要使用Vim?

Hello everyone, it’s Ray!
哈囉大家好,我是Ray!

Today I’m going to share an amazing, very famous and powerful editor with a long history of over 50 years, it’s called “Vim”
今天要來跟大家分享一款非常實用且歷史悠久的編輯器,它叫做Vim!

Sorry but I’m not going to introduce its history, if you are interested, you could google it. I think google serves as a better history teacher than me.
關於歷史來源背景,我這邊就不贅述了,在麻煩有興趣的讀者自行Google!

Except for an editor specially designed for coding, it’s ubiquitous among all of those popular editors, or even IDEs, such as those I am using, PHPSTORM, or SUbline.
Vim除了是一款專門爲coding而設計的編輯器之外,幾乎在所有有名的IDE,或者是Editor上,都可以找到Vim的插件,比如我所使用的PHPstorm,或者Subline。

Before further digging into Vim, let’s talk about, why would we use Vim?
在我們深入Vim之前,我們先來說說,爲什麼我們要使用Vim?

Before opting for my career as an coder, I already started to use touch typing, which means using the jutted point on F and J key to locate, so I could type without looking at my keyboard even I had my eyes covered.
我個人在選擇成爲一名工程師之前,就已經使用標準指法,就是利用F以及J上的凸點來做定位而達到盲打,盲打就是蒙着眼睛也可以準確的打字哦!

After starting to code, what annoyed me the most was not the logic, neither the syntax, instead, it’s the necessity of switching among the mouse, main key section, and arrow key section on my keyboard.
在開始寫程式之後,我最大的困擾並不是程式的語法或邏輯,而是我的手必須頻繁的在滑鼠、方向鍵、以及主鍵區之間作切換。

Before the serendipity with Vim, I had been looking for keyboard with key.mapping function, because I reckon that the ideal way of typing is being able to complete all those required maneouvres with my palm fixed and stay on the main key area.
在我還未邂逅Vim之前,我一直在尋找可以自定義按鍵的鍵盤,因為我認為最理想的打字模式,就是我的手掌並不需要離開主鍵區而可以完成所有的操作。

Theoretically speaking, if there are two coders with same experience, logic, and skill, the one who could type faster definitely has more output, which means he could finish his job earlier.
理論上來說,如果兩個工程師有著同樣的經驗與邏輯,以及技術,打字速度較快的那個人肯定有著較高的輸出,意味著可以更快的完成任務。

So you ask me, why should I finish my job so early?
如果你問我,那我沒事做那麼快做什麼?

Hey bros, time is priceless! The earlier you finish your job, the more time will be at your disposal!
各位大大,時間就是金錢啊!! 越快完成表示省下越多的時間,代表你可以運用的時間將越多!

For some tech fanatics, oh! Sorry, I mean with great passion on tech, like me, it means that I could have more time for tech stuff.
對於技術狂熱者,啊不對,是對技術有較高熱情的人來說,像是我,更多的時間表示可以學習更多的技術。

Time is the most valuable currency, even more precious than Bitcoin!
時間可以用來做非常多的事,說是比比特幣還珍貴也不為過!

You could utilise it on companying with your family, friends, binge watching, or even with your girlfriend! Oh, sorry but you’ve got to have a girlfriend first, for someone who doesn’t, like me, I’m so sorry!
你可以用來陪家人、追劇、陪女朋友,阿~前提是你要先有女朋友,像我就沒有QQ。

The most basic and useful function of Vim is that arrow key function like up, down, left, and right could be achieved by simply pressing h, j, k, and l. In other words, it solves the irritant of switching from main key section and arrow key section with your right hand.
Vim的最基本也最實用的功能,就是可以使用h, j, k, l四個鍵來當成上下左右,換言之,他已經解決我們最大的問題-需要在方向鍵區與主鍵區頻繁的移動。

Basically Vim is divided with three modes- normal, insert, and visual. That said moving your cursor on normal mode, coding on insert mode, and it’s visual mode where from time to time we highlight a whole line or a couple of characters for further copying or cutting or even something more delicate.
Vim的功能區分為普通模式、輸入模式,以及選取模式,簡單來說,就是移動游標時會在普通模式,而輸入代碼時會在輸入模式,最後,當我們選取一整行要做複製或貼上甚至更複雜的動作時,會在選取模式。

看完以上的剖析,有沒有被Vim吸引到的感覺呢?
After the dissection above, have you found the charm of Vim?

今天的分享就到這裡,我們明天見!
I hope that you’ve been enjoyable on this article. See you guys!


上一篇
使用MySQL- group by 來整理資料庫~2
下一篇
OOP- Class and Object
系列文
Experience of a backend novice30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言