Skip to content
This repository has been archived by the owner on Feb 13, 2018. It is now read-only.
/ vimrc Public archive
forked from wuman/vimrc

vimrc forked from @wuman. This had been previously a submodule of my dotfiles repository

Notifications You must be signed in to change notification settings

bebehei/vimrc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wuman's vimrc

Author: David Wu david@wu-man.com http://blog.wu-man.com

SCREENSHOTS

screenshot1

INSTALLATION

Use curl (for Mac OS X):

curl -o - https://raw.github.com/wuman/vimrc/master/auto-install.sh | sh

or wget (for most UNIX platforms):

wget --quiet -O - https://raw.github.com/wuman/vimrc/master/auto-install.sh | sh

You should also create your own custom excludes list to ignore tags:

git config --global core.excludesfile '~/.gitexcludes'
echo tags > ~/.gitexcludes

Mandatory Customized Plugin Installations

Pathogen

Starting in Ubuntu 10.04 there is a bug which prevents filetypes from being detected correctly. In order to workaround the problem, simply comment out the syntax on line in /etc/vim/vimrc.

vim-autoformat

Install the following external formatting programs to enable vim-autoformat:

npm install -g js-beautify
brew install astyle
brew install tidy-html5

You may want to add an optional .jsbeautifyrc with the following content to either your home directory or your project diretory:

{
  "allowed_file_extensions": ["js", "json", "jsx", "jshintrc", "jsbeautifyrc"],
  "keep_array_indentation": true,
  "indent_size": 2,
  "brace_style": "collapse-preserve-inline",
  "e4x": true
}

Refer to https://github.com/beautify-web/js-beautify for more config options.

syntastic

Install the following external checkers:

# enable json validation
npm install -g jsonlint
# eslint for javascript + jsx + react
npm install -g eslint eslint-plugin-react
# eslint rules from airbnb
npm install -g eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y

Ensure that a .eslintrc.js file similar to the one below is present in either the project directory or the home directory:

module.exports = {
  extends: 'airbnb',
  plugins: ['react'],
  rules: {
	'no-console': ['error', { allow: ['warn', 'error', 'trace'] }],
	'react/prefer-es6-class': [0],
  },
};

vim-go

Install the tools used by vim-go in vim:

:GoInstallBinaries

You will need to do this every time you update to a new version of golang.

YouCompleteMe

YouCompleteMe is a powerful auto-completion plugin that augments OmniCompletion. The installation for this plugin is quite involved, but definitely worth the effort.

More detailed instructions for platforms other than Mac OS X can be found at https://github.com/Valloric/YouCompleteMe#installation.

# ensure nodejs and npm are both installed for tern-completer
# ensure go is installed for gocode-completer
npm install -g typescript # optional
brew install cmake # needed to build
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer --gocode-completer --tern-completer

Make sure that a global .tern-config file is added to the home directory, which should conform to http://ternjs.net/doc/manual.html#configuration. Mine looks something like this:

{
    "libs": ["browser", "jquery", "underscore"]
}

Patched Font for Airline

You may want to install a patched font for vim-airline. Many of them can be found at https://github.com/powerline/fonts. But I personally prefer Monaco, which can be downloaded at https://gist.github.com/baopham/1838072.

UPDATES

Occasionally I will update my vimrc settings. If you had previously installed my vimrc settings and wish to pull new changes from my repo, or if you wish to pull in new changes from plugin submodules, run the following script:

~/.vim/update-vimrc.sh

PRE-INSTALLED PLUGINS

PLUGIN INSTALLATION

To add a new plugin:

cd ~/.vim
git submodule add [GIT_REPOSITORY_URL] bundle/[PLUGIN_NAME]

CREDITS

My vimrc settings are based extensively on the following:

Bitdeli Badge

About

vimrc forked from @wuman. This had been previously a submodule of my dotfiles repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 93.5%
  • Shell 6.5%