Skip to content

Latest commit

 

History

History
489 lines (254 loc) · 17.1 KB

README.en.md

File metadata and controls

489 lines (254 loc) · 17.1 KB

Vim-Fast

  • A super fast Vim configuration script

producer

chenxuan

'       _            __          _   '
'      (_)          / _|        | |  '
'__   ___ _ __ ___ | |_ __ _ ___| |_ '
'\ \ / / | "_ " _ \|  _/ _" / __| __|'
' \ V /| | | | | | | || (_| \__ \ |_ '
'  \_/ |_|_| |_| |_|_| \__,_|___/\__|'

warehouse address

  1. gitee:vim-fast: A easy vim config

  2. github:GitHub - chenxuan520/vim-fast

allocation effect

opening effect

edit effects

Why make

  • I've been usingVimplus, but there are a few issues with Vimplus.

    1. Vimplus hasn't been updated for a long time, quite a few issues haven't been resolved

    2. Currently the mainstream completion scheme is lsp,Vimplus uses YCM a bit old, and need to compile their own

    3. Some plugins already have a better alternative

    4. Github access is too slow, resulting in plug-ins download too slow, unfriendly to novices

  • for other configurations,

    • Some have github access problems, are not friendly to VIM novices, and are not friendly enough to server configuration

    • Some are too complex, so that the basic configuration file and the original.vimrc are too far apart, and even use different format configuration files, which makes it troublesome to customize VIM later, and too redundant.

    • Some use lua completely, making VIM incompatible.

    • Some use too many files and structures and are not friendly to novices

  • So based on that, I wanted to build on Vimplus and make it better.

project characteristics

  1. Normal 3 minutes to install VIM configuration from new Linux host (including lsp etc.), 3 minutes to solve all problems

  2. Based on Vimplus, all configuration files are in.vimrc, more than 1100 lines of configuration files are simpler and intuitive, and multiple configuration files are avoided.

  3. Plug-ins streamlined, selected 23 plug-ins, so that the opening speed has been improved (plug-in version about 130ms, no plug-in version about 20ms)

  4. Plug-in compression package on gitee, so that plug-in download speed has been improved, novice-friendly, shell script to provide a one-click configuration plug-in

  5. Added function-based shortcut key lookup to avoid shortcut key forgetfulness, opened via<space>H

  6. Improved mouse support to make novice friendly

  7. Support C/C++,Go,Python,Rust language one-click configuration (welcome to add more language support)

  8. Use coc instead of YCM for better completion experience

  9. Support for more diverse themes (more than 10), better visual experience (default tokyonight)

  10. Provide shell scripts to customize Vim

  11. Project Chinese documentation detailed, more novice friendly

  12. Built-in a simple and complete task management system, easy to establish a one-click compilation and operation system

  13. One-click download configuration of VIM manual in Chinese(based on Vimcdoc)

  14. Built-in markdown shortcut plugin

  15. markdown file provides ibus input method switching operation (default), preview markdown(default)

  16. Integration with ici and lazygit,fzf,lf, translation and git management, file management without additional plug-ins

  17. Built-in a simplified version of Vimrc without plugins, no plugins or root privileges can also be used

  18. Collapsing function configured to make code browsing easier

  19. Built-in convenient vimscript for easy learning and simplified operation

Built-in Vimscript functionality

  1. Select full text, similar plug-insVim-textobj-entire

  2. markdown, shortcut writing, formatting,plug-in like vim-markdown

  3. Task management, similar to pluginasynvtasks

  4. git status display, similar to pluginvim-gitgutter

  5. Prepare-code insertion, similar to plug-inprepare-code

  6. parameter selected, similar to plug-invim-textobj-parameter

  7. Highlight, similar to pluginvim-textobj-syntax

  8. indented selected, similar to pluginvim-textobj-indent

  9. ibus input method automatic switching, similar to plug-invim-ibus

  10. lazygit and Vim integration, works better, similar to the pluginlazygit.nvim

  11. lf and vim integration, similar to pluginlf.vim

  12. ici translation, similar to pluginici.vim

  13. Color visualization, similar to plugincolorizer

  14. Binary file editing, similar to pluginVinarise

  15. Multi-cursor editing, similar to plug-insvim-multiple-cursors

  16. editorconfig support, similar to plug-ineditorconfig-vim

  17. Query whether keys are bound and where they are bound,<leader>h and-h trigger detection

  18. mdbook directory automatically generated

  19. View and open recently closed buffers

  20. Simple markdown and html preview

  21. Fzf calls

  • Description: All of the above features are built into Vim-fast and do not affect Vim startup speed.

project folder

  • autoload plug-in plug.vim, provides plug-in installation

  • fonts folder, pre-download, reduce download time

  • colors theme folder, offering more than 10 themes

  • doc Help Documentation

  • vimscript Some useful VIM scripts

  • old Vimplus old files (not recommended, reference only)

Shell script

  • install.sh install script, run first, install vim-fast

  • install_without_sudo.sh installed without root and sudo

  • update.sh Pull vim-fast latest configuration

  • uninstall.sh uninstall vim-fast

  • shell/cpp/go/rust/python.sh lsp and coc installation in four languages, run install.sh and call on demand

  • shell/plug.sh Download and install all the latest plugins (, auto-invoke, use gitee, faster)

  • shell/doc_zh.sh Download and install vim Chinese documentation

  • shell/self.sh customize the name and email in.vimrc to your own

  • shell/nodejs.sh nodejs installation script, which automatically calls

  • shell/color.sh Add a Vim theme

  • shell/coc_plug.sh Recommended coc plugin installation

  • shell/vim_compile.sh vim latest version compile install

  • nvim.sh One-click migration to nvim

other documents

  • .vimrc VIM Profile

  • vimrc-no-plug VIM configuration without plugins and themes

item description

  1. ! Currently only supports ubuntu,debian, and other ubuntu linux(such as debian,linux mint, etc.),mac support may not be perfect, other systems can use vimplus!, At the same time, I hope that everyone can propose mr to improve the warehouse, or propose a system for issue specification requirements.

  2. The project is based onVimplus

  3. If you encounter a problem, please read the QA section of this article first. If you can't solve it, raise an issue or contact the author.

  4. Vim version 8.1 or above

  5. If there is a problem other than QA, give priority to whether it is a nodejs version problem, after testing v18.13.0 version is no problem,refer to

Videos and Articles

installation

The first and second steps can be simplified to

curl https://gitee.com/mirrorvim/vim-fast/raw/master/shell/webinstall.sh |bash

(After installation, if you encounter a problem with output confusion, you can directly close the terminal and restart it)

  1. git clone https://gitee.com/mirrorvim/vim-fast

  2. cd vim-fast && ./ install.sh (sudo is not required,sudo will make the file location wrong)

  3. Press Enter when it appears

  4. The following figure appears, installation is complete

  5. Execute different scripts for different languages

C++/C

  1. ./ shell/cpp.sh

  2. The following figure appears. Configuration is successful.

Python

Note:node needs to be above 14, use node --version to view node version, if the version is too low, refer tothis article to solve

  1. ./ shell/python.sh

  2. This is a successful Python installation.

Go

  1. ./ shell/go.sh

  2. When you first edit a file, you need to wait for a while to download it, about two minutes.

  3. This is a successful installation.

Rust

  1. ./ shell/rust.sh

  2. Wait for the installation to finish (about one minute), if no rust environment exists it will download automatically

Easy to install plug-in free version

curl https://gitee.com/mirrorvim/vim-fast/raw/master/shell/websimple.sh | bash

  • or

wget https://gitee.com/mirrorvim/vim-fast/raw/master/vimrc-no-plug -O ~/.vimrc

No plug-in version description

  1. The plug-in-free version has only one file (vimrc) and does not create any other files, so you can copy and paste files directly (./ vimrc-no-plug) to ~/.vimrc

  2. Built-in plugins have easy-motion,vim-surround,vim-commentary,auto-pair,vim-slash,vim-airline most of the functions

  3. Built-in tokynight color theme, and all custom button functions with plug-in version

  4. If fzf is installed, it has most of the features of leaderf

update

  • ./ update.sh

uninstall

  • ./ uninstall.sh

External tool integration

  1. lazygit, lazygit needs to be installed, so that shell can be called directly from shell. Press space +g to trigger

  2. ici Translatepip install ici, and modify the path to ici in.vimrc, press, i in normal mode or visual mode to translate the word

  3. fzf File Search,sudo apt install fzf,<space>z/Z trigger

  4. lf File Manager, lf,<space>e/E trigger needs to be installed

Vimplus former warehouse

Vimplus

QA

  1. Is there an NVIM version?

    • nvim can be installed via nvim.sh, configuration compatible
  2. My system has no support.

    • You can submit an issue or make your own mr
  3. PlugInstall appears# unsafe repository git config --global --add safe.directory

    • git config --global --add safe.directory "*"
  4. xshell,tmux open color confusion

    • xshell "Tools"->"Options"->"Advanced"->"Use Color", restart xshell after opening

    • tmux can only switch theme to onedark at present, and turn off termguicolors, set let g:onedark_termcolors=256

  5. Do you need root or sudo privileges?

    • If vim-fast has been installed before this machine or the corresponding software has been installed, sudo is not required, otherwise sudo is required to install the software package.

    • If you don't have root privileges, you can run./ install_without_sudo.sh, but some features may not

  6. I want to customize dashboard content when Vim starts

  7. E1208: -complete used without allowing arguments Press ENTER or type command to continue

    • Go to the coc.nvim plugin directory and git reset --hard v0.0.81

    • Or edit the error file coc.vim, delete line 438 or

  8. Vim specific file pre-generated code I want to modify

    • Find the folder corresponding to the file in~/.vim/ftplugin/template, and modify the contents of the file
  9. Console status bar and icon confusion

  • Set font for console

    • linux

      1. Open Terminal Preferences

      2. Set font toDroidSansMono Nerd Font Book

    • mac(iterm2)

      1. Open the fonts folder (in the project root directory) and double-click the DejaVu.ttf file to install the font

      2. Open Item2 -> setting -> profile -> text -> font

      3. Set font toDejaVvSansMona Nerd Font

  • If you don't want to set it or can't set it, you can choose to disable icon function

    1. Comment the following code, if it is still garbled after execution, change the similar in the following code to a space
    let g:airline_left_sep = ''
    let g:airline_left_alt_sep = ''
    let g:airline_right_sep = ''
    let g:airline_right_alt_sep = ''
    
    1. Comment on the linePlug 'ryanoasis/vim-devicons'

    2. Addlet g:dashboard_icon_disable=1to ~/.vimrc

  1. E117, undefined function getenv appears
  • The reason for the problem is that the VIM version is too low, you can upgrade VIM(./ shell/vim_compile.sh Latest Vim installation) or go to the line in question and delete the line
  1. Theme used
  1. There is no more cursor after ctrl-s, but it is stuck
  • Terminal settings problem,stty -ixon added to ~/.bashrc, and then re-open the terminal load can be
  1. Error installing nodejs, unable to connect download
  • Re-run./ shell/nodejs.sh
  1. backspace using vim in xshell cannot delete characters
  1. nvim cannot use the system pasteboard
  • Runsudo apt install xclip,see

help

  1. Plugin shortcut key description(may be partially outdated, recommended to use<space>H view)

  2. Vim Some Keys Help

feedback

  • Bugs or problems can be raised using github or gitee issues

  • Or contact me directly by adding Q1607772321

hope

  • Due to personal capacity is limited, I hope you can give their own system to write an install.sh, and then mention mr, thank you very much

PostScript

  • Using VIM shouldn't really be an IDE out of the box, but the lack of an interface at first discourages most people, so I built this repository to take you to an IDE in the least amount of time, but keep the configuration file as simple as possible.

  • When you are familiar with VIM, you may feel that the shortcut keys I set are anti-human. At that time, you can customize everything yourself. Everything in VIM can be customized. When you edit.vimrc yourself,VIM will become your most suitable weapon.


Vim learning materials recommended


Vim Learning Route Recommendations

  1. Find a reason to use VIM (or else you won't)

    • Find the simplest VIM tutorial (likethis one) and use VIM as a regular editor
  2. Find a simple (very important) and out-of-the-box configuration (like this repository)Video

    • Apply VIM to everyday life

    • Wait until you use it to a certain extent to watch VIM videos

  3. Read vimrc configuration content (controllability)video

    • Start reading VIM books
  4. Start customizing your own VIM

    • Understanding vimscript simple syntax configuration


  • If this warehouse is useful to you, you can give it a star.