Skip to content

starsirius/vimrc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vimrc

This is a fork of vgod's vimrc, with personal preferential changes.

One-step Install

Use curl (for Mac OS X):

curl -o - -L https://raw.github.com/starsirius/vimrc/master/auto-install.sh | sh

or wget (for most UNIX platforms):

wget -O - https://raw.github.com/starsirius/vimrc/master/auto-install.sh | sh

Manual Install

  1. Check out from github

    git clone git://github.com/starsirius/vimrc.git ~/.vim
    cd ~/.vim
    git submodule update --init
    
  2. Install ~/.vimrc and ~/.gvimrc

    ./install-vimrc.sh
    
  3. (Optional, if you want Command-T) Compile the Command-T plugin

    cd .vim/bundle/command-t/ruby/command-t
    ruby extconf.rb
    make
    

Install & Upgrade Plugin Bundles

All plugins were checked out as git submodules, which can be upgraded with git pull. For example, to upgrade Command-T

cd ~/.vim/bundle/command-t
git pull

To upgrade all submodules, for git 1.8.2 or above,

git submodule update --remote

or for git 1.6.1 or above,

git submodule foreach git pull origin master

To install a new plugin as a git submoudle, type the following commands.

cd ~/.vim
git submodule add [GIT-REPOSITORY-URL] bundle/[PLUGIN-NAME]

To ignore untracked content in a submodule, add the property under the submodule:

ignore = untracked

How to Use

see the "USEFUL SHORTCUTS" section in vimrc to learn my shortcuts.

Plugins

  • Pathogen: Pathogen lets us install a plugin as a bundle in ~/.vim/bundle separately.

  • NERDTree: A tree explorer plugin for navigating the filesystem.

    • :Bookmark [name] - bookmark any directory as name
    • :NERDTree [name] - open the bookmark name in NERDTree
  • AutoClose: Inserts matching bracket, paren, brace or quote.

  • vim-surround: deal with pairs of surroundings.

  • xmledit: XML/HTML tags will be completed automatically.

  • Command-T: open and navigate between files with cmd-t.

  • SuperTab: Do all your insert-mode completion with Tab.

  • snipMate: TextMate-style snippets for Vim

    :help snipMate to see more info.

  • YankRing: Maintains a history of previous yanks, changes and deletes

    :help yankring to see more info.

  • EasyMotion: An easy way to jump to a word.

    Useful commands: ,,w forward EasyMotion ,,b backward EasyMotion

  • Indent Motion: Vim motions to the start and end of the current indentation-delimited block

    Useful commands: ,] move to the end of the current indentation-delimited block (very useful in Python and CoffeeScript) ,[ move to the beginning of the current indentation-delimited block (very useful in Python and CoffeeScript)

  • emmet-vim: expanding abbreviation similar to emmet.

    Useful commands: <ctrl-y>, expand emmet abbreviation.

  • ack.vim: run ack (a better grep) from vim, and shows the results in a split window.

    :Ack [options] {pattern} [{directory}]

  • Git Gutter: shows a git diff in the 'gutter' (sign column). It shows whether each line has been added, modified, and where lines have been removed.

  • CtrlP: Fuzzy file, buffer, mru, tag, etc finder.

  • ale: Asynchronous Lint Engine, a LSP client for linting (Vim 8+).

Language specific supports

  • Restructured Text: ctrl-u 1~5 inserts Part/Chapter/Section headers
  • HTML, Javascript, CoffeeScript, Python, CSS, C, C++, Java: use TAB to do omni-completion.
  • HTML/XML: End tags are automatically completed after typing a begin tag. (Typing > twice pushes the end tag to a new line.)

Other good references

Vim Visual Cheat Sheet

I've compiled and plotted a Vim Cheat Sheet for beginners. Welcome to download and learn Vim with it.

My Vim Visual Cheat Sheet

These Vim Visual Cheat Sheets are released under Creative Commons Attribution-ShareAlike 3.0 Unported License.

FAQ

  • What is the ~/.vim directory? The ~/.vim directory is used by Vim to search for scripts. Take a look at runtimepath or :help vimfiles and learn the default layout of the directory.

License

This vimrc project is released under Creative Commons Attribution-ShareAlike 3.0 Unported License.

About

starsirius' vimrc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 98.8%
  • Shell 1.2%