Skip to content

peter-wangxu/vim-configuration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-configuration

This project provides a handy vim configuration, you can enable them in just one click. See section [Installation Guide](#Installation Guide) for how. Generally, this configuration fits best for Python and partial for C.

Screenshot

screenshot

Supported platforms

  • Ubuntu/Mint/Debian

Installation Guide

$ git clone https://github.com/peter-wangxu/vim-configuration
$ cd vim-configuration/
$ ./install.sh
$ Change font in Terminal or Putty or GVim to powerline related.

Installed plugins

.vimrc

A basic configuration file from VIM

.vim_default

A Vundle style rc file for VIM, the install.sh will use this file to setup your vim environment

Usage for each Plugins

vim-fugitive

A git wrapper for vim

jedi-vim

With this plugin's support, you can jump between function definition and it's usage.

  • <leader> + d: Goto definition
  • <leader> + n: show all usages of this function
  • <leader> + g: Goto assignments
  • K: show documentations/Pydoc
  • <leader> + r: rename/refactor

Tagbar

  • F4: toggle tagbar

nerdtree

A file explorer for vim.

  • F2: toggle nerdtree

command-t

Fast file finder for vim.

  • F3: Open project file finder
  • <leader> + b: Open buffer finder

ctags(exuberant-ctags on Debian/Ubuntu)

To use this, run ctags -R on the root folder of your project.

  • Ctrl + ]: Goto definition
  • Ctrl + t: Back to previous usage

airblade/vim-gitgutter

A plugin to show git diff in vim.

vim-surround

Add surroundings like quotations, brackets, parentheses in pairs.

  • cs'": change ' to ".
  • ysiw": add " for word under cursor.
  • ds": delete " for word under cursor.

Note: above ' or " can be any character like }, ], ).

scrooloose/syntastic

Syntax check(pep8 or pylint) for Python. To enable this please manually install sudo pip install flake8, if you want more detailed check, install sudo pip install pylint (while I disable pylint as it's providing awful error checkout for me)

  • Syntax check when write using w.
  • F7: jump to previous error.
  • F8: jump to next error.
  • :lopen: open full list of errors.
  • :lclose: close full list.

tabular

Text alignment for multiple lines. To align text, you need to select text in visual mode and use Tab /:. : can be any character like ,, |, =.

  • Select text and :Tab /: to align selected lines.

nerdcommenter

  • <leader> + cc: Comment out the current line or text selected in visual mode.

See more tips [here] (http://vimcasts.org/episodes/aligning-text-with-tabular-vim/)

References

About

A handy vim configuration for Python and C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published