Last active
April 10, 2020 08:10
-
-
Save Kalki5/ac680f49e817b7fbffe7a79f3e2d45ea to your computer and use it in GitHub Desktop.
Ubuntu Better Bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt update | |
apt install -y powerline fonts-powerline | |
#wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf | |
#wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf | |
#mv PowerlineSymbols.otf /usr/local/share/fonts/ | |
#fc-cache -vf /usr/local/share/fonts/ | |
#mv 10-powerline-symbols.conf /etc/fonts/conf.d/ | |
# Apply style to Bash | |
echo "powerline-daemon -q | |
POWERLINE_BASH_CONTINUATION=1 | |
POWERLINE_BASH_SELECT=1 | |
. /usr/share/powerline/bindings/bash/powerline.sh | |
" | tee -a ~/.bashrc /etc/profile | |
# Apply style to Vim | |
mkdir -p ~/.vim/{bundle,autoload} | |
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim | |
git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline | |
git clone https://github.com/vim-airline/vim-airline-themes ~/.vim/bundle/vim-airline-themes | |
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree | |
cat <<EOF > ~/.vimrc | |
set encoding=utf-8 | |
""""""""""""""""""" | |
" show spaces and tabs | |
" make 2 spaces from a tab | |
"""""""""""""""""" | |
set t_Co=256 | |
set listchars=tab:→\ ,trail:· | |
set list | |
set expandtab | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=4 | |
"""""""""""""""""""" | |
" Enable pathogen | |
"""""""""""""""""""" | |
execute pathogen#infect() | |
""""""""""""" | |
" Nerdtree | |
""""""""""""" | |
map <C-b> :NERDTreeToggle<CR> | |
map <C-l> :tabn<CR> | |
map <C-k> :tabp<CR> | |
map <C-t> :tabnew<CR> | |
let NERDTreeQuitOnOpen=1 | |
let NERDTreeShowHidden=1 | |
let NERDTreeCustomOpenArgs={'file':{'where':'t'}} | |
""""""""""""" | |
" Airline | |
""""""""""""" | |
let g:airline_powerline_fonts = 1 | |
let g:airline_theme='powerlineish' | |
let g:airline#extensions#tabline#enabled = 1 | |
EOF | |
cp ~/.vimrc ~/.vim /home/ubuntu | |
chown ubuntu:ubuntu -R ~/.vim* | |
# `Ctrl + b` to toggle NerdTree | |
# `Ctrl + w` + `Arrows` to switch | |
# `Ctrl + z` to mimize vim | |
# `fg` to restore vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -fSsL https://gist.githubusercontent.com/Kalki5/ac680f49e817b7fbffe7a79f3e2d45ea/raw/c8eaaa6e0fe5dac119e530bf3314e6d52f652fc3/better_bash.sh | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment