Tinymode is a Vim script that enables the creation of "tiny modes" for Normal mode.
One key feature of tinymode is that it doesn't use getchar() - the cursor doesn't move to the command-line waiting for a character. Instead, the mode is left automatically when not pressing a key for 'timeoutlen' ms (assuming 'timeout' is on). This helps to keep things fast and efficient.
To provide an example of how to use tinymode, the following code creates "Mode1", which allows cycling of tab pages. To enter the mode, the user must type "gt" or "gT". Within the mode, the available keys are "0", "t", "T", and "$". Exiting the mode is accomplished by typing a Normal mode command or waiting for 3 s. The code used to create this mode is as follows:
call tinymode#EnterMap("mode1", "gt", "t")
call tinymode#EnterMap("mode1", "gT", "T")
call tinymode#ModeMsg("mode1", "Cycle tab pages [0/t/T/$]", 1)
call tinymode#Map("mode1", "0", "tabfirst")
call tinymode#Map("mode1", "t", "norm! [N]gt")
call tinymode#Map("mode1", "T", "norm! [N]gT")
call tinymode#Map("mode1", "$", "tablast")
call tinymode#ModeArg("mode1", "owncount")
As for Vim itself, it is a text editor that was first released in 1991 for the Amiga computer. Vim was created as an extended version of the vi editor, designed to be helpful in editing program source code. While it is cross-platform, it is most popular on Unix-like operating systems. Vim is free and open source software and has a built-in tutorial for beginners, as well as a Vim User's Manual that explains basic and more advanced features. Vim's interface is based on commands given in a text user interface, with its GUI version, gVim, adding menus and toolbars for commonly used commands. Despite the initial difficulty in learning Vim, most users progress quickly and find it to be a highly efficient text editor. Overall, both tinymode and Vim are highly recommended for any programmer looking to streamline their workflow.
Version 0.3: N/A