Notes

Customizing Vim

Edit on GitHub

Workflow

install plugins

With apt-vim you can install plugins by specifying their Git URLs

1# install `apt-vim`
2curl -sL https://raw.githubusercontent.com/egalpin/apt-vim/master/install.sh | sh
3source ~/.bashrc || source ~/.bash_profile
4
5# install `nerdtree`
6apt-vim install -y https://github.com/scrooloose/nerdtree.git

config file

 1" NerdTree
 2"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 3" Open NERDTree automatically when Vim starts
 4autocmd vimenter * NERDTree
 5
 6" show hidden files by default
 7" you can also manually toggle hiddden files: `Shift + i`
 8let NERDTreeShowHidden=1
 9
10" close vim if the only window left open is a NERDTree
11autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif