This is how to install VIM and configure vimrc files.
Install1
-
Install the latest version of VIM
- For Windows, find VIM in vim release page.
- For Linux, run the following command to update VIM.
sudo add-apt-repository ppa:jonathonf/vim sudo apt update sudo apt install vim vim --version
-
Install NodeJS in NodeJS download page.
-
Install plugin manager
vim-plug
.- For Windows, open command line in directory
the_folder_vim_is_installed\vim90\autoload
, run the command below.curl -fLo plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- For Linux, run the command below to download the
plug.vim
into the directory~/.vim/autoload
.curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- For Windows, open command line in directory
-
Clone the repo.
- For Windows, install git in git download page, open command line in directory
C:\User\[username]\
. Run the command below.git clone https://github.com/Gavin-OP/vimrc.git
- For Linux, don't clone the repo, just create a
.vimrc
file in~
, and copy the_vimrc_linux
into the Linux.vimrc
file.
- For Windows, install git in git download page, open command line in directory
-
Change the default path of
_vimrc
file.- For Windows, open command line in directory
the_folder_vim_is_installed\
, open_vimrc
file usingvim _vimrc
, and add the following code.source $HOME/vimrc/_vimrc
- For Linux, TBC
- For Windows, open command line in directory
-
Change the path for backup, swap, undo files.
- For Windows
- run the following command to create the folders.
mkdir .vim cd .vim mkdir .swp mkdir .undo mkdir .backup
- Make sure the path for
directory
,undodir
,backupdir
match the folder created above.
- run the following command to create the folders.
- For Linux,
- run the following command to create the folders.
mkdir .vim cd .vim mkdir .swp mkdir .undo mkdir .backup
- run the following command to create the folders.
- For Windows
-
Change the path for Python ddl file.
- For Windows, TBC
-
Install plug-in.2
- Randomly open a file using vim, install all the plug-in using
:PlugInstall
. - Randomly open a file using vim, set up
vim-copilot
using:Copilot setup
, check the status ofvim-copilot
using:Copilot status
.
- Randomly open a file using vim, install all the plug-in using
git status
git pull
git add [filename]
git commit -m "comment inside"
git push
- auto pair configuration error for > and etc.
- enable vim python support
- auto format python configuration
- plug-in
ctrl-p
Footnotes
-
Download curl in curl download page and put it in the computer path. (only for plug-in instant-markdown-preview) ↩
-
Install
instant-markdown-d
using[sudo] npm -g install instant-markdown-d
. (If using instant-markdown plugin) ↩