{"id":13850496,"url":"https://github.com/sd65/MiniVim","last_synced_at":"2025-07-12T22:30:45.106Z","repository":{"id":70057638,"uuid":"52529854","full_name":"sd65/MiniVim","owner":"sd65","description":"My way to see Vim.","archived":false,"fork":false,"pushed_at":"2019-08-02T18:33:15.000Z","size":119,"stargazers_count":258,"open_issues_count":1,"forks_count":19,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-08-05T20:32:43.416Z","etag":null,"topics":["sublime-text","vimrc"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sd65.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-02-25T14:14:14.000Z","updated_at":"2024-06-19T13:38:44.000Z","dependencies_parsed_at":"2023-06-05T07:15:25.563Z","dependency_job_id":null,"html_url":"https://github.com/sd65/MiniVim","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sd65%2FMiniVim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sd65%2FMiniVim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sd65%2FMiniVim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sd65%2FMiniVim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sd65","download_url":"https://codeload.github.com/sd65/MiniVim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225839518,"owners_count":17532305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sublime-text","vimrc"],"created_at":"2024-08-04T20:01:14.890Z","updated_at":"2024-11-22T03:31:29.831Z","avatar_url":"https://github.com/sd65.png","language":"Vim script","readme":"# MiniVim\n\n*Click to launch a YouTube video demo:*\n\n[![A screenshot](https://raw.githubusercontent.com/sd65/MiniVim/master/Screenshot.png)](https://www.youtube.com/watch?v=n0h_3e0FfYk)\n\nA longer and more up to date demo is available here : [Demo](https://youtu.be/3kX7GdCIjrk)\n\n## Goals\n\n- Mimic Sublime Text / Shell key mappings\n- Minimal: one file, **no plugin needed!**\n\n## Automated setup\n\n- Clone this repo to the folder of your choice:\n\n`git clone https://github.com/sd65/MiniVim.git`\n\n- Go inside this repo:\n\n`cd MiniVim`\n\n- Launch the install script and follow the instructions:\n\n`./install.sh`\n\n- It's ready! :smile: Launch Vim:\n\n`vim`\n\n## Manual setup\n\nIf you can't clone the repo and do the above steps, just download the .vimrc to your home dir (backup your current .vimrc before).\n\n`wget https://raw.githubusercontent.com/sd65/MiniVim/master/vimrc -O ~/.vimrc`\n\nAnd 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.\n\n## How to use\n\n- **The key mappings can be used in Insert, Normal and Visual mode (yes, no need to exit Insert or Visual mode)**\n- The mouse can be used in Normal and Visual mode to scroll, select, change tab and more.\n- There are clear visual hints on which mode you currently using. Like pink=normal, blue=insert and green=visual...\n\n### General Mappings\n\n**You hate those mappings? No problem, change this in your .vimrc : `UseCustomKeyBindings=0`.**\n\nKeys | Action | Comments         \n| :---: | :---: | :---: |\n| **Moving** | **----------** | **----------**\n`Arrows` | Move the cursor | Like every editor\n`Ctrl Arrows` | Move the cursor *fast*. | Ctrl is a booster!\n`Ctrl A` | Go to the beginning of the line | As in Nano/Shell\n`Ctrl E` | Go to the end of the line | As in Nano/Shell, remember as **E**nd\n`Home` | Go to the beginning of the file | Self explanatory\n`End` | Go to the end of the file | Self explanatory too \n| **Tabs** | **----------** | **----------**\n`Ctrl T` | Open a new tab | Like Sublime, remember as **T**ab\n`Alt Arrows` | Switch between tabs. | `Ctrl Tab` cannot be mapped...\n| **History** | **----------** | **----------**\n`Ctrl Z` | Undo | Like Sublime\n`Ctrl R` | Redo | Like no other, remember as **R**edo\n| **Editing** | **----------** | **----------**\n`Tab` | Indent | Like Sublime\n`Shift Tab` | Unindent | Like Sublime\n`Ctrl F` | Find | Like Sublime, remember as **F**Ind\n`Ctrl H` | Search and Replace | Like Sublime\n`Ctrl G` | Search and Replace on the line | Useful when duplicating a line and editing the new one\n`PageUp` | Move the line up | Usefull function so dedicated key (don't trust me ? Try it.) Ctrl is a booster too!\n`PageDown` | Move the line down | Same as above             \n`Ctrl K` | Delete the whole line/block | Like in nano, inspired by Sublime too, remember as **K**ill the line\n`Ctrl Q` | Duplicate the line/block | Remember as \"dupli**q**ate\"?\n`Ctrl L` | Clear/Delete all lines | Like in a shell, remember as C**l**ear\n`Ctrl D` | Delete char from the left, as `Del` | Like in a shell, remember as **D**elete\n`Ctrl N` | Autocomplete word | Default VIM mapping but interesting one \n`Ctrl \\` | Comment/Uncomment | Depends on filetype\n| **Vital** | **----------** | **----------**\n`Ctrl S` | Save | Like Sublime, remember as **S**ave\n`Ctrl C` | Quit | Like in a shell\n| **Miscellaneous** | **----------** | **----------**\n`F2` | Set paste toggle | With paste on you can paste more easily\n`F3` | Show line numbers toggle | Show or hide line numbers\n`F4` | Panic Button! Toggle garbage screen | Remember as \"I need to alt-**F4**!\"\n`F6` | Toggle color column at 80th char | A visual helper to write clean code\n\n### Mappings in Explorer\n\nKeys | Action | Comments\n| :---: | :---: | :---: |\n`Ctrl O` | Open the Explorer | Remember as **O**pen\n`Enter` or `Right Arrow` | Enter a file/dir | Easy one\n`Left Arrow` | Go up a dir | Easy one too\n`l` | Display info on file/dir | Remember as **l**s\n`n` | Open a menu to make an action (Create file/dir, Rename, Delete) | Remember as ... **N**ew action?\n`a` | Toggle 'Show Hidden files only, Show All, Hide hidden files (default)' | Default mapping\n`Ctrl C` | Quit | Like in a shell\n\n### Custom commands\n\nYou can enter those command in normal mode.\n\nCmd | Action\n| :---: | :---:\n`:UndoCloseTab` | Reopen the last close buffer/tab in a new tab\n`:RemoveTrailingSpaces` | Remove the unwanted spaces at the end of lines\n\n## How to add plugins to MiniVim\n\nThe [automated setup](#automated-setup) source in the main Vim configuration file *(.vimrc)* MiniVim.\nThis means that you have a clean and standard .vimrc. \n\n**To keep MiniVim, don't delete the `source [...]/MiniVim` instruction in the .vimrc file.**\n\nTo add plugins, simply follow the plugin's instructions. You should manage them with a plugin manager as [Vundle](https://github.com/VundleVim/Vundle.vim) or the old [Pathogen](https://github.com/tpope/vim-pathogen).\n\n## How to use MiniVim with *sudo*\n\nFirst, you could install MiniVim as root. Or better soft link your .vimrc.\nBut it's sometimes not the best solution, like in a company where the root user is shared.\n\nSo, you can configure your system to use MiniVim when you `sudo vim [file]`.\nThere are 2 solutions :\n- `sudo -E vim [file]` as `-E ` preserve your existing environment variables (as $HOME here and therefore your ~/.vimrc).\n- `sudoedit [file]` or `sudo -e [file]` (synonyms). To use this, you must have set your `$EDITOR` environment variable. Then, this command will make a copy of the designated file and you will edit the copy. Note that the original file will only be modified when you exit your editor ! \n\n## How to update MiniVim ?\n\nFirst, you have to fetch the latest MiniVim. If you had cloned the repo, simply `git pull`. Else, re-download the lastest version on GitHub.\n\nIf you setup MiniVim automatically, simply re-run the installer. It will take care of everything.\n\nIf not, copy again the vimrc file to `~/.vimrc`\n\n## Other info\n\nThe file is **heavily** commented. You're welcome to open, read and change what you want. *It's easy.*\n\n- Work with Vim and GVim.\n- Please keep in mind that some keys **cannot** be mapped as `Ctrl Shift Something` or `Ctrl Tab` because of Terminals limitations. I have to compose with this :confused: **If you're on Windows with Putty or similar, you may experience problems because of key codes.** [Look at this tip for PuTTY numeric keypad problems](http://vim.wikia.com/wiki/PuTTY_numeric_keypad_mappings) and [this one for other mappings that doesn't work](http://unix.stackexchange.com/questions/1709/how-to-fix-ctrl-arrows-in-vim).\n- The color scheme is based on [https://github.com/sickill/vim-monokai](Monokai).\n- Smart Paste system is based on [https://github.com/ConradIrwin/vim-bracketed-paste](ConradIrwin/vim-bracketed-paste).\n- In the bottom right-hand corner, you have numbers `115/142(90%)-10`. Line `115`, total lines `142`, position at 90% in the file and column `10`.\n- Tabulations will be expanded into two spaces, the default indent size.\n- UTF-8 by default.\n- Backups and Swapfiles are stored in `$HOME/.vim/`.\n- Pressing Enter, Space or Backspace in normal mode will enter insert mode and do action.\n- When re-opening a file, Vim will remember the last position.\n- When opening multiple file (as `vim file1 file2`), Vim will open those files in new tabs automatically.\n\n## Changelog\n\n### 1.5.1\n\n- Fix a bug where the terminal back buffer was mangled after exiting Vim\n\n### 1.5\n\n- Change the terminal title to the current edited file\n- Faster color mode changes\n\n### 1.4\n\n- Comment \u0026 Uncomment feature\n- Improve block move Up/Down\n- Minor bug fixes\n\n### 1.3.3\n\n- Smart paste\n- The default mode is \"Normal\"\n\n### 1.3.2\n\n- Configuration is kept in .vimrc to persist between updates\n- Better README\n\n### 1.3.1\n\n- New clean install with the [automated setup](#automated-setup)\n- Small fixes\n\n### 1.3\n\n- Custom save function\n- Complete words containing a dash\n- Replace on the line\n- Better cursor position after duplicating a block\n- Added percentage in statusline\n- Added the 'Remove Trailing Spaces' function\n- Small fixes and typos fixed\n\n### 1.2\n\n- Fix the visual block mode\n- Fix the incremental search\n- Install.sh is now POSIX\n- Fixed typos\n\n### 1.1\n\n- Better code organisation\n- Toggle custom key bindings easily\n- Toggle 80th column char\n- Open file browser in new tab only if tab is empty\n- Fix typos\n\n### 1.0\n\nInitial release.\n","funding_links":[],"categories":["Vim script"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsd65%2FMiniVim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsd65%2FMiniVim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsd65%2FMiniVim/lists"}