Home

Awesome

MiniVim

Click to launch a YouTube video demo:

A screenshot

A longer and more up to date demo is available here : Demo

Goals

Automated setup

git clone https://github.com/sd65/MiniVim.git

cd MiniVim

./install.sh

vim

Manual setup

If you can't clone the repo and do the above steps, just download the .vimrc to your home dir (backup your current .vimrc before).

wget https://raw.githubusercontent.com/sd65/MiniVim/master/vimrc -O ~/.vimrc

And then add stty -ixon to your .zshrc or .bashrc (your shell will ignore XON/XOFF signals. Needed to remap Ctrl S, Ctrl Q). It will prevent the terminal from "freezing" when saving a file or duplicating a line.

How to use

General Mappings

You hate those mappings? No problem, change this in your .vimrc : UseCustomKeyBindings=0.

KeysActionComments
Moving--------------------
ArrowsMove the cursorLike every editor
Ctrl ArrowsMove the cursor fast.Ctrl is a booster!
Ctrl AGo to the beginning of the lineAs in Nano/Shell
Ctrl EGo to the end of the lineAs in Nano/Shell, remember as End
HomeGo to the beginning of the fileSelf explanatory
EndGo to the end of the fileSelf explanatory too
Tabs--------------------
Ctrl TOpen a new tabLike Sublime, remember as Tab
Alt ArrowsSwitch between tabs.Ctrl Tab cannot be mapped...
History--------------------
Ctrl ZUndoLike Sublime
Ctrl RRedoLike no other, remember as Redo
Editing--------------------
TabIndentLike Sublime
Shift TabUnindentLike Sublime
Ctrl FFindLike Sublime, remember as FInd
Ctrl HSearch and ReplaceLike Sublime
Ctrl GSearch and Replace on the lineUseful when duplicating a line and editing the new one
PageUpMove the line upUsefull function so dedicated key (don't trust me ? Try it.) Ctrl is a booster too!
PageDownMove the line downSame as above
Ctrl KDelete the whole line/blockLike in nano, inspired by Sublime too, remember as Kill the line
Ctrl QDuplicate the line/blockRemember as "dupliqate"?
Ctrl LClear/Delete all linesLike in a shell, remember as Clear
Ctrl DDelete char from the left, as DelLike in a shell, remember as Delete
Ctrl NAutocomplete wordDefault VIM mapping but interesting one
Ctrl \Comment/UncommentDepends on filetype
Vital--------------------
Ctrl SSaveLike Sublime, remember as Save
Ctrl CQuitLike in a shell
Miscellaneous--------------------
F2Set paste toggleWith paste on you can paste more easily
F3Show line numbers toggleShow or hide line numbers
F4Panic Button! Toggle garbage screenRemember as "I need to alt-F4!"
F6Toggle color column at 80th charA visual helper to write clean code

Mappings in Explorer

KeysActionComments
Ctrl OOpen the ExplorerRemember as Open
Enter or Right ArrowEnter a file/dirEasy one
Left ArrowGo up a dirEasy one too
lDisplay info on file/dirRemember as ls
nOpen a menu to make an action (Create file/dir, Rename, Delete)Remember as ... New action?
aToggle 'Show Hidden files only, Show All, Hide hidden files (default)'Default mapping
Ctrl CQuitLike in a shell

Custom commands

You can enter those command in normal mode.

CmdAction
:UndoCloseTabReopen the last close buffer/tab in a new tab
:RemoveTrailingSpacesRemove the unwanted spaces at the end of lines

How to add plugins to MiniVim

The automated setup source in the main Vim configuration file (.vimrc) MiniVim. This means that you have a clean and standard .vimrc.

To keep MiniVim, don't delete the source [...]/MiniVim instruction in the .vimrc file.

To add plugins, simply follow the plugin's instructions. You should manage them with a plugin manager as Vundle or the old Pathogen.

How to use MiniVim with sudo

First, you could install MiniVim as root. Or better soft link your .vimrc. But it's sometimes not the best solution, like in a company where the root user is shared.

So, you can configure your system to use MiniVim when you sudo vim [file]. There are 2 solutions :

How to update MiniVim ?

First, you have to fetch the latest MiniVim. If you had cloned the repo, simply git pull. Else, re-download the lastest version on GitHub.

If you setup MiniVim automatically, simply re-run the installer. It will take care of everything.

If not, copy again the vimrc file to ~/.vimrc

Other info

The file is heavily commented. You're welcome to open, read and change what you want. It's easy.

Changelog

1.5.1

1.5

1.4

1.3.3

1.3.2

1.3.1

1.3

1.2

1.1

1.0

Initial release.