This is a fork of vgod's vimrc, with personal preferential changes.
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
-
Check out from github
git clone git://github.com/starsirius/vimrc.git ~/.vim cd ~/.vim git submodule update --init
-
Install ~/.vimrc and ~/.gvimrc
./install-vimrc.sh
-
(Optional, if you want Command-T) Compile the Command-T plugin
cd .vim/bundle/command-t/ruby/command-t ruby extconf.rb make
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
see the "USEFUL SHORTCUTS" section in vimrc to learn my shortcuts.
-
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 asname
:NERDTree [name]
- open the bookmarkname
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
- Requires addon-mw-utils and tlib.
: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+).
- 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.)
I've compiled and plotted a Vim Cheat Sheet for beginners. Welcome to download and learn Vim with it.
- Vim Visual Cheat Sheet (PNG)
- Vim Visual Cheat Sheet (PDF)
- Vim入門圖解 Chinese Ver. (PNG)
- Vim入門圖解 Chinese Ver. (PDF)
These Vim Visual Cheat Sheets are released under Creative Commons Attribution-ShareAlike 3.0 Unported License.
- 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.
This vimrc project is released under Creative Commons Attribution-ShareAlike 3.0 Unported License.