This is my personal vim set up. I'm using GitHub for version control & portability.
Description | Name (Link to GitHub) |
---|---|
Plug in manager | Vim Plug |
File browsing | NERDTree |
Git gutter | Vim-Signify |
Whitespace stripping | Vim-Better-Whitespace |
Better indents for parentheses/brackets | Indent-Python |
Code linting | Ale |
Previewing Markdown in browser | previm |
Easy commenting/uncommenting | vim-commentary |
Aligning text, tables, values, etc. | tabular |
Better status line at bottom of screen | lightline.vim |
Function that returns name of git branch | vim-gitbranch |
Color Scheme | onehalf |
Python Syntax Highlighting | python-syntax |
Status bar that includes flake8 errors | lightline-ale |
-
If .vim dir already exists, check to see if any relevant file need to be copied.
If so, copy file(s) into home dir
cp ~/.vim/spell ~/spell -r
-
Remove existing .vim dir AFTER relevant files have been copied
rm .vim --recursive
-
Remove .vimrc if it exists
rm .vimrc
-
Clone repo
git clone https://github.com/loganthomas/.vim.git
-
Create symbolic link (like shortcut) in home directory
ln -s ~/.vim/vimrc ~/.vimrc
-
If previous relevant files were copied, move them into new (cloned) .vim dir
mv ~/spell ~/.vim/spell
-
Install plug-ins
vim
:PlugInstall
-
Cleanup plug-ins (delete unused plug-ins)
vim
:PlugClean
-
Once .vim has been ported (following above), no need to re-create symbolic link.
Pulling from repo will include updates. -
Simply pull from repo (within cloned repo in env to update)
git pull origin master
-
If new vim plug ins were added, must install them
vim
:PlugInstall
-
If old vim plug ins were removed, must uninstall them
vim
:PlugClean
-
If new vim plug ins require a python package, must install it
(For example, syntastic requires flake8 python package)
pip insall flake8
ORpip install flake8 --user
- Use
:PrevimOpen
to open.md
file in browser for preview - Use
:help g:previm_open_cmd
for man page# Windows let g:previm_open_cmd = 'start chrome' # Mac let g:previm_open_cmd = 'open -a Google\ Chrome'