spf13 presents
spf13-vim is a distribution of vim plugins and resources for Vim, GVim and MacVim.
It is a completely cross platform distribution that stays true to the feel of vim while providing modern features like a plugin management system, autocomplete, tags and tons more.
- Vim: Install Solarized on Mac OS X. Mac-os-x solarized vim: Today, I finally got sufficiently irritated about the color Vim uses to display comments in Ruby (on a Mac OS X system), so much so that I decided to look for an alternate colorscheme. Somewhere along the way, I stumbled upon Solarized, which looks really nice.
- $ sudo pkg install editors/vim Installation on Mac OS X. The strategy is similar to Mac OS X: we install the GUI version to get both the GUI and the TUI. In the end, we should be able to: double-click the MacVim icon in the Finder, click on the MacVim icon in the Dock.
Install Vim in Mac. Vim binaries is not available in official Vim website, rather developed and maintained by Macintosh lovers, who actively update, and maintain Vim, release latest binaries, maintain Mac look and feel of Vim. Vim, the most actively developed version is called CocoaGUI or MacVim can be installed by entering the following command. First, install it. On your Mac, you can use Homebrew: $ brew install tmux. Ubuntu or Debian users can user apt-get: $ sudo apt-get install tmux. Now, colors are also an issue when running Vim within Tmux. Create or edit the file /.tmux.conf: $ vim /.tmux.conf set -g default-terminal 'screen-256color' Now we're ready.
- Featured Plugins
- Other Awesome stuff
- Community
Easy Installation *nix and os x
The easiest way to install spf13-vim is to use our automatic installer by simply copying and pasting the following line into a terminal. This will install spf13-vim and backup your existing vim configuration.
If you are upgrading from a prior version (before 3.0) this is also the recommended installation.
Updating to the latest version
Installing on Windows
On Windows and *nix Git and Curl are required.
Installing dependencies
Install msysgit
After installation try running git --version
within command prompt (press Win-R, type cmd
, press Enter) to make sure all good:
Setup Curl
Instructions blatently copied from vundle readmeInstalling Curl on Windows is easy as Curl is bundled with msysgit!But before it can be used with Vundle it's required make curl
run in command prompt.The easiest way is to create curl.cmd
with this content
And copy it to C:Program FilesGitcmdcurl.cmd
, assuming msysgit was installed to c:Program FilesGit
to verify all good, run:
Installing spf13-vim on Windows
The easiest way is to download and run the spf13-vim-windows-install.cmd file.
Gvim For Mac Os X
The .vimrc file is suited to programming. It is extremely well organized and folds in sections. Each section is labeled and each option is commented.
It fixes many of the inconveniences of vanilla vim including
- A single config can be used across Windows, Mac and linux
- Eliminates swap and backup files from littering directories, preferring to store in a central location.
- Fixes common typos like :W, :Q, etc
- Setup a solid set of settings for Formatting (change to meet your needs)
- Setup the interface to take advantage of vim's features including
- omnicomplete
- line numbers
- syntax highlighting
- A better ruler & status line
- & more
- Configuring included plugins
Customization
Create ~/.vimrc.local
and ~/.gvimrc.local
for any local customizations.
For example, to override the default color schemes:
Vundle The best plugin manager
Vundle is an excellent system built on the same principles as Pathogen, but with an integrated plugin management system that is Git and Github aware.
spf13-vim uses the Vundle plugin management system to have a well organized vim directory (Similar to mac's app folders). Vundle also ensures that the latest versions of your plugins are installed and makes it easy to keep them up to date.
NERDTreefile navigation
NERDTree is a file explorer plugin that provides 'project drawer' functionality to your vim editing. You can learn more about it with :help NERDTree or checkout my post on NERDTree.
QuickStart Launch using <Leader>e
.
Customizations:
- Use
<C-E>
to toggle NERDTree - Use
<leader>e
or<leader>nt
to load NERDTreeFind which opens NERDTree where the current file is located. - Hide clutter ('.pyc', '.git', '.hg', '.svn', '.bzr')
- Treat NERDTree more like a panel than a split.
ctrlpfast file finder
Ctrlp replaces the Command-T plugin with a 100% viml plugin. It provides an intuitive and fast mechanism to load files from the file system (with regex and fuzzy find), from open buffers, and from recently used files.
QuickStart Launch using <c-p>
.
Surroundmanaging all the '[{}]' etc
This plugin is a tool for dealing with pairs of 'surroundings.' Examples of surroundings include parentheses, quotes, and HTML tags. They are closely related to what Vim refers to as text-objects. Provided are mappings to allow for removing, changing, and adding surroundings.
Details follow on the exact semantics, but first, consider the following examples. An asterisk (*) is used to denote the cursor position.
For instance, if the cursor was inside 'foo bar'
, you could type cs'
to convert the text to 'foo bar'
.
There's a lot more, check it out at :help surround
NERDCommentercomment++
NERDCommenter allows you to wrangle your code comments, regardless of filetype. View help :NERDCommenter
for all the details.
QuickStart Toggle comments using <Leader>c<space>
in Visual or Normal mode.
Syntasticintegrated syntax checking
Syntastic is a syntax checking plugin that runs buffers through external syntax checkers as they are saved and opened. If syntax errors are detected, the user is notified and is happy because they didn't have to compile their code or execute their script to find them.
numbers.vimbetter line numbers
This plugin will alternate between relative numbering (normal mode) and absolute numbering (insert mode) depending on the mode you are in. This allows you to easily move code around with the relative line numbers when in normal mode. As well as providing accurate line numbers when writing code in insert mode
neocomplcacheautocomplete++
NeoComplCache is an amazing autocomplete plugin with additional support for snippets. It can complete simulatiously from the dictionary, buffer, omnicomplete and snippets. This is the one true plugin that brings Vim autocomplete on par with the best editors.
QuickStart Just start typing, it will autocomplete where possible
Customizations:
- Automatically present the autocomplete menu
- Support tab and enter for autocomplete
<C-k>
for completing snippets.
Fugitive deep git integration
Fugitive adds pervasive git support to git directories in vim. For more information, use :help fugitive
Use :Gstatus
to view git status
and type -
on any file to stage or unstage it. Type p
on a file to enter git add -p
and stage specific hunks in the file.
Use :Gdiff
on an open file to see what changes have been made to that file
QuickStart<leader>gs
to bring up git status
Customizations:
<leader>gs
:Gstatus<leader>gd
:Gdiff<leader>gc
:Gcommit<leader>gb
:Gblame<leader>gl
:Glog<leader>gp
:Git push- :Git ___ will pass anything along to git.
PIV PHP editing
The most feature complete and up to date PHP Integration for Vim with proper support for PHP 5.3+ including latest syntax, functions, better fold support, etc.
PIV provides:
- PHP 5.3 support
- Auto generation of PHP Doc (,pd on (function, variable, class) definition line)
- Autocomplete of classes, functions, variables, constants and language keywords
- Better indenting
- Full PHP documentation manual (hit K on any function for full docs)
Tabularize align everything
Tabularize lets you align statements on their equal signs and other characters
Customizations:
<Leader>a=
:Tabularize /=<Leader>a:
:Tabularize /:<Leader>a::
:Tabularize /:zs<Leader>a,
:Tabularize /,<Leader>a<Bar>
:Tabularize /
Tagbartag generation and navigation
spf13-vim includes the Tagbar plugin. This plugin requires exuberant-ctags and will automatically generate tags for your open files. It also provides a panel to navigate easily via tags
QuickStartCTRL-]
while the cursor is on a keyword (such as a function name) to jump to it's definition.
Customizations: spf13-vim binds <Leader>tt
to toggle the tagbar panel
Note: For full language support, run brew install ctags
to install exuberant-ctags.
Tip: Check out :help ctags
for information about VIM's built-in ctag support. Tag navigation creates a stack which can traversed via Ctrl-]
(to find the source of a token) and Ctrl-T
(to jump back up one level).
EasyMotionjump anywhere
EasyMotion provides an interactive way to use motions in Vim.
It quickly maps each possible jump destination to a key allowing very fast and straightforward movement.
QuickStart EasyMotion is triggered using the normal movements, but prefixing them with <leader><leader>
For example this screen shot demonstrates pressing ,w
Adding Your Own Bundles
Create ~/.vimrc.bundles.local
for any additional bundles.
To add a new bundle
Custom Settings
Create ~/.vimrc.local
and ~/.gvimrc.local
for any local customizations.
For example, to override the default color schemes:
Additional Syntaxes
spf13-vim ships with a few additional syntaxes:
- Markdown (bound to *.markdown, *.md, and *.mk)
- Twig
- Git commits (set your
EDITOR
tomvim -f
)
Amazing Colors
spf13-vim includes solarized and spf13 vim color pack:
- ir_black
- molokai
- peaksea
Use :color molokai
to switch to a color scheme.
Snippets
It also contains a very complete set of snippets for use with snipmate or NeoComplCache.
Tutorials
- Type
vimtutor
into a shell to go through a brief interactive tutorial inside VIM. - Read the slides at VIM: Walking Without Crutches.
Modes
- VIM has two (common) modes:
- insert mode- stuff you type is added to the buffer
- normal mode- keys you hit are interpreted as commands
- To enter insert mode, hit
i
- To exit insert mode, hit
<ESC>
Useful commands
- Use
:q
to exit vim - Certain commands are prefixed with a
<Leader>
key, which by default maps to.
- Spf13-vim uses
let mapleader = ','
to change this to,
which is in a consistent and convenient location. - Keyboard cheat sheet.
Mailing List
Be notified of major updates
Discussion Group
Discuss issues, ideas, plugins
Contributing
GitHub makes for easy contribution
All development is done via GitHub. Fork and issue a pull request or file an issue.
Vim is available for many different systems and there are several versions.This page will help you decide what to download.Most popular:MS-Windows: | Click this link to download the self-installing executable(using ftp). Signed MS-Windows files are available on thevim-win32-installer site(gvim_8.2.0012_x86_signed.exe is recommended) |
Unix: | See the GitHub page, or Mercurial, if you prefer that.There is also anAppimagewhich is build daily and runs on many Linux systems. |
Mac: | See the MacVim project for a GUI version and Homebrew for a terminal version |
Details and options for:
Mirrors | Alternative sites to download Vim files from. |
Sources | Build Vim yourself and/or make changes. |
GitHub | Obtain Vim sources with a git client (recommended). |
Mercurial | Obtain Vim sources with a Mercurial client(recommended if you don't like git). |
Patches | Include the latest improvements (requires sources and rebuilding). |
Runtime | Get the latest syntax files, documentation, etc.. |
Script links | Links to individual syntax, indent, color, compiler and ftplugin scripts. |
Translations | Non-English documentation packages. |
Versions before 7.3 can also be obtained withSubversionandCVS.Vim 8.2 is the latest stable version. It is highly recommended, many bugs have been fixed since previous versions.If you have a problem with it (e.g.,when it's too big for your system), you could try version 6.4 or 5.8 instead.
To avoid having to update this page for every new version, there arelinks to the directories. From there select the files you want to download.In the file names ## stands for the version number. For example,vim##src.zipwith version 8.2 is vim82src.zip andvim-##-src.tar.gz for version 8.2is vim-8.2-src.tar.gz.Links are provided for quick access to the latest version.
Note that the links point to the latest version (currently 8.2) to avoidthat caching causes you to get an older version.
You need to download at the sources and the runtime files.And apply all the latest patches.For Vim 6 up to 7.2 you can optionally get the 'lang' archive, which adds translated messages and menus. For 7.3 and later this is included with the runtime files.
The explanations are on the GitHub page.
Summary:
The explanations are on this page:Mercurial
Summary:
The runtime and source files together: | vim-##.tar.bz2 | vim-8.2.tar.bz2 (ftp) |
The single big file ending in '.tar.bz2' is a tar archive compressed withbzip2. Uncompress and unpack it withbunzip2 -c filename | tar -xf -.
All archives should be unpacked in the same directory.
If you can't compile yourself or don't want to, look at the site of thesupplier of your Unix version for a packaged Vim executable. For Linuxdistributions and FreeBSD these are often available shortly after a new Vimversion has been released. But you can't change the features then.
- Debian packages are available at:http://packages.debian.org/vim.
- Sun Solaris Vim is included in the Companion Software:http://wwws.sun.com/software/solaris/freeware/.
Vim for other Sun systems can be found athttp://sunfreeware.com/. - HPUX with GTK GUI for various HPUX versions:http://hpux.its.tudelft.nl/hppd/hpux/Editors/vim-6.2/ orhttp://hpux.connect.org.uk/hppd/hpux/Editors/vim-6.2/ (note that the remark about the GNU GPL is wrong)
gvim82.exe (ftp)
It includes GUI and console versions, for 32 bit and 64 bit systems.You can select what you want to install and includes an uninstaller.
If you want a signed version you can get a build from
vim-win32-installer
It supports many interfaces, such as Perl, Tcl, Lua, Python and Ruby.There are also 64bit versions which only run on 64 bit MS-Windows and use alot more memory, but is compatible with 64 bit plugins.
You can also get a nightly build from there with the most recent improvements,with a small risk that something is broken.
Since there are so many different versions of MS operating systems, there areseveral versions of Vim for them.
For Vim 5.x, Vim 6.x and Vim 7 look inthe pc directory (ftp).
- Self-installing executable gvim##.exe gvim82.exe (ftp)
- For Vim 6 and later. This includes a GUI versionof Vim - with many features and OLE support - and all the runtime files.It works well on MS-Windows 95/98/ME/NT/2000/XP/Vista/7.Use this if you have enough disk space and memory. It's the simplest way tostart using Vim on the PC. The installer allows you to skip the parts youdon't want.
For Vim 6.3 and later it also includes a console version, both for MS-Windows 95/98/ME and MS-Windows NT/2000/XP/Vista/7. The installer automatically selects the right one.
- Runtime files vim##rt.zip vim82rt.zip (ftp)
- For all the following binary versions you need this runtime archive, whichincludes the documentation, syntax files, etc. Always get this, unless youuse the self-installing executable.
There are three versions that run as an MS-Windows application. These providemenus, scrollbars and a toolbar.
- GUI executable gvim##.zip gvim82.zip (ftp)
- This is the 'normal' GUI version.
- OLE GUI executable gvim##ole.zip gvim82ole.zip (ftp)
- A GUI version with OLE support. This offers a few extra features,such as integration with Visual Developer Studio. But it uses quite a bitmore memory.
- Win32 console executable vim##w32.zip vim82w32.zip (ftp)
- The Win32 console version works well on MS-Windows NT/2000/XP/Vista/7. It supports long file names and is compiled with 'big' features. It does not runperfectly well on MS-Windows 95/98/ME, especially when resizing the consolewindow (this may crash MS-Windows...).
- 32 bit DOS executable vim##d32.zip vim73_46d32.zip (ftp)
- The 32 bit DOS version works well on MS-Windows 95/98/ME. It requires a DPMImanager, which needs to be installed on MS-DOS. MS-Windows already has one.It supports long file names, but NOT on MS-Windows NT/2000/XP/Vista/7. It is compiled with 'big' features.
Not available for 7.4 and later. - 16 bit DOS executable vim##d16.zip vim71d16.zip (ftp)
- The 16 bit DOS version is the only one that runs on old MS-DOS systems. Onlyuse this if you are really desparate, because it excludes many useful features(such as syntax highlighting and long file names) and quickly runs out ofmemory.
The last version available is 7.1. Version 7.2 and later are too big to fit in the DOS memory model.
- iconv librarylibiconv
- A library used for converting character sets.Put 'iconv.dll' in the same directory as gvim.exe to be able to edit files inmany encodings. You can find the dll file in the bin directory of the'libiconv-win32' archive.
- newer intl librarylibintl
- The included libintl.dll does not support encoding conversion.If you have installed the iconv library, as mentioned above, you can install agettext library that uses it.Get 'intl.dll' from the bin directory in the gettext-win32 archive and store itas 'libintl.dll' in the same directory as gvim.exe, overwriting the filethat may already be there.
- PC sources vim##src.zip vim82src.zip (ftp)
- The source files, packed for the PC. This only includes the files needed onthe PC, not for other systems. The files are in dos format CR-LF.
- PC debug files gvim##.pdb gvim82.pdb (ftp) gvim##ole.pdb gvim82ole.pdb (ftp) vim##w32.pdb vim80w32.pdb (ftp)
- When you notice a bug or a crash in Vim these files can be used to help tracing down the problem. In Vim 7 do ':help debug-win32' to see how.
- PC translations vim##lang.zip vim72lang.zip (ftp)
- Only for 7.2 and earlier, for 7.3 and later these are included in the 'rt' archive.Translated messages and menu files, packed for the PC. Use this to seenon-English menus. The messages are only translated when the libintl.dlllibrary is installed.
- Windows 3.1 GUI executable gvim##w16.zip and gvim##m16.zip
- These are GUI versions for 16 bit windows (Windows 3.1). The 'w16' has manyfeatures, 'm16' has few features (for when you're short on memory).
Mac Install Vim-plug
Alternate distributions
- Yongwei's build
- You may also try Yongwei's build,executables with slightly different interfaces supported.
- Cream
- For an unofficial version that used to include all the latest patches andoptionally a bitmore: Cream.The 'one-click installer' mentioned includes the Cream changes.For the 'real Vim' use the 'without Cream' version listed further down.
Unfortunately, it stopped updating since Vim 8.0.
- Cygwin
- For a Cygwin binary look at others.
Mac Vimrc
Quite a long time ago, Vim development started on the Amiga. Although it's areally old system now, it might still work. However, this has not been tested recently.You may have to use an older version for which Amiga binaries are available.For Vim 5.x and Vim 6 look inthe amiga directory (ftp).
Vim 7 files can be found atos4depot.net. This is for AmigaOS 4. Made by Peter Bengtsson.
- Runtime files vim##rt.tgz vim64rt.tgz (ftp)
- Documentation, syntax files, etc. You always need this.
- Executable vim##bin.tgz vim64bin.tgz (ftp)
- The executables for Vim and Xxd.For Vim 6 it includes 'big' features, for Vim 5.x itincludes the normal features.For Vim 6.2 it is not available (my Amiga had harddisk problems then, this miraculously healed later).
- Big executable vim##big.tgz
- Vim with 'big' features and Xxd. Only for Vim 5.x.
- Sources vim##src.tgz vim64src.tgz (ftp)
- The source files for the Amiga.Only needed when you want to compile Vim yourself.
For Vim 5.x and Vim 6 look inthe os2 directory (ftp).Version 6.2 is not available.Versions 6.3 and 6.4 were compiled by David Sanders.
Version 7.0 was compiled by David Sanders.
- Runtime files vim##rt.zip vim70rt.zip (ftp)
- Documentation, syntax files, etc. You always need this.
- Executables vim##os2.zip vim70os2.zip (ftp)
- Vim, Xxd, Tee and EMX libraries.
If you want to compile the OS/2 version, you need the EMX compiler. Use theUnix source archive, runtime files and the extra archive. After unpacking theruntime archive, move all the files and directories in the 'runtime'directory one level up.
The terminal version of Vim is included as 'vi', you already have it. It'slagging behind a bit though and has limited features, thus you may want toadditionally install a recent version or one with more features.MacVim
There most popular version is MacVim. This is being actively developed. Thisbehaves like a Mac application, using a GUI.MacVim has more a Mac look and feel, is developed actively and most peopleprefer this version. Most of MacVim was made by Björn Winckler.
MacVim can be downloaded here: https://github.com/macvim-dev/macvim
New versions are made quite often.Subscribe to thevim-mac maillistto be informed about bugs and updates.
Homebrew
This is a terminal version installed with the 'brew' command.It is updated frequently.It can be downloaded here: formulae.brew.sh/formula/vim.Older
Older binaries for Mac OS/X can be found on thisSourceForge project.Maintained by Nicholas Stallard.
Here is a multi-byte version of Vim 5.7 (for Japanese, possibly also forKorean and Chinese; not for Unicode):
http://www-imai.is.s.u-tokyo.ac.jp/~asai/macvim-e.html
Background
Most of the work forthe Macintosh port (Classic and Carbon) was done by Dany St-Amant.
If you have OSX and a setup for compiling programs, you can use the source codeand compile yourself. See the Unix section above. The development tools can bedownloaded from Apple's developer web site.
Mac Vim Installer
Turn to the vim-mac maillist to meet otherVim-Mac users.
This is a list of links to sites where various versions of Vim can be obtained.These are supported by individuals, use at your own risk.Android | Search for 'Vim Touch' by Momodalo in the Play Store. |
i/OS | Run Vim on your iPhone or Ipad. |
QNX (ftp) | Provided by Yakov Zaytsev. Requires QNX 6.3.0/6.3.2 with service pack 2. |
Agenda | http://pi7.fernuni-hagen.de/hartrumpf/agenda/vim/vim.vr3 |
Cygwin (with GTK GUI) | http://lassauge.free.fr/cygwin/ |
Open VMS | http://www.polarhome.com/vim/ |
MorphOS | http://www.akcaagac.com/index_vim.html |
Mac Install Vim-go
TOP