官术网_书友最值得收藏!

Plugin spotlight – EasyMotion

EasyMotion has been in an essential part of my kit since I came across it. It simplifies navigation by allowing you to jump to the desired position with speed and precision. It's available from https://github.com/easymotion/vim-easymotion (see Installing plugins for installation instructions). 

After installing it, you can invoke the plugin by hitting the leader key (\) twice, followed by the desired movement key.

The leader key is often used by plugins to provide additional key mappings. By default, Vim's leader key is \. We'll go into more detail about the leader key in Chapter 3, Follow the Leader – Plugin Management.

Try using it with a word-wise motion by invoking \ \ w (backslash, followed by a backslash, followed by w):

You can see that the beginning of every word on the screen have been replaced with a letter (or two letters, once EasyMotion runs out of English letters from the alphabet). Pressing the letter (or two in order) will instantly transport your cursor to that spot on the screen.

EasyMotion supports the following movement commands by default (all prefixed by double tapping the leader key):

  • f, to look for a character to the right and F to look for the character on the left
  • t, to move until the character on the right and T until the character on the left
  • w, to move by word (and W by WORD)
  • b, to move backward by word (and B by WORD)
  • e, to move forward to the end of the word (and E for the WORD)
  • ge, to move backward to the end of the word (and gE for the WORD)
  • k and j to go to the beginning of the line up or down
  • n and N for jumping through search results on the page (based on the last / or ? search)

EasyMotion leaves many keys unassigned, leaving it up to the user to build their own set of mappings. You should check :help easymotion to see everything EasyMotion can do.

主站蜘蛛池模板: 从化市| 江华| 徐汇区| 开化县| 建瓯市| 安福县| 凤凰县| 巴中市| 中山市| 清丰县| 泗水县| 阳信县| 鲁山县| 吉水县| 灵寿县| 亚东县| 灵台县| 腾冲县| 远安县| 南乐县| 普洱| 新龙县| 垦利县| 通榆县| 诸暨市| 旬阳县| 凤台县| 临夏县| 巴林左旗| 西乌| 新野县| 博乐市| 南召县| 南岸区| 平邑县| 开平市| 施甸县| 江川县| 青神县| 渝北区| 甘孜县|