/vim-settings

Vimrc for Pythoners

Primary LanguageVim Script

My VIM Settings

This project is extracted from my dot files

This VIM settings is for Python programmers on Mac OSX. It use Vundle to manage the plugins.

###VIM Version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 13 2015 00:22:48)

MacOS X (unix) version

###Dependences

brew install vim git npm ctags
sudo npm -g install instant-markdown-d jshint
sudo pip install isort jedi yapf flake8 virtualenvwrapper

[Maybe I have forgot some other dependences :( ]

###Plugins

###Short Keys

  • change buf: ]b [b
  • change tab: ]t [t
  • copy (all/selected) content: Ctrl+c
  • write RO file: w!!
  • line number toggle: <F2>
  • nerdtree toggle: <F3>
  • tagbar toggle: <F4>
  • run python script: <F5>
  • open a new tab: <F6>
  • paste toggle: <F7>
  • PEP8 format: <F8>
  • wrap "/' for a word: w"/w'
  • continue indent text to left or right on select/normal mode: > <
  • change window: <C-HJKL>
  • preview to select emoji: :<C-e>
  • find files: <C-p>
  • complete python code: <C-n>
  • format json line: <leader>jw <leader>jp
  • change surround: csXY
  • del surround: dsX
  • comment/uncomment: \cc/\cu
  • table format: \tt

###Features

  • no backup and swap file
  • correct encoding for chinese
  • beautiful statusline and startify
  • auto reload vimrc when it is changed
  • highlight and ignorecase for search text
  • support using mouse
  • auto remove whitespace which at the line tail and blank line at the latest
  • show content in terminal when exit the vim
  • open a file at the latest change position
  • auto check PEP8 format when read or write a python script
  • one key to format python code with PEP8
  • run python script with virtualenv if there is a $VIRTUAL_ENV (open script with virtualenv in terminal)
  • auto open browser to preview when you open a markdown file, auto close the browser when you close the markdown file.
  • auto complete the python code, use Ctrl+n
  • show git diff in vim
  • show indent guides
  • multiple cursors for editing
  • auto complete python sniptes by <tab> or <shift-tab>
  • use tomorrow-night-bright color scheme
  • color preview for .css files
  • format markdown tables

###Screenshots

default open a python file

working


next pics come from the plugin projects

ctrlp find files:

ultisnips (I am not using YouCompleteMe, using jedi-vim)

jedi complete

preview markdown

json line format(I am the author 😳)

emoji

startify

multiple cursors

###Usage

Copy the .vim and .vimrc to your home.

cp -r .vim ~
cp .vimrc ~

or use vundle, just need copy .vimrc and:

:PluginInstall