dotfile
├── astyle
│ └── astylerc
├── bin/
├── editorconfig
│ └── editorconfig
├── git
│ └── gitconfig
├── sublime2
│ ├── Preferences.sublime-settings
│ └── README.md
├── sublime3
│ ├── Preferences.sublime-settings
│ └── README.md
├── terminfo
│ ├── README.md
│ ├── screen-256color-italic.terminfo
│ └── xterm-256color-italic.terminfo
├── tmux
│ └── tmux.conf
├── vim
│ ├── init.vim -> vimrc
│ ├── vimrc
│ └── vimrc.plugins
├── vscode
│  ├── README.md
│  ├── keybindings.linux.json
│  ├── keybindings.osx.json
│  └── settings.json
└── zsh
└── zshrc
git clone --depth 1 https://github.com/Treri/dotfile.git ~/.dotfile
cd ~/.dotfile
All vailable tasks:
- astyle_rc
- bin
- editorconfig
- emacs
- emacs_spacemacs
- fonts_source_code_pro
- git_config
- git_diff_fancy
- git_dmtool
- git_extras
- git_flow
- git_standup
- sublime2
- sublime3
- tmux
- vim_rc
- vim_plugins
- vim_plugins_fcitx
- vim_plugins_matchtag
- vim_plugins_snippets
- vim_plugins_ycm
- vscode
- zsh_rc
- zsh_plugins_fasd
- zsh_plugins_fzf
- zsh_plugins_thefuck
You can do a specific task by run
./install.sh <taskname1>[ <taskname2> <tasknameN> ...]
-
Requirement(s):
astyle
. If you have installedastyle
and pressQ
in vim, astyle will be used to format the C, C++, C#, Java file.What others maybe you should install?
astyle
# OS X only brew install astyle
-
Install some useful small scripts to your
~/bin
. -
Install global
.editorconfig
to you home. You can see what config is used. -
Requirement(s):
git
,emacs
Install emacs config to your
~/.emacs.d
. -
Requirement(s):
git
,emacs
Install popular spacemacs for your emacs.
-
Requirement(s):
git
This task will install Source Code Pro font for you.
The new version font is compatible with powerline fonts which have some useful symbols used in some vim plugins and shell plugins, and it will update frequently. So use it to replace Powerline fonts.
This font will be installed automatically when do task emacs_spacemacs, sublime2, sublime3, vim_plugins, and vscode.
-
Requirement(s):
git
This task will ask you what username and email you want to config global for git.
-
Requirement(s):
git
Install
diff-so-fancy
plugin for git. Please see diff-so-fancy -
Requirement(s):
MAC
,git
,Kaleidoscope
(ksdiff
)Config git's difftool and mergetool to Kaleidoscope.
Kaleidoscope is a sooooo excellent diff and merge tool
-
Requirement(s):
git
Install
git-extras
plugin for git. git-extras( Linux, OS X ) has some useful tools for git. -
Requirement(s):
git
Install
git-flow
plugin for git.A post about git-flow: a-successful-git-branching-model
-
Requirement(s):
git
Install
git-standup
plugin for git. Please see git-standup -
Requirement(s):
git
,Sublime Text 2
bakup your preference file first!
If you use
Sublime Text 2
, this task will add user Preference,Monokai Extended
colorscheme andMarkdown Extended
plugin which supports more files including Markdown highlight.After installing the preference, maybe you want to reset
font_face
andfont_size
to what you prefer inPreference.sublime-settings
. Also you can see what sublime packages I used in SublimePackages.If you use
VIM Mode
in Sublime Text 2 on OS X 10.8+, when you holdh
,l
,j
,k
, the cursor will not moveleft
right
down
up
continually like real VIM, the solution is below.Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key that enables you to choose a character from a menu of options. If you are on Lion try it by pressing and holding down 'e' in any app that uses the default NSTextField for input.
It's a nice feature and continues the blending of Mac OS X and iOS features. However, it's a nightmare to deal with in Sublime Text 2 if you're running Vintage (Vim) mode, as it means you cannot press and hold h/j/k/l to move through your file. You have to repeatedly press the keys to navigate.
You can disable this feature for just Sublime Text 2 by issuing the following command in your terminal:
defaults write com.sublimetext.2 ApplePressAndHoldEnabled -bool false
Alternately, if you want this feature disabled globally, you can enter this:
defaults write -g ApplePressAndHoldEnabled -bool false
In either case you'll need to restart your computer for the change to take place.
Happy coding!
-
Requirement(s):
git
,Sublime Text 3
bakup your preference file first!
If you use
Sublime Text 3
, this task will add user Preference,Monokai Extended
colorscheme andMarkdown Extended
plugin which supports more files including Markdown highlight.After installing the preference, maybe you want to reset
font_face
andfont_size
to what you prefer inPreference.sublime-settings
. Also you can see what sublime packages I used in SublimePackages. -
Requirement(s):
git
,tmux
tmux plugins
-
Requirement(s):
git
,vim
This task will not install any plugin, if you want to use some plugins, do task vim_plugins.
You can override the system vim with the new one installed by
homebrew
. (OS X only. This is optional, but recommended, because system vim can't use system clipbord via register+
).brew install macvim --with-override-system-vim
And then add the new vim PATH into your
$PATH
.Additionally, if you have installed
neovim
, this task will linkvim
to~/.nvim
,vim/vimrc
to~/.nvimrc
.You can add your custom configs or override dotvim configs in
~/.vimrc.local
. -
Requirement(s):
git
,vim
, task vim_rcSetup vim-plug, and load other plugins.
We have some dotvim_group below.
- themes
- interface
- explorer
- motion
- writing
- git
- syntastic
- tmux
- html
- css
- js
- php
- markdown
- nginx
In above dotvim_groups, only
themes
andinterface
will be loaded default.You can add already defined dotvim_group above in
~/.vimrc.plugins.before
like below." load some plugins groups let g:dotvim_groups = ['explorer', 'git', 'js']
You can also add a virtual group
common
tog:dotvim_groups
to include all groups, and then use-*
syntax to exclude some ones like below." include groups except git let g:dotvim_groups = ['common', '-git']
If you want to override some plugin configs or to use some other plugins, you can add them in
~/.vimrc.plugins.local
like below." load your custom plugins in ~/.vimrc.plugins.local " Plug 'name/repo' " or override plugin configs already defined in ~/.vimrc.plugins " let g:some_config = 'value'
The load order for the configuration is:
.vimrc
- dotvim configs.vimrc.plugins.before
- user's dotvim_groups define.vimrc.plugins
- dotvim plugins and plugin configs.vimrc.plugins.local
- user's custom plugins and plugin configs.vimrc.local
- user's custom configs
" group 'themes' Plug 'tomasr/molokai' Plug 'altercation/vim-colors-solarized' Plug 'morhetz/gruvbox' Plug 'junegunn/seoul256.vim' Plug 'zeis/vim-kolor' " group 'interface' Plug 'vim-airline/vim-airline' Plug 'Yggdroot/indentLine' " group 'explorer' Plug 'schickling/vim-bufonly' Plug 'ctrlpvim/ctrlp.vim' Plug 'tacahiroy/ctrlp-funky' Plug 'scrooloose/nerdtree' Plug 'Xuyuanp/nerdtree-git-plugin' Plug 'dyng/ctrlsf.vim' Plug 't9md/vim-choosewin' " group 'motion' Plug 'justinmk/vim-sneak' Plug 'unblevable/quick-scope' Plug 'haya14busa/incsearch.vim' Plug 'easymotion/vim-easymotion' Plug 'haya14busa/incsearch-easymotion.vim' Plug 'kshenoy/vim-signature' Plug 'terryma/vim-expand-region' Plug 't9md/vim-textmanip' " group 'writing' Plug 'ntpeters/vim-better-whitespace' Plug 'Raimondi/delimitMate' Plug 'junegunn/vim-easy-align' Plug 'wellle/targets.vim' Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' Plug 'scrooloose/nerdcommenter' Plug 'terryma/vim-multiple-cursors' Plug 'osyo-manga/vim-over' " group 'git' Plug 'airblade/vim-gitgutter' " group 'syntastic' Plug 'scrooloose/syntastic' " group 'tmux' Plug 'tmux-plugins/vim-tmux' Plug 'tmux-plugins/vim-tmux-focus-events' Plug 'christoomey/vim-tmux-navigator' " group 'html' Plug 'tmhedberg/matchit' Plug 'mattn/emmet-vim' " group 'css' Plug 'groenewege/vim-less' Plug 'hail2u/vim-css3-syntax' Plug 'Marslo/vim-coloresque' " group 'js' Plug 'leafgarland/typescript-vim' Plug 'kchmck/vim-coffee-script' Plug 'pangloss/vim-javascript' Plug 'mxw/vim-jsx' Plug 'othree/yajs.vim' Plug 'heavenshell/vim-jsdoc' Plug 'mtscout6/syntastic-local-eslint.vim' " group 'php' Plug 'SirVer/ultisnips' Plug 'tobyS/vmustache' Plug 'tobyS/pdv' " group 'markdown' Plug 'godlygeek/tabular' Plug 'plasticboy/vim-markdown' " group 'nginx' Plug 'evanmiller/nginx-vim-syntax'
-
Requirement(s):
git
,vim
, task vim_pluginsInstall fcitx support plugin for vim. This plugin help you to switch input method(eg. English and Chinese keyboard) automatically when you switch vim
Insert
andNormal
mode." group 'fcitx' Plug 'CodeFalling/fcitx-vim-osx'
-
Requirement(s):
git
,vim
,curl
,python
, task vim_pluginsInstall html matchtag plugin for vim. Here i use python version matchtag. If you don't want to include python modules, you can also use non-python version 'gregsexton/MatchTag'
" group 'matchtag' Plug 'valloric/MatchTagAlways'
-
Requirement(s):
git
,vim
,curl
,python
, task vim_pluginsInstall vim-snippets plugin for vim.
" group 'snippets' Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets'
-
Requirement(s):
git
,vim
,curl
,python
, task vim_pluginsInstall YouCompleteMe plugin for vim.
If YouCompleteMe lib files not exist, or you force YouCompleteMe to recompile with
export YCM_COMPILE_FORCE=true
, YouCompleteMe lib files will be compiled automatically.Also you can set
YCM_COMPLETER_FLAG
with different language support.e.g.
YCM_COMPLETER_FLAG="--tern-completer" ./install.sh vim_plugins_ycm
If you want to enable
--tern-completer
support, You may want to havenode
andnpm
installed and.tern-project
config file in you project or$HOME
directory." group 'youcompleteme' Plug 'Valloric/YouCompleteMe'
-
Requirement(s):
git
, Visual Studio CodeInstall custom
settings.json
andkeybindings.json
for vscode.After installing the configs, maybe you want to reset
editor.fontFamily
andeditor.fontSize
to what you prefer insettings.json
, and custom key bindings inkeybindings.json
. Also you can see what sublime packages I used in Visual Studio Code Packages. -
Requirement(s):
git
,zsh
This task will install
oh-my-zsh
for you.If you have your own configs, put them in
~/.zshrc.local
, zsh will load them automatically.What zsh plugins are used?
plugin require note colored-man-pages encode64 extract fzf-zsh(fzf) task zsh_plugins_fzf sublime sudo zsh_reload zsh-syntax-highlighting zsh-autosuggestions disabled in Emacs eshell. TIP: If your auto suggestion's color is same with your normal command's color, please make sure you $TERM
support 256 color!fasd(z) task zsh_plugins_fasd z is used otherwise when fasd is not installed gitfast git git-extras git git-flow task git_flow git-flow-completion task git_flow httpie httpie mosh mosh thefuck task zsh_plugins_thefuck tmux tmux osx OS X So, maybe you should install some of them to make full use of zsh.
-
Requirement(s):
git
,zsh
, task zsh_rc -
Requirement(s):
git
,zsh
, task zsh_rcInstall oh-my-zsh plugin
fzf
-
Requirement(s):
git
,zsh
, task zsh_rcInstall oh-my-zsh plugin
thefuck
The MIT License (MIT)
Copyright (c) 2013-2016 Treri treri.liu@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.