Git Product home page Git Product logo

vim's Introduction

vim script

Update repo

$ git submodule update --init --remote
$ git submodule foreach git submodule update --init --recursive

Build plugins

(1) Build YouCompleteMe

$ cd pack/common/start/YouCompleteMe
$ ./install.py --go-completer  --clangd-completer

(2) Install vim and create vim backup, swap, undo directory

$ brew install vim
$ mkdir -p ~/.vim_files/{backup,swap,undo}

Install oh-my-zsh

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Install tmux

$ brew install tmux
$ brew install reattach-to-user-namespace

Create ~/.tmux.conf

set -g status off
set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g history-limit 1000000
unbind C-b
set -g prefix C-n
bind C-n send-prefix
set-window-option -g mode-keys vi
bind C-n copy-mode
bind C-p paste-buffer
bind '\' split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind H resize-pane -L 10
bind J resize-pane -D 10
bind K resize-pane -U 10
bind L resize-pane -R 10
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
set -g mouse on

Start tmux when zsh launched.
Append to the end of ~/.zshrc

# Start tmux when start zsh
if [ "$TMUX" = "" ]; then tmux; fi

Install javascript and tools

  1. Install nodejs(https://nodejs.org)
sudo tar -xvf node-v{VERSION}-linux-x64.tar.xz -C /usr/local/nodejs
chmod 777 /usr/local/nodejs -R
  1. Add env:
export NODEJS\_HOME=/usr/local/nodejs
export PATH=$PATH:$NODEJS\_HOME/bin:$GOPATH/bin
  1. Set npm registry:
alias npm='npm --registry=https://registry.npm.taobao.org \
--cache=$HOME/.npm/.cache/cnpm \
--disturl=https://npm.taobao.org/dist \
--userconfig=$HOME/.cnpmrc'
  1. Install packages:
npm -g install eslint
npm install -D prettier eslint-plugin-prettier eslint-config-prettier
  1. Configure ESLint in project:
eslint --init

Add prettier:

{
    "env": {
        "browser": true,
        "commonjs": true,
        "es6": true
    },
    "extends": [
		"eslint:recommended",
		"prettier"
	],
    "parserOptions": {
        "ecmaFeatures": {
            "experimentalObjectRestSpread": true,
            "jsx": true
        },
        "sourceType": "module"
    },
    "plugins": [
        "react",
		"prettier"
    ],
    "rules": {
        "indent": [
            "error",
            2
        ],
        "linebreak-style": [
            "error",
            "unix"
        ],
        "quotes": [
            "error",
            "single"
        ],
        "semi": [
            "error",
            "always"
        ],
        "prettier/prettier": ["error", "fb"]
    }
}
  1. Configure .tern-project
{
  "libs": [
    "browser",
    "jquery"
  ],
  "plugins": {
    "complete_strings": {},
    "node": {},
    "modules": {},
    "es_modules":{},
    "complete_strings": {},
    "requirejs": {},
    "doc_comment": {
      "fullDocs": true
    }
  },
  "loadEagerly": [
    "src/**/*.js"
  ],
  "ecmaVersion": 6
}

Install rls

rustup component add rls-preview --toolchain nightly

vim's People

Contributors

kdada avatar

Stargazers

fish avatar

Watchers

James Cloos avatar  avatar

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.