Ubuntu Development Environment Settings

Sometimes due to unkown reasons, my Ubuntu development environment will crash without any expections. Even rebooting would not help to recover to the previous environment. Then the only way to do is to re-install the Ubuntu system and tediously configure all the settings from scratch. Thus I wrote this blog to help keep record of my personal development settings in case of any sudden system crashes, and to avoid being screwed up for several day.

Installations

1
2
3
4
5
6
sudo apt-get update
sudo apt-get install vim
sudo apt-get install vim-gnome
sudo apt-get install python-dev
sudo apt-get install python-pip
sudo apt-get install ros-indigo-desktop-full

Python

1
2
3
4
sudo pip install --upgrade pip
sudo pip install numpy
sudo pip install scipy
sudo pip install pandas

ROS

1
2
3
4
5
sudo rosdep init
rosdep update
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt-get install python-rosinstall

Version control

1
sudo apt-get install git

Custom keyboard layout

1
2
sudo apt-get install gnome-tweak-tool
gnome-tweak-tool

Terminal settings

vi keymappings

1
2
3
# ~/.inputrc
set editing-mode vi
set keymap vi


Vim settings

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# ~/.vimrc
set nocompatible
filetype off
set go=
set hidden
set wildmenu
set showcmd
set hlsearch
set smartcase
set autoindent
set ruler
set number
" set relativenumber
set autoread
set shiftwidth=4
set softtabstop=4
set tabstop=4
set cursorline
set expandtab
set showmatch
set foldenable
set encoding=utf-8
set guifont=Consolas:h14
set spell spelllang=en_us
set t_Co=256
colorscheme molokai
" leader
let mapleader = " "
nmap <leader>w :w<CR>
nmap <leader>q :q<CR>
nmap <leader>Q :q!<CR>
nmap <leader>p "+p<CR>
nmap <leader>P "+P<CR>
vmap <leader>y "+y<CR>
vmap <leader>p "+p<CR>
vmap <leader>P "+P<CR>
nmap <leader>s ZZ<CR>
nmap <leader><leader> :sh<CR>
" pathogen
execute pathogen#infect()
syntax on
filetype plugin indent on
" gitgutter
let g:gitgutter_max_signs=10000
" airline
let g:airline#extensions#tabline#enabled = 1
set ambiwidth=double
set noshowmode
set laststatus=2
" tagbar
nmap <F4> :TagbarToggle<CR>
" latex
filetype plugin on
filetyp indent on
let g:Tex_IgnoredWarnings=7
let g:Tex_DefaultTargetFormat='pdf'
set shellslash
set grepprg=grep\ -nH\ $*
let g:tex_flavor='latex'
set sw=2
" YouCompleteMe
let g:ycm_python_binary_path='usr/bin/python2'
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py'
let g:ycm_confirm_extra_conf =0
" set current path as the path
set autochdir
" hange cursor shape between insert and normal mode in iTerm2.app
if $TERM_PROGRAM =~ "iTerm"
let &t_SI = "\<Esc>]50;CursorShape=1\x7" " Vertical bar in insert mode
let &t_EI = "\<Esc>]50;CursorShape=0\x7" " Block in normal mode
endif
set timeoutlen=500 ttimeoutlen=0

0%