132 lines
3.9 KiB
Markdown
132 lines
3.9 KiB
Markdown
## Table of Contents
|
|
|
|
- [Why VimsCode](#why-vimscode)
|
|
- [About](#about)
|
|
- [Quick Start](#quick-start)
|
|
- [Docs](#docs)
|
|
- [Bug](#bug)
|
|
|
|
## Why VimsCode
|
|
|
|
### VimsCode, it's beautiful
|
|
|
|
To write or edit computer code, program an arduino etc... we use IDE (integrated development environment)
|
|
Many very complete graphic software exist to do that like VScode from microsoft or Atom.
|
|
|
|
So why not use them ?
|
|
|
|
**drawbacks :**
|
|
|
|
* They are resource intensive, lots of RAM (~1.3 GB, about 18,000 times more than the Apollo 11 mission that sent the first men to the moon :/ )
|
|
* They are quite difficult to debug because of the large abstraction layers that make them up
|
|
* They don't work without a graphical system (through ssh, on a server or a Raspberry Pi)
|
|
* It is sometimes difficult to make them do something simple if it was not planned by the developers
|
|
* Its frequent updates sometimes impose changes in working habits (new interfaces, new default configuration, new paths etc.)
|
|
|
|
So which solution? We suggest you use one of the historical command line text editors (vi, Vim) to make your own IDE :)
|
|
|
|
**Advantages :**
|
|
|
|
* Lightweight, ~15Kb which is 4.6 x less than Apollo 11 and 83000 times less than VSCODE!!!
|
|
* Configurable, you can configure everything in text files from already shared and popular configurations
|
|
* Stable, it only evolves without breaking the ergonomic continuity (always the same commands and shortcuts since 1991 for vim and 1976 for vi :) same for the configurations which remain valid since the beginning...)
|
|
* Usable through SSH on servers or very light computers (Raspberry Pi, etc.)
|
|
* Rock solid, crashes must exist, but I've never even heard of them
|
|
|
|
## About
|
|
|
|
VimsCode is an IDE with vim for beginner or expert :
|
|
|
|
* VimsCode use arduino-cli, idf-esp and platform.io-cli for remplace VScode only in terminal
|
|
* Very easy to use
|
|
* Very easy to install
|
|
|
|
![Example-picture](/pictures/image.png)
|
|
|
|
## Quick Start
|
|
|
|
### Introduction :
|
|
|
|
Installation requires :
|
|
```
|
|
sudo apt update
|
|
sudo apt install git elinks
|
|
```
|
|
|
|
### Set up VimsCode :
|
|
|
|
|
|
After clone don't forgot to rename "vimrc-conf" -> ".vimrc" and "/vim-conf" -> "/vim" :
|
|
|
|
```
|
|
git clone https://git.cohabit.fr/bastien/VimsCode.git
|
|
cd vimscode
|
|
mv vim-conf .vim && mv .vim ~/
|
|
mv vimrc-conf .vimrc && mv .vimrc ~/
|
|
git clone https://github.com/VundleVim/Vundle.vim.git
|
|
```
|
|
|
|
### Alias
|
|
|
|
Edit your bashrc or zshrc with this ligne :
|
|
```
|
|
alias vimscode="~/.vim/vimscode.sh"
|
|
```
|
|
|
|
### Install Plugins :
|
|
|
|
Launch `vim` and run `:PluginInstall`
|
|
|
|
If you have 1 error with vim-colorschemes, its totally normal, because your vimrc use theme but you dont have load this theme.
|
|
|
|
## Docs
|
|
|
|
### Short-cute VimsCode :
|
|
|
|
This short-cute are totally switchable in .vimrc.
|
|
|
|
```
|
|
"F2" Shows a vim note
|
|
"F3" Shows the tree structure
|
|
"F4" Shows the history of changes made
|
|
"F5" Shows a terminal at the bottom
|
|
"F6" Allows scrolling in the terminal
|
|
"F7" Brings up a help site for vim and terminal
|
|
"F8" created a new vim tab
|
|
"F9" navigate between vim tabs
|
|
```
|
|
|
|
* Shortcut to a duckduckgo search, you must be in visual mode and select the desired word.
|
|
* You can change the hight of window with mouse.
|
|
|
|
Finally you can run vimscode :
|
|
```
|
|
vimscode -esp "file" # for ESP ide
|
|
vimscode -a "file" # for Arduino ide
|
|
vimscode -p "file" # for platform.io ide
|
|
```
|
|
|
|
If you want change theme of vimscode, you can just change this line :
|
|
```
|
|
colorscheme space-vim-dark
|
|
colorscheme cool
|
|
colorscheme elda
|
|
colorscheme space-vim-dark
|
|
colorscheme black_angus
|
|
```
|
|
And other theme : [Theme](https://github.com/flazz/vim-colorschemes/tree/master/colors)
|
|
|
|
|
|
### More Doc :
|
|
|
|
[Documentation](https://projets.cohabit.fr/redmine/projects/accueil/wiki/Documentation_IDE_Vim)
|
|
|
|
## Bug
|
|
|
|
If you have "mouse=a" and the "clipboard" option is not included in your Vim, install the vim-gtk package and then you can copy WITH Vim a selecte text and paste it with "Ctrl-v" to an internet browser.
|
|
|
|
To find out if you have the option :
|
|
```
|
|
vim --version | grep clipboard
|
|
```
|