Skip to content
/ vimrc Public

Vimrc for Programmers using Vundle as plugin manager.

Notifications You must be signed in to change notification settings

vfreex/vimrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vimrc for Programmers

This is my vimrc inspired from the basic version of Amix's The Ultimate vimrc but using Vundle as plugin manager.

Features

  • Default color schema & key mappings are not modified.
  • The vimrc file is stored in ~/.vim, leaving your own ~/.vimrc intact.
  • The following plugins are included by default:
    • Vundle - Vundle is short for Vim bundle and is a Vim plugin manager.
    • YouCompleteMe - YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine for Vim.
    • YCM-Generator - A script which generates a list of compiler flags from a project with an arbitrary build system.
    • cscope-maps - Just old good cscope maps for vim.
    • NERDTree - The NERD tree allows you to explore your filesystem and to open files and directories.
    • lightline.vim - A light and configurable statusline/tabline for Vim.
    • ctrlp.vim - Full path fuzzy file, buffer, mru, tag, ... finder for Vim.

Installation

  • Clone from GitHub:
$ git clone --recursive https://github.com/vfreex/vimrc ~/.vim
  • Enable it by sourcing ~/.vim/vimrc:
$ vim ~/.vimrc
source ~/.vim/vimrc
  • Edit ~/.vim/vimrc for the list of plugins to install. Please read the document of Vundle carefully before making any change to the file.
$ vim ~/.vim/vimrc
  • Install plugins
$ vim
:VundleInstall
  • Install YouCompleteMe

YouCompleteMe requires additional steps to install. Please follow this guide.

Cheat Sheet

There are some key mappings defined in ~/.vim/vimrc. For the complete list of defined key mappings, you should read that file.

Following is a cheat sheet for programmers who uses this vimrc file. It doesn't mean that the key mappings listed here are all defined in my vimrc. (Some of them are defined by corresponding plugins while some of them are builtins.)

The leader key is , by default.

# Completion and Symbol Navigation
<leader>gy      generate .ycm_extra_conf.py for YouCompleteMe completion
<leader>gt      generate ctags file for Vim builtin completion and symbol navigation
<leader>gc      generate cscope.out file for cscope symbol navigation
<leader>jd      jump to defination (YouCompleteMe)
C+]             jump to defination (ctags)
<leader>ji      jump to include (YouCompleteMe)
<leader>jr      jump to references (YouCompleteMe)
C+\c           jump to references (cscope)
C+o             jump back
C+i             jump forward
<leader>tt      show type of the symbol (YouCompleteMe)
C+<Space>       (INSERT mode) force YouCompleteMe completion (even symbols from other projects)
C+p             force Vim builtin completion

# NERDTree and ctrlp
C+n             toggle NERDTree.
C+p             start ctrlp fuzzy file finder.

# Tabs
<leader>tn          open a new tab
<leader>te          open a file in a new tab
<leader>tc          close current tab
<leader>t<leader>   switch to the next tab

# Misc
:W              save your file using `sudo`
:cd             change to the directory of current file
<leader>pp      toggle PASTE mode
<leader>ss      toggle spell checker (use 'z=' to correct your word)
<leader><cr>    disable highlight
<leader>sv      reload (source) your vimrc

About

Vimrc for Programmers using Vundle as plugin manager.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published