GithubHelp home page GithubHelp logo

editor-bootstrap / vim-bootstrap Goto Github PK

View Code? Open in Web Editor NEW
2.1K 57.0 210.0 6.34 MB

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

Home Page: https://vim-bootstrap.com/

License: MIT License

Shell 0.02% Go 7.52% Dockerfile 0.61% CSS 33.74% JavaScript 10.40% HTML 24.37% Vim Script 23.34%
vim neovim vimrc dotfiles starter-template vim-bootstrap bootstrap vimrc-configuration vim-configuration editor-bootstrap

vim-bootstrap's Introduction

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!

vim-bootstrap - Your configuration generator for Neovim/Vim | Product Hunt

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

▪️ 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 (close 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
Ctrlh Does a fuzzy search in your command mode history
▪️ 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)
▪️ Php hotkeys
Commands Descriptions
,u Include use statement
,mm Invoke the context menu
,nn Invoke the navigation menu
,oo Goto definition
,oh Goto definition on horizontal split
,ov Goto definition on vertical split
,ot Goto definition on tab
,K Show brief information about the symbol under the cursor
,tt Transform the classes in the current file
,cc Generate a new class (replacing the current file)
,ee Extract expression (normal mode)
,ee Extract expression (visual selection)
,em Extract method (visual selection)
,pcd cs-fixer fix directory
,pcf cs-fixer fix file

Learn Vim

Visit the following sites to learn more about Vim:

vim-bootstrap's People

Contributors

adimircolen avatar afranioce avatar alyxpractice avatar avelino avatar camponez avatar cassiobotaro avatar chocoelho avatar cizordj avatar code-reaper08 avatar codetriage-readme-bot avatar di3goleite avatar drgarcia1986 avatar ellisonleao avatar ezradiniz avatar felipehfs avatar guibeira avatar hersonls avatar hmleal avatar itchyny avatar ivancrneto avatar lerrua avatar magnunleno avatar nemith avatar newuserha avatar omarrp avatar phinfonet avatar prasetiyohadi avatar ps173 avatar rodolfobandeira avatar stooj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-bootstrap's Issues

C folding syntax

with a blank install (from an empty ~/.vim directory) the C foldmethod is set to manual. Was this intended? I was expecting there to be foldmethod=syntax as the default

pbcopy should be used only on Mac OSX

pbcopy command can only used on Mac OSX.
So It must be set like following.

if has('macunix')
  " pbcopy for OSX copy/paste
  vmap <C-x> :!pbcopy<CR>
  vmap <C-c> :w !pbcopy<CR><CR>
endif

Confused by the SHIFT+O and SHIFT+P rebindings

Hi,

SHIFT+O and SHIFT+P are two commands I'm using a lot (I mean, A LOT, like once a minute in average) in "regular vim". It's very confusing that they are rebound to entirely different commands after loading vim-bootstrap.

Create an alternative installation method.

It would be interesting to create an alternative installation method because to download via the website makes it miss the updates in the repository. Nobody will get by downloading the site every week to keep up.

Elixir support

if anyone knows about a nice Elixir plugin, please tell me.

Missing dependency

When haskell is specified, generated .vimrc includes neco-ghc installation setting. However, it depends on neocomplcache or neocomplete and installation setting of both of them is missing in generated .vimrc. neocomplete setting should also be added. (because neocomplcache is obsolete)

"neocomplete does not work this version of Vim." - But I have a updated version...

Hi guys,

I'm trying use a vimrc for haskel, but when I try to open the VIm editor, this error message appears:

vim
neocomplete does not work this version of Vim.
It requires "if_lua" enabled Vim(7.3.885 or above).
Press ENTER or type command to continue

It's weird, ny VIm version 7.4.273 anyone else had this problem? and Yes, I've already tried re-compile VIm from source with explicitly "lua" and "python" support. =]

P.S: When I use the vimrc for Python everything works.

[ ]'s

`gnome-256color' not known

E558: Terminal entry not found in terminfo
'gnome-256color' not known. Available builtin terminals are:
builtin_riscos
builtin_amiga
builtin_beos-ansi
builtin_ansi
builtin_pcansi
builtin_win32
builtin_vt320
builtin_vt52
builtin_xterm
builtin_iris-ansi
builtin_debug
builtin_dumb
defaulting to 'ansi'

neobundle.vim is not vundle

vim-bootstrap generates below code

let vundle_readme=expand('~/.vim/bundle/neobundle.vim/README.md')

vundle_readme actually has the path to neobundle.vim's readme. It's confusing.

Useless configuration

Below configuration is already in vimrc_example.vim bundled in Vim and it is loaded before .vimrc.

"" Remember cursor position
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif

Font is too small

why the default font size is: "8"

set gfn=Monospace\ 8

i installed in ubuntu and this definition is too small there is any problem of the standard size is 10??

fugitive problems

After creating the vimrc file for python and standard vim, I'm promted with the question to install bundles now:

Not installed bundles:  ['vimproc.vim', 'gre...', 'vim-airline', 'indentLine', 'vim-polyglot']
Install bundles now?
(y)es, [N]o:

Selecting "yes" will yield errors regarding the some fugitive functions:

Zeile   23:
E117: Unbekannte Funktion: fugitive#statusline

Cloning the fugitive package by hand and restarting parting successfully installs the packages.

cd .vim/bundle/neobundle.vim/plugin/
git clone https://github.com/tpope/vim-fugitive.git

This error occurred on two Debian Wheezy machines with the vim version "VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 10 2013 02:28:47)".

In some cases, nmap must be nnoremap.

For example,

nmap <Tab> gt

must be

nnoremap <Tab> gt

to avoid remapping.
There are some vmaps where you have to use vnoremap.
You have to be careful determining which to use nmap or nnoremap. (of course you have to understand the difference)

Erlang support

if anyone knows about a nice Erlang plugin, please tell me.

Enhanched '%' behavior (e.g. for html)

Would recommend the following plugin to enhance the '%' command behavior. This is very helpfull
in HTML documents, so you can jump to the corresponding tag with '%'.

BundleInstall 'vim-scripts/matchit.zip'

Navigation in split panels doesn't work

Some visual settings disables the command <Control+w>+arrows, in my case, I just commented this line :

if $COLORTERM == 'gnome-terminal'
"    set term=gnome-256color

and is working well.

All global variables should specify their scopes explicitly.

Global variables in below settings generated by vim-bootstrap should specify their scopes, g:.

let NERDTreeChDirMode=2
let NERDTreeIgnore=['\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__']
let NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$']
let NERDTreeShowBookmarks=1

mappings should use <C-u>

noremap <Leader>h :split<CR>

should be

noremap <Leader>h :<C-u>split<CR>

to remove the range input (Try pressing 5<Leader>h to see the trouble).

Remove trailing does not work on <Leader>S.

nnoremap <leader>:call TrimWhiteSpace()<cr>:let @/=''<CR>

should be

nnoremap <leader>S :call TrimWhiteSpace()<cr>:let @/=''<CR>

and it would be nice if it uses <silent>.

augroup is missing.

We have to use augroup for every autocmd because resourcing the vimrc results in a trouble that firing an event calls the function twice.

Typo in main page

The button Maker your .vimrc..., I think that you mean Make instead of Maker, right?

Inconsistent use of leader

Some commands are defined as using comma explicitly, while others use leader, which makes it pretty annoying to change the leader key.

Suggestion: Replace SnipMate for UltiSnips

Just dropping a suggestion here: Instead of going with SnipMate, use UltiSnips for snippets. In my personal opinion, UltiSnips does a better job handling the snippets, have an easy way to edit snippets based on the current filetype and even honza/vim-snippets works with it.

My experience with SnipMate (the garbas version, at least) was less than ideal: Snippets would break code and sometimes it would keep repeating code when a snippet would expand into multi-lines and identations. This is a problem that doesn't exist with the original SnipMate (which seems unmaintained these days).

on mvim

Error detected while processing /usr/local/Cellar/macvim/7.4-73/MacVim.app/Contents/Resources/vim/runtime/menu.vim:
line 1221:

Theme picker

Support multi theme (colors).

In web interface put theme picker.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.