Yi

I thought it might make sense to have a page where I can dump all my Yi related findings, rather than making tidbit posts about Yi.
See posts tagged ‘Yi’.
(NOTE: 22/09/14: I haven’t taken the time to really look into Yi as intensely as I have been earlier. Some of the info below may be out of date. Feel free to email me, richard.goulter@gmail.com).

My impression of Yi hasn’t altered much, and I think maybe Yi isn’t as Emacs as Emacs, or as Vim as Vim, and perhaps the code is limited by that.

It also seems that to work on Yi, one would need to get familiar with its eDSL, as well as having familiarity with the lens library.

From a Vim Perspective

Using the name “Vim” can either refer to the Vim program itself, or maybe even to the family of vim-emulators which try to emulate Vim behaviour.
Often the latter are very second class.

Also inevitable is the vim emulators will miss out on some features of Vim. Vim also has the quality of having many cool mechanics which many of its users mightn’t have heard about.

I suppose if Yi is easy enough to extend, these things shouldn’t be hard to include.
Some things which are missing in Yi from Vim are posted in the Yi repo’s issues, although many of these may refer to the now removed Vim keymap, rather than ethercrow/Dmitry Ivanov’s Vim2 keymap. See here.

Editing More Than One File

:ls will show a list of currently open buffers, and :buffer # will go to that buffer number.

But there isn’t a :bnext, :bprev which my muscle memory uses.
(One could add this, right, but I wouldn’t know how [See below], as of 2014-07-02).

I’ve not used arglist much, but as a mutable subset of buffers list, I’ve heard it’s an improvement over aforementioned commands. (That, and some more).
There’s a VimCast on it.
Not that I can complain (since I haven’t used it in Vim), but also not in the keymap.

Line Numbers

By default Vim doesn’t have line numbers on, and to get line numbers on Emacs is kindof hackish, I hear.
Maybe it’s because of the Emacs crowd, but it’s not clear to me how to get line numbers on Yi. (as of 2014-07-02).

I haven’t seen any screenshot of Yi with line numbers.

Visual Mode

One of the cool things about Visual mode is the insertion/appending on multiple lines.
See the vim docs. The vim wiki has some examples.
Yi now does this better than Vim (as far as I can tell); where Vim only has this multi-line insert for block mode, Yi supports the feature for linewise visual mode as well. And, Yi’s multi-cursor insert writes things “live”, whereas Vim’s is delayed. Brag. (The caveat is that Yi’s block mode is slightly different. In theory it ought to work for standard visual mode, I suppose; examine the diff of that commit to see how, but like, visual mode seems to be for other things).

That Yi’s Vim keymap supports multiple cursors like this implies a multiple cursors feature are supported out-of-the-box (which doesn’t appear to be the case with a grok at the source), or that it should be reasonably straightforward to add a plugin like terryma/vim-multiple-cursors (in the style of Sublime Text).

I took a screenshot of Vim and of Yi for comparison about what their Visual Lines modes look like:

Vim

Yi

Using this Yi.hs with Vty frontend (terminal), in a terminal with Solarized colors theme.

Command-line Window

This really shoots at “obscure Vim things”, but I’m making a list of differences I’ve noticed. This is the q:, q/, q? window which shows up. Vimdoc:cmdline-window.

(But I’m not sure how commonly this feature is used by Vim folk).

Quickfix Window

Quickfix is not an obscure feature of Vim. (Though I don’t use it as often as I should). I’m not sure what Yi’s support for Quickfix, or equivalent, is; but I haven’t looked. (as of 2014-07-02). Vimdoc:quickfix.

Tags

Yi appears to have some support for tags, which I need to look into. (as of 2014-07-02).

Searching

Yi does have Incremental Searching, and it does this the way Emacs does, which is better than Vim.
That is, while typing the search, all things which match are highlighted, rather than just one entry.

Jumplist

Yi does appear to have C-I, C-O for navigating between cursor jumps.
The :ju Ex command to show the jumplist isn’t there.
The changelist (g;, g,) also doesn’t appear to be implemented. Vimdoc:jump-motions

I’ve also seen '. used for “jump to last edit”. Yi doesn’t have this.
Vimdoc:’.

Questions About Yi

Troubles with Yi


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License .