Vim Howtos and Tips

Vim is a fast and handy editor on *nix systems. Like Emacs, Vim has a steep learning curve as you get constantly get new things. However, the effort deserves it as you efficiency is highly improved. Here, I summarize the tips and howtos I learned using Vim. Some previous posts on vim are tagged with

My .vimrc and .vim file

My .vimrc and .vim files:

How to use these files

cd /path/to/vim-config/
git submodule update --init

If you never configured Vim:

ln -s /path/to/vim-config/.vimrc ./
ln -s /path/to/vim-config/.vim ./

If you ever configured your Vim, you may need to merge my configurations to yours.


Previous posts tagged vim

Check the posts tagged vim:

Latex Writing in Vim with the Help of vim-latex

vim-latest is a great plugin for Vim to assisting editing of Latex files.

master file

Creating a file with the extension latexmain to specify the master file which is used to find the references. For example, to specify the main.tex is the master file, create the file main.tex.latexmain.

List references to sections, figure and tables to insert

Press <F9> after inputting \ref{.

Use keys N and P to navigate the references.

List citations from the bibtex file to insert

Press <F9> after inputting \cite{.

Use keys N and P to navigate the citations. Use ‘/’ to start searching.

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.


  1. You can use `CTRL-O` and `CTRL-I` to jump to previous/next position jumped by `g` or `gg` or `G` or similar commands.

    You can use `g;` and `g,`can jump to the previous/next changed places.

  2. Set the character encoding for a file in vim:

    set fileencodings=utf-8,latin1

    It can contain a list of encodings. Vim will try the encodings from left to right till it find a workign one.

Leave a Reply

Your email address will not be published. Required fields are marked *