Coder Social home page Coder Social logo

autoconfig-mac-vimrc's Introduction

autoconfig-mac-vimrc

I'm a front-end engineer, and also a vimer, maybe the config file is suitable for you. This file did lots of things, such as:

  • install brew if not exist.
  • install fonts
  • install colorschemes
  • install ack
  • install all listed bundle plugins, if exist, try update.
  • install YouComplete for nodejs
  • and so on.

pic

The <leader> key is ,,use ,ne open folders, use ,bg toggle background (light/dark).

Install

The first approach:

  • copy the bash code at the bottom to install.sh
  • run command chmod +x install.sh
  • run command ./install.sh

The second approach:

git clone https://github.com/barretlee/autoconfig-mac-vimrc.git;
cd autoconfig-mac-vimrc;
chmod +x install;
./install;

Attention: This shell script contains lots of plugins and tools, if you have never installed, it may takes a little long time, about 15+ mins in good network.

bash code

#!/bin/bash
# @author Barret Lee<[email protected]>

[[ -d ~/.vim ]] || mkdir ~/.vim;

# tmp dir
[[ -d ~/v-tmp ]] || mkdir ~/v-tmp;

# .vimrc
cd ~/v-tmp;
[[ -d ~/v-tmp/rc ]] || git clone https://github.com/barretlee/autoconfig-mac-vimrc.git;

# backup origin vimrc file
[[ -f ~/.vimrc-bak ]] || cp ~/.vimrc ~/.vimrc-bak;
mv ~/v-tmp/autoconfig-mac-vimrc/.vimrc ~/.vimrc;

# vim pulgin controller - vundle
[[ -d ~/.vim/bundle/Vundle.vim ]] || git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim;

# colors schemes
cd ~/v-tmp;
[[ -d ~/v-tmp/vim-colorschemes ]] || git clone https://github.com/flazz/vim-colorschemes.git;
[[ -d ~/.vim/colors ]] || mv ~/v-tmp/vim-colorschemes/colors ~/.vim/;

# fonts for airline
cd  ~/v-tmp;
[[ -d ~/v-tmp/fonts ]] || git clone https://github.com/powerline/fonts.git;
cd fonts;
sh ./install.sh;

if type brew > /dev/null; then
  echo "Homebrew Exists";
else
  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
fi;

# ack supported
brew install ack ag;

# YouCompleteMe supported
if [[ -d ~/.vim/bundle/YouCompleteMe ]]; then
  echo "YouCompleteMe Exists";
else
  git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe;
  cd ~/.vim/bundle/YouCompleteMe;
  # for nodejs
  ./install.py --tern-completer;
fi;

# update vim, replace the origin 
# brew install vim --override-system-vi --with-lua --HEAD;

# install vim plugins
vim +PluginInstall! +qall;

# rm tmp dir
# rm -rf ~/v-tmp;
echo "You can remove the temporary directory ~/v-tmp";

Thanks & LICENSE

Thanks for @noscripter.

MIT LICENSE.

autoconfig-mac-vimrc's People

Contributors

barretlee avatar jiw29 avatar nly 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

autoconfig-mac-vimrc's Issues

Error before completion

[100%] Linking CXX shared library /Users/cosmic/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so
[100%] Built target ycm_core
ERROR: node is required to set up Tern.
Cosmics-MacBook-Pro:autoconfig-mac-vimrc cosmic$

ycmd出现提示,没有补全.

打开一个文件 出现提示 ,
The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). YCM core library n
ot detected; you need to compile YCM before using it. Follow the instructions in
the documentation.
执行YcmRestartServer后会一直显示restarting ycmd server
文件也没有提示补全
是不是我还要安装libclang,对ycmd进行配置?
感谢

How to remove completely?

I install the package according to your gits. However, I found my TensorFlow cannot run anymore after installing.
So could you please tell me how to remove the packages?
Thank you.

如何恢复原状?

现在每次用vim打开文件都会出两次警告,编辑框里也是长方形的光标不是竖线光标,感觉用不习惯

使用curl直接安装

可以直接使用命令curl https://raw.githubusercontent.com/barretlee/autoconfig-mac-vimrc/master/install | sudo bash获取shell脚本并运行, 不需要自行创建文件再运行

安装报如下错误

~~~
AsyncCommand requires vim compiled with +clientserver (see :help +clientserver)
Press ENTER or type command to continue
~~~

以后每次运行 vim 都报这个插件相关错误

ctrl+f changed to call jsBeautify()

After installing this tool, ctrl+f is changed to call jsBeautify() instead of original forward function, i use ctrl+d(means down) instead of ctrl+f to avoid this issue.
May i know how to forward page after installing this tool? or is there a guideline for the tool?
thanks.

How can I disable the auto wrap?

When I editing a pure plain text file with a long line, it will always add a new line when I try to add something.
How can I disable this feature?

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.