- Code completion with YouCompleteMe
- Git integration using fugitive
- NERDTree file browsing
- Quickly find files, buffers etc. using CtrlP
- Clear trailing whitespace
- Syntax validation provided by syntastic
- vim-airline status bars (with git support)
- Sublime like editing of multiple lines vim-multiple-cursors
- Tab completion using supertab
- Tab completion in search field (SearchComplete)
- Code tag bar support (Tagbar)
- Show git changes in the gutter (gitgutter)
- Support for Python virtualenvs (vim-virtualenv)
- EditorConfig support
- Auto save buffers when leaving them
- [Emmet.io] support via emmet-vim
- Look up documentation in Dash directly from vim
- Easy management of surrounding characters (e.g.
echo "Hello world"
) using surround
Supported languages:
- CoffeeScript
- CSS
- Go
- HTML
- Jade
- JavaScript
- Markdown
- Mustache
- Pig
- PowerShell
- Python support (version >=2.6 and >=3.2), including:
- rope
- pydoc
- pylint
- pep8
- flakes
- mccabe
- Ruby
- Rubocop support
- SCSS (Sassy CSS)
- Stylus
- Thrift
- TypeScript
Included color schemes:
- hybrid (default)
- Tomorrow
- Tomorrow-Night
- Tomorrow-Night-Blue
- Tomorrow-Night-Bright
- Tomorrow-Night-Eighties
- molokai
- solarized (dark and light)
- vividchalk
- And a lot more
To maximize the coolness, make sure that your terminal emulator sports the same color scheme!
vim
(8.0 or above) compiled with lua and python3 (E.g.brew install vim --with-lua --with-python3
)git
ruby
python3
node
gcc
ctags
(if you're on a Mac, installctags
via Homebrew)ag
(OS X:brew install the_silver_searcher
)jedi
(pip install jedi
)
The following npm
modules are not required but recommended for linting support via syntastic.
jshint
jsonlint
- Clone the repo to your computer
- Run
./install.sh
from the cloned repo root dir - (Optional) To get proper symbols for git etc in the status bar
a. Install a patched font from powerline/fonts
b. Set the new font as your terminal font
c. Enable powerline font support in
~/.vimrc.local
withlet g:airline_powerline_fonts = 1
This is the general file structure for the project
.vim/ vimrc vimrc.plugins config/ plugins/ plugin-name.vim languages/ language-name.vim .vimrc.local .vimrc.plugins.local
Keep all your local configuration in ~/.vimrc.local
and plugins in ~/.vimrc.plugins.local
. Those files are not touched upon re-installation of the project.
, + d
or<F2>
- Open the file browser side bar (via NERDTree), + f
- Show the current file in the file browser (via NERDTree)ctrl + p
- Quickly find files, buffers etc using CtrlPctrl + t
- Search for a tag (e.g. classes, functions, methods etc) using CtrlP. Applies to the currently active bufferctrl + T
- Search for a tag (e.g. classes, functions, methods etc) using CtrlP. Applies to all open buffersshift + T
- Open file in new tab from the file browserma
- Add new file/directory (must be executed in the NERDTree window)mm
- Move/rename new file/directory (must be executed in the NERDTree window)mn
- Delete file/directory (must be executed in the NERDTree window)
<F1>
- Open vim help screen<F2>
- Toggle file browser sidebar<F3>
- Toggle tagbar<F4>
- Open Dash documentation for the keyword under the cursor<F9>
- Run lint check for the current language (supported languages: Go, Ruby)<F10>
- Run tests for current package / file (supported languages: Go)<F11>
- Go to documentation (only Go is supported at the moment)<F12>
- Go to definition (only Go is supported at the moment)
Shift + Left arrow
- Go to previous bufferShift + Right arrow
- Go to next buffer, + w
- Close buffer (without closing any windows)
ctrl + l
- Focus the split to the rightctrl + h
- Focus the split to the leftctrl + k
- Focus the split abovectrl + j
- Focus the split below,v
- Split window vertically,h
- Split window horizontally,q
- Close current split
ctrl + n
- Select word under cursor for multiple cursor editing. Press again to go to next occurrence of the word
Git integration is provided via the fugitive plug-in. Below are some common examples.
Status
:Gstatus
Commit (all)
:Gcommit
:Gcommit -a
Diff
:Gdiff
Push
:Gpush origin master
Adding files
Open the status window and then press -
on each file you want to add.
Commenting of code is done via NERDCommenter. You can read detailed documentation on how to comment code with the plug-in here.
,cc
- Comment the current line (or visual mode selection),c
(, + c + <space>
) - Toggle commenting on the current line (or visual mode selection)
vim-ide supports CoffeeScript syntax, compiling, linting and indenting (via vim-coffee-script). Check the project documentation for details on how to compile and lint your code.
To expand HTML use ctrl + y + ,
. Consider that you have typed the following (_
represents the cursor):
html:5_
Then type ,e,
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
_
</body>
</html>
Another example with tables:
table>thead+tbody>(tr>td*2)*3
Generates:
<table>
<thead></thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
Please note that emmet is only enabled for HTML and CSS files.
All syntax validation is done via syntastic. It is enabled by default. All you will need to ensure is that you have the checkers for the language that you want to validate installed. E.g. if you want to use JSHint for JavaScript, then you must install JSHint on you system.
To check whether Syntastic has found appropriate validators for the current file type :SyntasticInfo
. It will output something like:
Syntastic version: 3.4.0-117
Info for filetype: javascript
Mode: active
Filetype javascript is active
Available checker: jshint
Currently enabled checker: jshint
All folds are expanded by default. You can use the regular vim folding commands to handle folding. E.g.
za
- Toggle folding on one levelzA
- Toggle folding, full depth (note that the defaultfoldnestmax
is set to10
)
You can use any command from the vim-surround package. For example:
You can change surrounding characters with the cs
command.
Example
Replace the "
with '
in this string by typing cs"'
:
echo "Hello world"
Becomes
echo 'Hello world'
You can delete surrounding characters with the ds
command.
Example
Delete "
by typing ds"
:
echo "Hello world"
Becomes
echo Hello world
You can add surroundings to a specific word with the ysiw
command.
Example
Add [
around Hello
by moving the cursor to Hello
and the type ysiw[
:
echo Hello world
Becomes
echo [ Hello ] world
You can change the surrounding on a whole line with the yss
command.
Example
Add {
around a line by typing yss{
echo "Hello world"
Becomes
{ echo "Hello world" }
Please feel free to contribute by sending pull requests or file issues in the bug tracker. All project development is done on the projects GitHub page.
The MIT License (MIT)
Original Copyright (c) 2014-2015 Sebastian Dahlgren
Modified Copyright (c) 2019 Peter Kay (kaypeter87)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.