VimsCode/README.md

130 lines
4 KiB
Markdown
Raw Normal View History

2023-05-03 13:08:46 +02:00
## Table of Contents
2023-05-03 12:22:24 +02:00
2023-05-22 16:52:45 +02:00
- [Why VimsCode](#why-vimscode)
2023-05-03 13:08:46 +02:00
- [About](#about)
- [Quick Start](#quick-start)
2023-05-23 11:26:12 +02:00
- [Documentation](#documentation)
2023-05-25 11:10:26 +02:00
- [Troubleshooting](#troubleshooting)
2023-05-03 12:22:24 +02:00
2023-05-22 11:51:14 +02:00
## Why VimsCode
2023-05-22 10:18:53 +02:00
2023-05-23 11:21:53 +02:00
### VimsCode, it's beautiful :
2023-05-22 10:56:22 +02:00
2023-05-22 11:51:14 +02:00
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.
2023-05-22 10:18:53 +02:00
2023-05-22 11:51:14 +02:00
So why not use them ?
2023-05-22 10:18:53 +02:00
2023-05-22 11:51:14 +02:00
**drawbacks :**
2023-05-22 11:15:01 +02:00
2023-05-22 11:51:14 +02:00
* 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.)
2023-05-22 10:18:53 +02:00
2023-05-22 11:51:14 +02:00
So which solution? We suggest you use one of the historical command line text editors (vi, Vim) to make your own IDE :)
2023-05-22 10:18:53 +02:00
2023-05-22 11:14:10 +02:00
**Advantages :**
2023-05-22 11:15:01 +02:00
2023-05-22 11:16:12 +02:00
* Lightweight, ~15Kb which is 4.6 x less than Apollo 11 and 83000 times less than VSCODE!!!
2023-05-22 11:20:22 +02:00
* 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
2023-05-22 10:18:53 +02:00
2023-05-22 10:50:47 +02:00
## About
2023-05-22 10:18:53 +02:00
2023-05-22 11:51:14 +02:00
VimsCode is an IDE with vim for beginner or expert :
2023-05-22 10:56:22 +02:00
2023-05-22 11:51:14 +02:00
* VimsCode use arduino-cli, idf-esp and platform.io-cli for remplace VScode only in terminal
* Very easy to use
* Very easy to install
2023-05-22 10:38:34 +02:00
2023-05-22 11:51:14 +02:00
![Example-picture](/pictures/image.png)
2023-05-03 12:22:24 +02:00
2023-05-12 15:32:04 +02:00
## Quick Start
2023-05-03 13:08:46 +02:00
2023-05-22 11:51:14 +02:00
### Introduction :
2023-05-22 17:32:39 +02:00
Installation requires :
2023-05-22 16:11:32 +02:00
```
sudo apt update
2023-05-22 17:34:55 +02:00
sudo apt install git elinks
2023-05-22 16:11:32 +02:00
```
2023-05-22 11:51:14 +02:00
### Set up VimsCode :
2023-05-03 13:08:46 +02:00
2023-05-22 13:25:00 +02:00
2023-05-22 17:28:34 +02:00
After clone don't forgot to rename "vimrc-conf" -> ".vimrc" and "/vim-conf" -> "/vim" :
2023-05-03 13:08:46 +02:00
2023-05-22 13:25:00 +02:00
```
2023-05-22 17:28:34 +02:00
git clone https://git.cohabit.fr/bastien/VimsCode.git
2023-05-22 13:25:00 +02:00
cd vimscode
mv vim-conf .vim && mv .vim ~/
mv vimrc-conf .vimrc && mv .vimrc ~/
2023-05-23 10:38:32 +02:00
cd ~/.vim/bundle/ && git clone https://github.com/VundleVim/Vundle.vim.git
2023-05-22 13:25:00 +02:00
```
2023-05-23 11:21:53 +02:00
### Alias :
2023-05-22 16:08:40 +02:00
2023-05-23 11:10:00 +02:00
When you load vim, you have 1 error with vim-colorschemes, its totally normal, because your vimrc use theme but you dont have load this theme.
2023-05-23 10:49:36 +02:00
Edit your bashrc or zshrc and copie/paste this ligne at the end :
2023-05-22 16:08:40 +02:00
```
2023-05-23 10:49:36 +02:00
vim ~/.zshrc or vim ~/.bashrc
2023-05-22 16:08:40 +02:00
alias vimscode="~/.vim/vimscode.sh"
```
2023-05-22 11:51:14 +02:00
### Install Plugins :
2023-05-03 13:08:46 +02:00
2023-05-22 11:51:14 +02:00
Launch `vim` and run `:PluginInstall`
2023-05-03 13:08:46 +02:00
2023-05-23 11:26:12 +02:00
## Documentation
2023-05-03 13:08:46 +02:00
2023-05-22 11:51:14 +02:00
### Short-cute VimsCode :
2023-05-15 12:45:03 +02:00
2023-05-22 17:55:31 +02:00
This short-cute are totally switchable in .vimrc.
2023-05-22 17:32:39 +02:00
2023-05-22 16:43:10 +02:00
```
"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
2023-05-23 17:28:58 +02:00
Double tap "F10" close vimscode
2023-05-22 16:43:10 +02:00
```
2023-05-23 11:10:00 +02:00
* Shortcut in visual mode, when you highlight a word, do a duckduckgo search, on press "g".
2023-05-22 17:36:26 +02:00
* You can change the hight of window with mouse.
2023-05-22 16:56:13 +02:00
2023-05-23 11:10:00 +02:00
Finally you can run vimscode with this alias :
2023-05-22 16:56:13 +02:00
```
2023-05-23 11:21:53 +02:00
vimscode -e "file" # for ESP ide
2023-05-22 16:56:13 +02:00
vimscode -a "file" # for Arduino ide
vimscode -p "file" # for platform.io ide
2023-05-24 11:26:20 +02:00
vimscode # help vimscode
2023-05-22 16:56:13 +02:00
```
2023-05-15 12:45:03 +02:00
2023-05-22 17:50:51 +02:00
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)
2023-05-22 11:51:14 +02:00
### More Doc :
2023-05-15 12:45:03 +02:00
2023-05-22 17:52:01 +02:00
[Documentation](https://projets.cohabit.fr/redmine/projects/accueil/wiki/Documentation_IDE_Vim)
2023-05-22 16:51:29 +02:00
2023-05-25 11:05:16 +02:00
## Troubleshooting
For troubleshooting and common problems see [TROUBLESHOOTING](https://git.cohabit.fr/bastien/VimsCode/wiki/Troubleshooting).