These are the live notes for creating the ideal vi. The most extensible and fastest vi clone you ever seen in your life.
Distros can package vii by configuring config.h to best suite their users.
You may ask, “but.. but.. how do you make something extensible without scripting language”. I’m here to say it’s possible.
AST should be asynchronous to vii and push back changes if it is at all needed. A task will be passed to AST with and id. If we still want it, we will ask again. If not we won’t. We can cancel and start on our will :) AST should be separate executable. Should read from standard input and give out to standard output. But we are losing overall type information and optimizations. Checkout tree-sitter and gather more information on this topic.
This method is particularly useful because now you can cat files with syntax highlighting, something that was missing from the linux community.
cat source.c | syntax-c
cat README.md | syntax-glow-md
Registers are outside vii, they donot belong inside. As a result, cross windows copy/pasting is given to available to every windows. For multiple registers, use other programs that offer this functionality for you DE.
Modal editing should work out of the box, no compromise there. d - delete r - replace y - yank p - paste . - repeat operator
s p ; ‘ “ { [ (
God tier undo/redo. Both u/ctrl-r and u/. is stupid. u - undo U - redo # Can be changed in config.h
Undo tree is maintained is similar to VIM.
Why ctrl-R? Whole point of vi is stay in the homerow and less key movements. Having to type ctrl and then r for a common task is a smell.
Editor specific scripting languages are stupid. And embedding any form of scripting software in the editor is a smell that gets smelly and smelly over time. Just look at vimscript, vimscript9 and lua. Neverthless an editor should obey instructions
I propose an editor that obeys instruction from a file. When the user uses the command mode he sets the commands by writing it to a file located in ram. The editor should allow for this configuration.
Configuration is available but not scripting languages.
There is the case of line numbers which is not that well thought of. I guess that should be part of the editor but that means integrating themes and stuff. Being available in a editor causes unwanted problems of customization and other stuff. It should and will live as seperate program.
Those status are really helpful. What about theming there? And what about customization there? Should that be a part of the editor? Maybe we can indicate that with the cursor? I mean we can change the look of block to ‘_’ during insert mode. What about visual and replace mode? Rethink how we should display the file we are editing. Status bar in vim and it’s sister neovim is highly constrained.
vii should be able to get controlled by everyone. People without vision should be able to send voice commands to vii and it should just work. vii will accept input commands stdin. Just map the stdin with some voice recog program and stdout with vii. It will just work.
Use something like dvtm or tmux. Easy clap.
Embedding the window feature in editor reduces productivity for the developer and the user of vii.
Query vii process and issue a copen command through all the tmux windows.
In my experience, using external window manager like dvtm, tmux or dwm was easy to manage, rather than having an inbuilt one. Even if we support one, it would be hard to include different layouts. It is also difficult for the user as they have to remember different keybindings for multiple programs.
Think of a way to handle vimdiff and spotdiff like https://github.com/rickhowe/spotdiff.vim
Scripts give more problem than it tries to solve in editors. VimL, the scripting language of vim even though it’s cross platform is a pain to write in. Lua or elisp is better alternative but additional scripting language is not going to solve anything. It is better to use external scripting languages using the universal character interface. However, this doesn’t mean the editor is dumb. vii provides all sorts of hooks to the user. Using which the user can extend to his needs.
Try managing your plugins cross-platform. It becomes a chore easily. When we don’t have a scripting language. We can easily rely on external tools.
Having keybindings in vii will require us to have some sort of interface for mapping the commands. Instead we stop consuming unwanted keys, which will be handled by the window manager. Therefore, there is no concept of leader and bindings to do anything should be delegated to the window manager.
When you remove scripting support. The editor becomes extremely secure.
:w and :q combinations will be supported
Streams are possible in vii. Will start the editor without blocking the UI. Non-blocking streams is very very important.
curl big_file | vii
Syntax highlighting is a good feature to have, but having one should not interrupt text editing. ASTs can be configured to get the color information for the filetype and easily communicated. For this we need some support for scripting. However text editor scripting is evil. So the alternative ways are running piping the Since the editor is responsible for showing text, it should provide a way for syntax highlighting. However having a separate mechanism for it is boring.
File operations shouldn’t be possible in a text editor except for saving a file.
Line numbers are really cool to have. But mouse grabbing becomes a issue after a while. And we need separate config to handle that and code to handle that. An easy solution would be to disable line handling and use external program for that. With a good window manager, this becomes effortless. We need to update that line handling program as well. So this causes inefficiency. So we do support line numbers afterall inbuilt.
Everything graphical starts with g. So gll to see line numbers and glr for relative line number. Graphical line browsing is also possible. But instead of typing gj everytime. You can lock graphical mode. GNORMAL mode. Like normal mode but graphical. Now you can cat files with lines!
People like to have a window that encompasses all their project files. This can be done via external scripting and other tools. This has the additional benefit of loading proper envionment variables. A program like bound should provide you with all the facilities you require.