Skip to content

matthewfaw/vim-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

vim-setup

This is my vim setup.

Here's how to get started:

  1. If setting up a new environment:
    • Setup Oh My Zsh to make the shell look nice. I tend to like the ZSH_THEME="bira" setting.
    • Install powerline-fonts using the instructions linked in that repo. Note that, if using iTerm2, need to set both the Regular font and the Non-ASCII Font in "iTerm > Preferences > Profiles > Text" to use a patched font (Meslo LG M Bold for Powerline), per this issue.
    • It's nice to use the z command. Follow the steup instructions from that repo.
  2. Clone this repo.
  3. Create a symlink in the home directory to the vimrc in this repo using ln -s /full/path/to/vimrc ~/.vimrc, and similarly for latexmkrc.
  4. Set up neovim: brew install neovim and pip3 install neovim-remote, then add the following lines to your .zshrc file: export NVIM_LISTEN_ADDRESS=/tmp/nvimserver and alias vim="nvim -u ~/.vimrc --listen $NVIM_LISTEN_ADDRESS"
  5. Install needed packages for fzf: brew install the_silver_searcher fzf
  6. Install Vundle using git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  7. Open vim, and install all packages using: :VundleInstall
  8. Install Skim pdf viewer.
  9. Set up Skim for backwards search for LaTeX: go to Preferences > Sync, then under PDF-TeX support, choose Preset: custom, command: nvr, and arguments --servername /tmp/nvimserver --remote-silent %file -c %line

The following plugins will be installed by running :VundleInstall:

  • Vundle
    • a vim plugin manager
  • vim-airline
    • Nice-looking status/tab line
  • vim-airline-themes
    • Themes for vim-airline
  • vim-fugitive
    • Git plugin for vim
    • Allows vim-airline to display git branch info
  • vim-colors-solarized
    • For a nice vim color scheme
  • vimtex
    • Easily compile/load pdf/clean directory for Latex
    • Note: To compile multi-file project, specify main file using an indicator file <name of main file WITHOUT .tex>.latexmain
    • This config also depends on Skim PDF viewer. Follow instructions in the above list to make the viewer work nicely with this setup
    • I use neovim for my vim editor. To make sure that backwards search works with Skim, make sure to open nvim listening to a server: nvim -u ~/.vimrc --listen /tmp/nvimserver
  • auto-pairs
    • Auto-close parens and such
  • supertab
    • Light-weight tab completion
  • NERDCommenter
    • Easily comment lines
  • NERDTree
    • Display the file tree
  • fzf.vim
    • Quickly search for files (by typing <Leader>f, i.e. \f) and text (by typing <Leader>a, i.e. \a)
    • Note that this relies on both fzf and the_silver_searcher being installed through homebrew, as mentioned above.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published