惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
L
LangChain Blog
M
MIT News - Artificial intelligence
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
P
Proofpoint News Feed
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
U
Unit 42
I
InfoQ
月光博客
月光博客
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - Franky
D
Docker
B
Blog

Yi blog

Modularization - Yi Release 0.14 - Yi Dynamic and static compilation - Yi Prototypes - Encoding Object Oriented inheritance in Haskell Incremental parsing - Yi Demo - Yi Configuration - Yi Overall Structure - Yi
Improving on Vi Improved - Yi
2017-09-07 · via Yi blog

Posted on September 7, 2017 by Dmitry Ivanov

Vim emulation in Yi is far from perfect. It would be interesting to have a test suite to quantify what portion of Vim one or the other editor implements and have a leaderboard and a healthy competition. The most useful metric for the quality of Vim emulation that I have is saying to a person new to Yi to try and use it like Vim and counting the seconds until something doesn’t work as expected.

Nevertheless, Yi has some little bits and pieces in its emulation that are improvements over the real Vim. Just today I finally realized that I often go from insert mode to normal mode just to go back a character or two. But there already is a very popular shortcut for going back a character: <C-b>! It works in a shell, in many commandline programs, in text fields in macOS, in emacs of course.

What does it do in Vim? Inserts ^B, which is probably less useful thing. So as of today <C-f> and <C-b> move the cursor instead of doing nothing in insert mode. Going through other standard readline bindings and porting some to insert mode in Yi would be a good beginner project.

Of course, there are other ways in Vim (and Yi) to move the cursor one character left, like <C-o>h and the left arrow (no judging). I just find <C-b> to be the easiest.

Another tiny bit where Yi improves on Vim is blockwise visual insertion. While in Vim you have to type the whole thing, press Escape and then observe the result, Yi updates all rows live. This one is best described with a screen recording:

For some more (probably more obscure) points where Yi is intentionally incompatible with Vim, see yi-keymap-vim readme