A MICRO copy of Vim
- Tiny, single-filed, no dependency
- Vim-like commands
- Support UTF-8 and wide characters
- Copy, cut and paste
- History Tracing
- Keyword highlighting
- Position Stack
Make sure you have c99
on your system, which should refer to a
C99-compatible compiler. This project uses POSIX features and VT100 control
sequences to draw the screen, so please check that your terminal supports it.
$ cd src && make install
The installation path is specified through variable DIR_INSTALL
, which
could be alternated on commandline, e.g.,
$ make install DIR_INSTALL="$HOME/.local/bin"
Default configuration is specified at compile time. Some options could be
modified at runtime with :set
command.
Here is a list of configuration options:
tabsize
: int, Width of a TAB character.outputBuffersize
(Compile time only): int, the size of stdout's bufferhistorySize
(Compile time only): int, how many changes could be traced.highlightTrailingSpace
: bool, whether to highlight trailing spaces.highlightKeywordColor
: int, color used to highlight keywords (See Color List)positionStackSize
(Compile time only): int, the size of Position Stack (See Position Stack)
COLOR_BLACK
: 0COLOR_RED
: 1COLOR_GREEN
: 2COLOR_YELLOW
: 3COLOR_BLUE
: 4COLOR_MAGENTA
: 5COLOR_CYAN
: 6COLOR_WHITE
: 7
A stack is provided to ease browsing long files. Two commands are provided for for manipulate it,
push
(orpu
for short): Push current position of cursor onto the position stackpop
(orpo
for short): Pop a position from the stack and move cursor to it
Keywords to be highlighted are listed in src/keywords.h
and divided into
groups. mVim selects a group at startup by matching the file extension.
mVim already ships keywords for following languages,
- C/C++
- Lua
- POSIX Shell
- Golang
- Elm
- Haskell
- M4 Macro Language
They were added since I'm using them in my daily basis.
This project is tailored for my own usage, but I have make some efforts to
adapt it to wider requirements. Pull requests and patches will not be accepted.
If you want a feature to be added, make sure it isn't in the unsupported list
(UNSUPPORTED_LIST
), then give me an issue.
This project is distributed under BSD-2-Clause License.
This project is derived from kilo project, see src/mvim.c
for details.
LICENSE_KILO
contains the original copyright.
Help poor children in Uganda!
Consider donating to ICCF.