zsh & oh-my-zsh
配置oh-my-zsh之前要先安装Git
1sudo apt-get install zsh 2sudo apt-get install git 3wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
之前记得切换shell使用 chsh 命令。但是最近版本的ubuntu总是需要输入一个密码,然后出一个错误,没有查出如何解决这个问题
chsh: PAM: Authentication failure
所以,这里使用了一种比较暴力的解决办法,直接修改用户的配置。
sudo vim /etc/passwd/
找到自己的用户名,把shell对应的一列该成自己需要的shell。 查看机器上shell路径的办法:
cat /etc/shells
Vim
vundle
1git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle 2git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Config:
1"显示行号 2set number 3 4"制表符为4 5set tabstop=4 6 7"软制表符为4 8set softtabstop=4 9 10"缩进空格数为4 11set shiftwidth=4 12 13" 设置自动缩进,即每一行与上一行的缩进相等 14"set autoindent 15 16set expandtab 17%ret! 4 18 19"设置C/C++语言的自动缩进 20set cindent 21 22""""""""""""""""""""""""""""""""""" 23" Tag list ctags 24"""""""""""""""""""""""""""""""""" 25map <C-F12> :!ctags -R --c++-kinds=+p --fields=+ias --extra=+q .<CR> 26 27nnoremap <silent> <F8> :TlistToggle<CR> 28let Tlist_Show_One_File = 1 29let Tlist_exit_onlyWindow = 1 30let Tlist_Use_Right_Window = 1 31""""""""""""""""""""""""""""""""" 32 33""""""""""""""""""""""""""""""""""" 34" NERDTree 35""""""""""""""""""""""""""""""""""" 36nnoremap <silent> <F7> :NERDTreeToggle<CR> 37""""""""""""""""""""""""""""""""""" 38 39 40filetype on 41filetype plugin on 42filetype indent on 43syntax on 44 45"git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle 46" vundle { 47set rtp+=~/.vim/bundle/vundle/ 48" 如果在windows下使用的话,设置为 49" set rtp+=$HOME/.vim/bundle/vundle/ 50call vundle#rc() 51" } 52" 53" let Vundle manage Vundle 54" required! 55Bundle 'gmarik/vundle' 56 57" My Bundles here: 58" 59" original repos on github 60" github上的用户写的插件,使用这种用户名+repo名称的方式 61" Bundle 'tpope/vim-fugitive' 62" Bundle 'Lokaltog/vim-easymotion' 63" Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} 64" Bundle 'tpope/vim-rails.git' 65" vim-scripts repos 66 67" vimscripts的repo使用下面的格式,直接是插件名称 68Bundle 'taglist.vim' 69Bundle 'c.vim' 70Plugin 'scrooloose/nerdTree' 71 72" non github reposo 73" 非github的插件,可以直接使用其git地址 74" Bundle 'git://git.wincent.com/command-t.git' 75" ... 76 77" 78" Brief help 79" :BundleList - list configured bundles 80" :BundleInstall(!) - install(update) bundles 81" :BundleSearch(!) foo - search(or refresh cache first) for foo 82" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles 83" vundle主要就是上面这个四个命令,例如BundleInstall是全部重新安装,BundleInstall!则是更新 84" 一般安装插件的流程为,先BundleSearch一个插件,然后在列表中选中,按i安装 85" 安装完之后,在vimrc中,添加Bundle 'XXX',使得bundle能够加载,这个插件,同时如果 86" 需要配置这个插件,也是在vimrc中设置即可 87" see :h vundle for more details or wiki for FAQ 88" NOTE: comments after Bundle command are not allowed.. 89
Shadowsocks
1sudo add-apt-repository ppa:hzwhuang/ss-qt5 2sudo apt-get update 3sudo apt-get install shadowsocks-qt5
SwitchOmega
adb 32位环境
1sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 2sudo apt-get install lib32z1
python
1sudo apt-get install python 2sudo apt-get install python-pip 3sudo apt-get install python-virtualenv 4sudo apt-get install virtualenvwrapper
修改pip源(修改到豆瓣): 执行:
cat > ~/.pip/pip.conf
输入:
1[global] 2trusted-host = pypi.douban.com 3index-url = http://pypi.douban.com/simple
Ctrl + D
sdkman
1curl -s "https://get.sdkman.io" | bash 2source "$HOME/.sdkman/bin/sdkman-init.sh"
groovy
sdk install groovy # 依赖sdkman
gradle
sdk install gradle # 依赖sdkman
Android源码
从这里下载可以使用迅雷,绕开repo更新。速度给力,10M左右。下载地址
截屏工具
1sudo add-apt-repository ppa:shutter/ppa 2sudo apt-get update 3sudo apt-get install shutter
python 国内镜像设置
创建文件 ~/.pip/pip.conf
1[global] 2index-url = https://pypi.tuna.tsinghua.edu.cn/simple 3[install] 4trusted-host = pypi.tuna.tsinghua.edu.cn