vim-bootstrap

editor-bootstrapMIT更新放缓

一条命令生成 Vim/Neovim 配置,按语言和插件自动拼好 vimrc,省去从零手写和拼装插件的时间。

Vim Bootstrap is a generator that provides a simple method of generating a configuration for vim / neovim.

v1.21.10发布于 2021-05-25 09:44 UTC2,087star207fork同步于 2026-11-07 07:32 UTC

怎么上手

从 README 代码块原样提取,可能是其中一种安装方式
brew install git ctags
pip install flake8 jedi
pip3 install --user --upgrade neovim
npm install -g elm-test
npm install -g elm-oracle
npm install -g elm-format@exp
硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

1 个版本v1.21.10
  1. v1.21.10最新正式版2021-05-25 · 2021-05-25 09:44 UTC

    这个版本没有写更新说明。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    vim-bootstrap

    Vim Bootstrap provides a simple method for generating .vimrc configuration files for Vim, NeoVim, NeoVim-Qt, MacVim and GVim.

    Want to generate your vim/neovim file? Access here!

    Pre-requisites

    The distribution is designed to work with Vim >= 8 and neovim.

    Mac OSX

    $ brew install git ctags
    

    Linux

    • Ubuntu\Debian
    $ sudo apt-get install git exuberant-ctags ncurses-term curl
    
    • Gentoo
    $ sudo emerge --ask dev-util/ctags sys-libs/ncurses dev-vcs/git dev-python/pyflakes net-misc/curl
    
    • Arch Linux via pacman
    $ sudo pacman -S git ctags ncurses curl
    
    • Fedora
    $ sudo dnf install ncurses-devel git ctags curl
    
    • openSUSE
    $ sudo zypper in ncurses-devel git ctags curl
    

    BSD

    • FreeBSD via packages collection
    # pkg install git p5-Parse-ExuberantCTags ncurses curl
    

    Python bundle (optionally)

    • pyflakes
    • jedi
    • neovim (neovim only)
    $ pip install flake8 jedi
    $ pip2 install --user --upgrade neovim
    $ pip3 install --user --upgrade neovim
    

    Elm bundle (optionally)

    • elm-test
    • elm-oracle
    • elm-format
    $ npm install -g elm-test
    $ npm install -g elm-oracle
    $ npm install -g elm-format@exp
    

    Rust

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    

    Installation

    • Download your own vimrc file at https://vim-bootstrap.com
    • Put your vimrc file into home folder or $XDG_CONFIG_HOME/nvim/init.vim if you use NeoVim

    vim: mv ~/Downloads/generate.vim ~/.vimrc

    neovim: mv ~/Downloads/generate.vim $XDG_CONFIG_HOME/nvim/init.vim

    • Execute ViM and it will install plugins automatically
    vim
    

    Fast-installation by URL parameters

    Vim-bootstrap generator can accept URL params via request as example below.

    curl 'https://vim-bootstrap.com/generate.vim' --data 'editor=vim&frameworks=vuejs&langs=javascript&langs=php&langs=html&langs=ruby' > ~/.vimrc
    

    Updating to the latest version

    :VimBootstrapUpdate (thanks to @sherzberg)
    :PlugInstall
    

    Offline usage

    You can run vim-bootstrap Go package to generate a vimrc file, just download it:

    go get github.com/editor-bootstrap/vim-bootstrap
    cd $GOPATH/src/github.com/editor-bootstrap/vim-bootstrap
    go build
    

    Inside vim-bootstrap folder cd vim-bootstrap use vim-bootstrap module (file) like this example:

    ./vim-bootstrap -langs=python,lua,ruby,javascript,haskell -frameworks vuejs -editor=vim > ~/.vimrc
    

    For more instructions run vim-bootstrap -h

    openSUSE repo

    vim-bootstrap is also available on openSUSE on both Leap 42.2/42.3 and Tumbleweed. Leap versions must add devel:tools repository before, while Tumbleweed users should have vim-bootstrap in the default repository without the need to add any extra repository.

    • Leap 42.2
    $ sudo zypper ar -f http://download.opensuse.org/repositories/devel:/tools/openSUSE_Leap_42.2/ devel:tools
    $ sudo zypper ref
    $ sudo zypper in vim-bootstrap
    
    • Leap 42.3
    $ sudo zypper ar -f http://download.opensuse.org/repositories/devel:/tools/openSUSE_Leap_42.3/ devel:tools
    $ sudo zypper ref
    $ sudo zypper in vim-bootstrap
    
    • Tumbleweed
    $ sudo zypper ref
    $ sudo zypper in vim-bootstrap
    

    Adding a new Theme

    Create a folder inside generate/vim_template/themes/ with the name of your theme.

    mkdir generate/vim_template/themes/my_theme
    

    Inside this folder, add a file called mytheme.vim with colorscheme instruction (optionally other configs).

    echo "colorscheme mytheme" > generate/vim_template/themes/my_theme/mytheme.vim
    

    Add a .bundle extension file with instructions of how to install theme.

    echo "Plug username/mytheme" > generate/vim_template/themes/my_theme/mytheme.vim.bundle
    

    Submit a PR and when approved new theme was added.

    Customization

    It's highly recommended to add customizations in a separate file. This way, you can maintain the original vim-bootstrap generated vimrc file and subsequent updates.

    For Vim users, the files available for customization are ~/.vimrc.local and ~/.vimrc.local.bundles. The former handles general configuration while the latter handles external Vim plugins through vim-plug.

    NeoVim users can also customize their configuration by using $XDG_CONFIG_HOME/nvim/local_init.vim and $XDG_CONFIG_HOME/nvim/local_bundles.vim.

    Commands

    CommandsDescriptions
    :cd <path>Open path /path
    Ctrlw+hjklNavigate via split panels
    CtrlwwAlternative navigate vim split panels
    ,.Set path working directory
    ,w or ,xNext buffer navigate
    ,q or ,zprevious buffer navigate
    shifttCreate a tab
    tabnext tab navigate
    shifttabprevious tab navigate
    ,eFind and open files
    ,bFind file on buffer (open file)
    ,cClose active buffer (close file)
    F2Open tree navigate in actual opened file
    F3Open/Close tree navigate files
    F4List all class and method, support for python, go, lua, ruby and php
    ,vSplit vertical
    ,hSplit horizontal
    ,fSearch in the project
    ,oOpen github file/line (website), if used git in github
    ,shOpen shell.vim terminal inside Vim or NeoVim built-in terminal
    ,gaExecute git add on current file
    ,gcgit commit (splits window to write commit message)
    ,gshgit push
    ,gllgit pull
    ,gsgit status
    ,gbgit blame
    ,gdgit diff
    ,grgit remove
    ,soOpen Session
    ,ssSave Session
    ,sdDelete Session
    ,scClose Session
    >indent to right
    <indent to left
    gcComment or uncomment lines that {motion} moves over
    YYCopy to clipboard
    ,pPaste
    Ctrly + ,Activate Emmet plugin
    CtrlhDoes a fuzzy search in your command mode history
    CommandsDescriptions
    SHIFT+kOpen documentation
    Control+SpaceAutocomplete
    ,dGo to the Class/Method definition
    ,rRename object definition
    ,nShow where command is usage
    CommandsDescriptions
    ,aRun all specs
    ,lRun last spec
    ,tRun current spec
    ,rapAdd Parameter
    ,rcpcInline Temp
    ,relConvert Post Conditional
    ,recExtract Constant (visual selection)
    ,recExtract to Let (Rspec)
    ,relvExtract Local Variable (visual selection)
    ,rrlvRename Local Variable (visual selection/variable under the cursor)
    ,rrivRename Instance Variable (visual selection)
    ,remExtract Method (visual selection)
    CommandsDescriptions
    ,uInclude use statement
    ,mmInvoke the context menu
    ,nnInvoke the navigation menu
    ,ooGoto definition
    ,ohGoto definition on horizontal split
    ,ovGoto definition on vertical split
    ,otGoto definition on tab
    ,KShow brief information about the symbol under the cursor
    ,ttTransform the classes in the current file
    ,ccGenerate a new class (replacing the current file)
    ,eeExtract expression (normal mode)
    ,eeExtract expression (visual selection)
    ,emExtract method (visual selection)
    ,pcdcs-fixer fix directory
    ,pcfcs-fixer fix file

    Learn Vim

    Visit the following sites to learn more about Vim: