Ubuntu开发环境配置

Shell

zsh & oh-my-zsh

配置oh-my-zsh之前要先安装Git

sudo apt-get install zsh
sudo apt-get install git
wget 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

Guake

sudo apt-get install guake

vim

sudo apt-get install vim-gnome

vundle

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Colors:

git clone https://github.com/tomasr/molokai ~/molokai
cp molokai/colors/molokai.vim ~/.vim/colors/
sudo rm -r ~/molokai #  复制出来就删除吧

Config:

" 配色
colorscheme molokai

set t_Co=256

"显示行号
set number

"制表符为4
set tabstop=4

"软制表符为4
set softtabstop=4

"缩进空格数为4
set shiftwidth=4

" 设置自动缩进,即每一行与上一行的缩进相等
"set autoindent

set expandtab
%ret! 4

"设置C/C++语言的自动缩进
set cindent

"""""""""""""""""""""""""""""""""""
" Tag list ctags
""""""""""""""""""""""""""""""""""
map <C-F12> :!ctags -R --c++-kinds=+p --fields=+ias --extra=+q .<CR>

nnoremap <silent> <F8> :TlistToggle<CR>
let Tlist_Show_One_File = 1
let Tlist_exit_onlyWindow = 1
let Tlist_Use_Right_Window = 1 
"""""""""""""""""""""""""""""""""

"""""""""""""""""""""""""""""""""""
"               NERDTree
"""""""""""""""""""""""""""""""""""
nnoremap <silent> <F7> :NERDTree<CR>
"""""""""""""""""""""""""""""""""""


filetype on
filetype plugin on
filetype indent on
syntax on

"光标所在行高亮
set cursorline
hi CursorLine NONE term=underline ctermbg=234 guibg=#293739 


"git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
" vundle {
set rtp+=~/.vim/bundle/vundle/
" 如果在windows下使用的话,设置为
" set rtp+=$HOME/.vim/bundle/vundle/
call vundle#rc()
" }
"
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'

" My Bundles here:
"
" original repos on github
" github上的用户写的插件,使用这种用户名+repo名称的方式
" Bundle 'tpope/vim-fugitive'
" Bundle 'Lokaltog/vim-easymotion'
" Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
" Bundle 'tpope/vim-rails.git'
" vim-scripts repos

" vimscripts的repo使用下面的格式,直接是插件名称
Bundle 'taglist.vim'
Bundle 'c.vim'
Plugin 'scrooloose/nerdTree'

Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'

" non github reposo
" 非github的插件,可以直接使用其git地址
" Bundle 'git://git.wincent.com/command-t.git'
" ...
  
"
" Brief help
" :BundleList          - list configured bundles
" :BundleInstall(!)    - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!)      - confirm(or auto-approve) removal of unused bundles
" vundle主要就是上面这个四个命令,例如BundleInstall是全部重新安装,BundleInstall!则是更新
" 一般安装插件的流程为,先BundleSearch一个插件,然后在列表中选中,按i安装
" 安装完之后,在vimrc中,添加Bundle 'XXX',使得bundle能够加载,这个插件,同时如果
" 需要配置这个插件,也是在vimrc中设置即可
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..

" 关闭markdown的自动折叠
let g:vim_markdown_folding_disabled = 1

"文件类型关联
au BufNewFile,BufRead *.gradle setf groovy
au BufNewFile,BufRead *.md setf markdown

Shadowsocks

sudo add-apt-repository ppa:hzwhuang/ss-qt5
sudo apt-get update
sudo apt-get install shadowsocks-qt5

SwitchOmega

downloadurl : https://github.com/FelisCatus/SwitchyOmega/releases

jdk

sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
export JAVA_HOME=/usr/lib/jvm/java-7-oracle

adb 32位环境

sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
sudo apt-get install lib32z1

python

sudo apt-get install python
sudo apt-get install python-pip
sudo apt-get install python-virtualenv
sudo apt-get install virtualenvwrapper

修改pip源(修改到豆瓣): 执行:

cat > ~/.pip/pip.conf

输入:

[global]
trusted-host =  pypi.douban.com
index-url = http://pypi.douban.com/simple

Ctrl + D

sdkman

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

groovy

sdk install groovy # 依赖sdkman

gradle

sdk install gradle # 依赖sdkman

Android源码

从这里下载可以使用迅雷,绕开repo更新。速度给力,10M左右。 https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值