Vim script Go Other
Switch branches/tags
Nothing to show
Clone or download
Latest commit b990cad Feb 26, 2018
codetriage-readme-bot and avelino Add CodeTriage badge to avelino/vim-bootstrap (#291)
Adds a badge showing the number of people helping this repo on CodeTriage.

[![Open Source Helpers](https://www.codetriage.com/avelino/vim-bootstrap/badges/users.svg)](https://www.codetriage.com/avelino/vim-bootstrap)

## What is CodeTriage?

CodeTriage is an Open Source app that is designed to make contributing to Open Source projects easier. It works by sending subscribers a few open issues in their inbox. If subscribers get busy, there is an algorithm that backs off issue load so they do not get overwhelmed

[Read more about the CodeTriage project](https://www.codetriage.com/what).

## Why am I getting this PR?

Your project was picked by the human, @schneems. They selected it from the projects submitted to https://www.codetriage.com and hand edited the PR. How did your project get added to [CodeTriage](https://www.codetriage.com/what)? Roughly about 1 year ago, [avelino](https://github.com/avelino) added this project to CodeTriage in order to start contributing.

## What does adding a badge accomplish?

Adding a badge invites people to help contribute to your project. It also lets developers know that others are invested in the longterm success and maintainability of the project.

You can see an example of a CodeTriage badge on these popular OSS READMEs:

- [![Email clients like GMAIL do not render SVG images](https://www.codetriage.com/rails/rails/badges/users.svg)](https://www.codetriage.com/rails/rails) https://github.com/rails/rails
- [![Email clients like GMAIL do not render SVG images](https://www.codetriage.com/crystal-lang/crystal/badges/users.svg)](https://www.codetriage.com/crystal-lang/crystal) https://github.com/crystal-lang/crystal

## Have a question or comment?

While I am a bot, this PR was manually reviewed and monitored by a human - @schneems. My job is writing commit messages and handling PR logistics.

If you have any questions, you can reply back to this PR and they will be answered by @schneems. If you do not want a badge right now, no worries, close the PR, you will not hear from me again.

Thanks for making your project Open Source! Any feedback is greatly appreciated.

README.md

vim-bootstrap

Join the chat at https://gitter.im/avelino/vim-bootstrap Open Source Helpers

Vim Bootstrap is generator provides a simple method of generating a .vimrc configuration for vim, NeoVim, NeoVim-Qt, MacVim and GVim.

Pre-requisites

The distribution is designed to work with Vim >= 7.4.

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 (recomend used pacaur)
$ sudo pacman -S git-core ctags ncurses curl
  • Fedora
$ sudo dnf install ncurses-devel git ctags-etags curl
  • openSUSE
$ sudo zypper in ncurses-devel git ctags 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

Installation

  • Download your own vimrc file at http://www.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 +PlugInstall +qall

Fast-installation by URL parameters

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

curl 'http://vim-bootstrap.com/generate.vim' --data 'langs=javascript&langs=php&langs=html&langs=ruby&editor=vim' > ~/.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/avelino/vim-bootstrap
cd $GOPATH/src/github.com/avelino/vim-bootstrap
git submodule init
git submodule update
go build

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

./vim-bootstrap -langs=python,lua,ruby,javascript,haskell -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

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 handle 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

▪️ Basic Commands
Commands Descriptions
:cd <path> Open path /path
Ctrlw+hjkl Navigate via split panels
Ctrlww Alternative navigate vim split panels
,. Set path working directory
,w or ,x Next buffer navigate
,q or ,z previous buffer navigate
shiftt Create a tab
tab next tab navigate
shifttab previous tab navigate
,e Find and open files
,b Find file on buffer (open file)
,c Close active buffer (clone file)
F2 Open tree navigate in actual opened file
F3 Open/Close tree navigate files
F4 List all class and method, support for python, go, lua, ruby and php
,v Split vertical
,h Split horizontal
,f Search in the project
,o Open github file/line (website), if used git in github
,sh Open shell.vim terminal inside Vim or NeoVim built-in terminal
,ga Execute git add on current file
,gc git commit (splits window to write commit message)
,gsh git push
,gll git pull
,gs git status
,gb git blame
,gd git diff
,gr git remove
,so Open Session
,ss Save Session
,sd Delete Session
,sc Close Session
> indent to right
< indent to left
gc Comment or uncomment lines that {motion} moves over
YY Copy to clipboard
,p Paste
Ctrly + , Activate Emmet plugin
▪️ Python hotkeys
Commands Descriptions
SHIFT+k Open documentation
Control+Space Autocomplete
,d Go to the Class/Method definition
,r Rename object definition
,n Show where command is usage
▪️ Ruby hotkeys
Commands Descriptions
,a Run all specs
,l Run last spec
,t Run current spec
,rap Add Parameter
,rcpc Inline Temp
,rel Convert Post Conditional
,rec Extract Constant (visual selection)
,rec Extract to Let (Rspec)
,relv Extract Local Variable (visual selection)
,rrlv Rename Local Variable (visual selection/variable under the cursor)
,rriv Rename Instance Variable (visual selection)
,rem Extract Method (visual selection)

Learn Vim

Visit the following sites to learn more about Vim: