Merge branch 'master' of https://github.com/hophacker/dotfiles
* 'master' of https://github.com/hophacker/dotfiles: python, docker_clean_images, scp install essential libraries before building YouCompleteMe set encoding to resolve erInvalid argument: listchars=tab:»·, install zsh before intalling ycm shortcuts for ssh_ scp_ removed neocomplete link_files added gitter set_proxy changes stuff stuff
This commit is contained in:
commit
7c4ec17108
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ vim/sessions
|
||||
.netrwhist
|
||||
bin/subl
|
||||
tags
|
||||
.idea
|
||||
|
@ -8,7 +8,9 @@
|
||||
# Yet Another Dotfile Repo v1.1
|
||||
# Now with Prezto and Vundle!
|
||||
|
||||
[![加入聊天https://gitter.im/hophacker/dotfiles](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hophacker/dotfiles?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![Join the chat at https://gitter.im/hophacker/dotfiles](https://badges.gitter.im/hophacker/dotfiles.svg)](https://gitter.im/hophacker/dotfiles?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![Join the chat at https://gitter.im/hophacker/dotfiles](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hophacker/dotfiles?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
|
||||
#### sh -c "\`curl -fsSL https://raw.githubusercontent.com/hophacker/dotfiles/master/install.sh \`"
|
||||
|
||||
|
29
Rakefile
29
Rakefile
@ -2,6 +2,19 @@ require 'rake'
|
||||
require 'fileutils'
|
||||
require File.join(File.dirname(__FILE__), 'bin', 'yadr', 'vundle')
|
||||
|
||||
# TODO install for vim_instant_markdown
|
||||
|
||||
task :link_files do
|
||||
install_files(Dir.glob('git/*'))
|
||||
install_files(Dir.glob('irb/*'))
|
||||
install_files(Dir.glob('ruby/*'))
|
||||
install_files(Dir.glob('ctags/*'))
|
||||
install_files(Dir.glob('tmux/*'))
|
||||
install_files(Dir.glob('vimify/*'))
|
||||
install_files(Dir.glob('{vim,vimrc}'))
|
||||
Rake::Task["install_prezto"].execute
|
||||
end
|
||||
|
||||
desc "Hook our dotfiles into system-standard positions."
|
||||
task :install => [:submodule_init, :submodules] do
|
||||
puts
|
||||
@ -25,6 +38,8 @@ task :install => [:submodule_init, :submodules] do
|
||||
Rake::Task["install_vundle"].execute
|
||||
end
|
||||
|
||||
Rake::Task["install_zsh"].execute
|
||||
|
||||
Rake::Task["install_ycm"].execute
|
||||
|
||||
Rake::Task["install_prezto"].execute
|
||||
@ -44,11 +59,23 @@ task :install_prezto do
|
||||
end
|
||||
end
|
||||
|
||||
task :install_zsh do
|
||||
if want_to_install?('zsh')
|
||||
run %{
|
||||
which zsh
|
||||
if [ $? != 0 ]; then
|
||||
sudo apt install zsh -y
|
||||
fi
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
task :install_ycm do
|
||||
if want_to_install?('YouCompleteMe')
|
||||
run %{
|
||||
apt install cmake libpython2.7 python-dev -y
|
||||
cd $HOME/.vim/bundle/YouCompleteMe/
|
||||
./install.sh
|
||||
./install.py
|
||||
}
|
||||
end
|
||||
end
|
||||
|
10
ruby/gemrc
10
ruby/gemrc
@ -1,8 +1,10 @@
|
||||
---
|
||||
:update_sources: true
|
||||
:backtrace: false
|
||||
:bulk_threshold: 1000
|
||||
:sources:
|
||||
- http://rubygems.org
|
||||
:benchmark: false
|
||||
:backtrace: false
|
||||
- https://gems.ruby-china.org/
|
||||
:update_sources: true
|
||||
:verbose: true
|
||||
gem: --no-document
|
||||
benchmark: false
|
||||
gem: "--no-document"
|
||||
|
@ -1,21 +1,19 @@
|
||||
snippet react "React template" b
|
||||
import React, {Component, PropTypes} from 'react'
|
||||
import {connect} from 'react-redux'
|
||||
snippet reactComponent "React template" b
|
||||
import React, { Component } from 'react'
|
||||
|
||||
class ${1:C} extends Component {
|
||||
export default class extends Component {
|
||||
render () {
|
||||
}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
$1.propTypes = {
|
||||
self: PropTypes.object,
|
||||
location: PropTypes.object
|
||||
}
|
||||
snippet reactConnect "React template" b
|
||||
import component from './component'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
export default connect((state, ownProps) => {
|
||||
return {
|
||||
}
|
||||
})($1)
|
||||
export default connect((state, ownProps) => ({
|
||||
}), {
|
||||
})(component)
|
||||
endsnippet
|
||||
|
||||
snippet TODO "Javascript Todo" b
|
||||
|
@ -3,8 +3,7 @@ if exists("g:ctrlp_user_command")
|
||||
endif
|
||||
if executable('ag')
|
||||
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
|
||||
let g:ctrlp_user_command =
|
||||
\ 'ag %s --files-with-matches -g "" --ignore "\.git$\|\.hg$\|\.svn$"'
|
||||
let g:ctrlp_user_command = 'ag %s --files-with-matches -g "" --ignore "\.git$\|\.hg$\|\.svn$"'
|
||||
|
||||
" ag is fast enough that CtrlP doesn't need to cache
|
||||
let g:ctrlp_use_caching = 0
|
||||
|
@ -1,4 +1,5 @@
|
||||
let g:instant_markdown_slow = 0
|
||||
let g:instant_markdown_slow = 1
|
||||
let g:instant_markdown_autostart = 1
|
||||
augroup filetype_markdown
|
||||
autocmd!
|
||||
autocmd FileType mkd setlocal spell
|
||||
|
@ -7,7 +7,7 @@ let g:pymode_run_bind = "<C-S-e>"
|
||||
" Override view python doc key shortcut to Ctrl-Shift-d
|
||||
let g:pymode_doc_bind = "<C-S-d>"
|
||||
let g:pymode_lint_ignore = "W0611"
|
||||
let g:pymode_options_max_line_length=120
|
||||
let g:pymode_options_max_line_length=160
|
||||
|
||||
augroup filetype_python
|
||||
autocmd!
|
||||
@ -18,7 +18,5 @@ augroup filetype_python
|
||||
autocmd FileType python setlocal statusline=%f-%y-[%l]/[%L]
|
||||
autocmd FileType python nnoremap <buffer> <localleader>c I#cesc>
|
||||
autocmd FileType python :iabbrev <buffer> iff if:<left>
|
||||
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
|
||||
autocmd FileType python match Excess /\%120v.*/
|
||||
autocmd FileType python set nowrap
|
||||
augroup END
|
||||
|
@ -1,3 +1,4 @@
|
||||
" Better key maps for switching between controller and view
|
||||
nnoremap ,vv :Eview<cr>
|
||||
nnoremap ,cc :Econtroller<cr>
|
||||
nnoremap ,hc :%s/:\([^=,'"]*\) =>/\1:/gc<cr>
|
||||
|
@ -11,8 +11,8 @@ let g:syntastic_quiet_messages = {'level': 'warnings'}
|
||||
" ~/.vimrc.after
|
||||
let g:syntastic_javascript_checkers = ['eslint']
|
||||
let g:syntastic_python_checkers = ['flake8']
|
||||
let g:syntastic_python_flake8_args='--ignore=F401,F403,F405,W0401'
|
||||
" let g:syntastic_python_pylint_post_args="--max-line-length=120"
|
||||
let g:syntastic_python_flake8_args='--ignore=F401,F403,F405,W0401,E501'
|
||||
let g:syntastic_python_pylint_post_args="--max-line-length=160"
|
||||
|
||||
|
||||
" I have no idea why this is not working, as it used to
|
||||
|
@ -185,3 +185,5 @@ nmap <leader>ej :tabedit ~/.jshintrc<cr>'tzo
|
||||
" move around compile errors
|
||||
nnoremap <leader>n :cnext<cr>
|
||||
nnoremap <leader>p :cprevious<cr>
|
||||
|
||||
nnoremap <leader>l :redraw!<cr>
|
||||
|
@ -22,6 +22,7 @@ Bundle "gmarik/vundle"
|
||||
" ~/.vim/vundles/ to edit them:
|
||||
runtime ruby.vundle
|
||||
runtime languages.vundle
|
||||
runtime markdown.vundle
|
||||
runtime git.vundle
|
||||
runtime appearance.vundle
|
||||
runtime textobjects.vundle
|
||||
|
@ -5,8 +5,6 @@ Bundle 'scrooloose/syntastic.git'
|
||||
Bundle 'skwp/vim-html-escape'
|
||||
Bundle 'ternjs/tern_for_vim'
|
||||
Bundle 'jparise/vim-graphql'
|
||||
Bundle 'plasticboy/vim-markdown'
|
||||
Bundle 'suan/vim-instant-markdown'
|
||||
Bundle 'evanmiller/nginx-vim-syntax'
|
||||
Bundle 'derekwyatt/vim-scala'
|
||||
Bundle 'scrooloose/nerdcommenter'
|
||||
|
2
vim/vundles/markdown.vundle
Normal file
2
vim/vundles/markdown.vundle
Normal file
@ -0,0 +1,2 @@
|
||||
Bundle 'tpope/vim-markdown'
|
||||
Bundle 'suan/vim-instant-markdown'
|
@ -1,6 +1,5 @@
|
||||
Bundle "AndrewRadev/splitjoin.vim"
|
||||
Bundle "Raimondi/delimitMate"
|
||||
Bundle "Shougo/neocomplete.git"
|
||||
Bundle "godlygeek/tabular"
|
||||
Bundle "tomtom/tcomment_vim.git"
|
||||
Bundle "vim-scripts/camelcasemotion.git"
|
||||
|
4
vimrc
4
vimrc
@ -1,5 +1,7 @@
|
||||
" Use Vim settings, rather then Vi settings (much better!).
|
||||
" This must be first, because it changes other options as a side effect.
|
||||
scriptencoding utf-8
|
||||
set encoding=utf-8
|
||||
set nocompatible
|
||||
|
||||
" TODO: this may not be in the correct place. It is intended to allow overriding <Leader>.
|
||||
@ -117,7 +119,7 @@ set smartcase " ...unless we type a capital
|
||||
|
||||
|
||||
" ================ Python ===========================
|
||||
autocmd FileType python set colorcolumn=120
|
||||
autocmd FileType python set colorcolumn=160
|
||||
|
||||
" ================ Custom Settings ========================
|
||||
so ~/.yadr/vim/settings.vim
|
||||
|
@ -241,8 +241,13 @@ case "$OSTYPE" in
|
||||
;;
|
||||
esac
|
||||
alias ssh_by_password='ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no'
|
||||
alias ssh_copy_id_by_password='ssh-copy-id -o PreferredAuthentications=password -o PubkeyAuthentication=no'
|
||||
alias sshfab="ssh -F ~/Projects/rallets-fabric/.ssh/config"
|
||||
alias ssh_copy_id='ssh-copy-id -o PreferredAuthentications=password -o PubkeyAuthentication=no'
|
||||
alias ssh_="ssh -F ~/Projects/rallets-server/rallets-fabric/.ssh/config"
|
||||
alias scp_="scp -F ~/Projects/rallets-server/rallets-fabric/.ssh/config"
|
||||
alias chrome_proxy="google-chrome --proxy-server='http://127.0.0.1:8118'"
|
||||
alias ls_folder_size="du -sch .[!.]* * |sort -h"
|
||||
alias top_by_memory="top -o %MEM"
|
||||
alias gcaa="gia .; gcF"
|
||||
alias ror_ctags="ctags -R --languages=ruby --exclude=.git --exclude=log . \$(bundle list --paths)"
|
||||
alias docker_clean_images='docker rmi $(docker images -a --filter=dangling=true -q)'
|
||||
|
||||
|
@ -82,7 +82,7 @@ function test_proxy() {
|
||||
curl www.google.com
|
||||
}
|
||||
function set_proxy() {
|
||||
export all_proxy=http://127.0.0.1:8118/
|
||||
export all_proxy=http://127.0.0.1:8123/
|
||||
# export https_proxy=socks5://127.0.0.1:1080/
|
||||
# export http_proxy=socks5://127.0.0.1:1080/
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ bindkey -M viins '^s' history-incremental-pattern-search-forward
|
||||
bindkey -M viins '^p' up-line-or-history
|
||||
bindkey -M viins '^n' down-line-or-history
|
||||
bindkey -M viins '^y' yank
|
||||
bindkey -M viins '^f' forward-char
|
||||
bindkey -M viins '^b' backward-char
|
||||
bindkey -M viins '^w' backward-kill-word
|
||||
bindkey -M viins '^u' backward-kill-line
|
||||
bindkey -M viins '^?' backward-delete-char
|
||||
@ -35,6 +37,8 @@ bindkey -M vicmd '^s' history-incremental-pattern-search-forward
|
||||
bindkey -M vicmd '^p' up-line-or-history
|
||||
bindkey -M vicmd '^n' down-line-or-history
|
||||
bindkey -M vicmd '^y' yank
|
||||
bindkey -M vicmd '^f' forward-char
|
||||
bindkey -M vicmd '^b' backward-char
|
||||
bindkey -M vicmd '^w' backward-kill-word
|
||||
bindkey -M vicmd '^u' backward-kill-line
|
||||
bindkey -M vicmd '/' vi-history-search-forward
|
||||
|
Loading…
Reference in New Issue
Block a user