Skip to content

Latest commit

 

History

History
115 lines (99 loc) · 5.15 KB

README.md

File metadata and controls

115 lines (99 loc) · 5.15 KB

nvim logo

Vim C++ Linux

mvim is a VIM inspired modal-based text editor written in Cpp using the ncurses library. If you find a bug or want to discuss the best way to add a new feature, please open an issue.

Demo

asciicast

Quick Start

mvim has the following dependencies:

you can install them with:

  chmod +x install_dependencies.sh && ./install_dependencies.sh

install mvim

option 1:

  git clone https://github.com/ErikDervishi03/mvim-textEditor.git
  cd mvim-textEditor
  mkdir build
  cd build
  cmake ..
  sudo make install

option 2 use sget:

  sudo sget install https://github.com/ErikDervishi03/mvim-textEditor.git

or uninstall with:

  sudo xargs rm < install_manifest.txt

Modes

Normal - For motions and deletion
Insert - For inserting text
Find - For search/replace text in the current buffer

Keybinds

Mode Keybind Action
Insert Esc change to Normal mode
Normal q quit
Normal s save
Normal h Move cursor left
Normal j Move cursor down
Normal k Move cursor up
Normal l Move cursor right
Normal x Delete character
Normal i Enter insert mode
Normal v Enter visual mode
Normal f Enter find mode
Normal g Go to first line
Normal G Go to last line
Normal o Create line below current
Normal O Create line above current
Normal m open a menu that explain keys
Normal a go to the end of the line
Normal A go to the beginning of the line
Normal d remove the line
Normal e Open file explorer
Normal p paste

Visual

Visual mode works the same as Normal mode, except it works on the entire selection, instead of character by character. You can use all Movement combination available in normal mode

Keybind Action
> Indent current selection
< Unindent current selection
esc return to normal mode

Search

Search mode takes a string and finds it in the file.

Keybind Action
n Go to the next occurence of the searched word
N Go to the previous occurence of the searched word
r replace
esc return to normal mode

usage

  1. create a new file
  mvim
  1. open an existing file
  mvim filename

Technical Details

mvim uses doxygenmd to generate its Markdown API documentation:

doxygenmd src doc

mvim uses Uncrustify to ensure consistent code formatting:

uncrustify -c uncrustify.cfg --no-backup src/*
uncrustify -c uncrustify.cfg --no-backup include/*

inspiration