---
# System prepended metadata

title: Setting-up vim
tags: [Vim]

---

# Setting-up vim

###### tags: `Vim`

My dotfiles save in here: https://github.com/joycenerd/dotfiles.git

## Install Vundle

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

## Install plugins

`vim .vimrc`
`:PluginInstall`

## Install powerline

https://ubuntuqa.com/zh-tw/article/310.html

If you have root permission:
1. `sudo apt install powerline`
2. `vim ~/.bashrc`

```bash
if [ -f `which powerline-daemon` ]; then
  powerline-daemon -q
  POWERLINE_BASH_CONTINUATION=1
  POWERLINE_BASH_SELECT=1
  . /usr/share/powerline/bindings/bash/powerline.sh
fi
```

If you don't have root permission:
1. `vim .vimrc`
```
Bundle 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
" Powerline setup
set laststatus=2
set term=xterm-256color
set termencoding=utf-8
set guifont=Ubuntu\ Mono\ derivative\ Powerline:10
" set guifont=Ubuntu\ Mono
let g:Powerline_symbols = 'fancy'
```
2. `:PluginInstall`

If you are using **MacOS**:

https://medium.com/@ITZDERR/how-to-install-powerline-to-pimp-your-bash-prompt-for-mac-9b82b03b1c02

