Skip to content

alkesh/vim-config

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

If necessary, backup and remove your /.vim directory and /.vimrc file.

Clone this repository to ~/git:

git clone git://github.com/alkesh/vim-config.git ~/.vim

(If you're behind a firewall that blocks port 9418, replace git: with https: in the above URL.)

Alternatively, if for some bizarre reason you don't have git installed, you can download a zip or tar file using the link on GitHub.

Symlink .vimrc:

ln -s ~/.vim/vimrc ~/.vimrc

If you are running neovim, run the setup script:

./neovim_setup

Finally, install the plugins:

vim +PlugInstall +qall

Keeping up-to-date

cd ~/.vim
git pull

Then in vim:

:PlugInstall

Local Customisation

Local changes (eg if you prefer a different font or colour scheme) can either be made in a branch, or in ~/.vimrc.local.

Included Plugins

See the plugins' web pages for more information. The keybindings listed are mostly just those defined or overridden locally, not the ones provided by default.

Plugins are installed in their own directories under bundle, thanks to Pathogen.

Abolish

Work with several variants of a word at once (more)

ack

Plugin for the Perl module / CLI script 'ack' (more)

ALE

Modern syntax checker (more)

Keybindings

,u
Run rubocop -a to fix issues idenified by rubocop

Align

Help folks to align text, eqns, declarations, tables, etc (more)

Keybindings

,tlt
Align LaTEX tables (to avoid clashing with our existing ,tt mapping)
,t>
Align on =>

Blockle (more)

Toggle between block styles do..end and {..}.

Keybindings

,b
Toggle block style

bufexplorer

Buffer explorer/browser (more)

Keybindings

,.
Show buffer explorer

CtrlP

Fast file navigation for VIM (more)

Written in pure vimscript, so no need to compile anything (unlike Command-T)

Keybindings

ctrl-p
The default keybinding
,t
For those used to using Command-T

dash.vim

Search for word under cursor in Dash. (more)

Keybindings

,d
Search for word under cursor in Dash

EasyGrep

Fast and Easy Find and Replace Across Multiple Files (more)

endwise

Wisely add "end" in ruby, endfunction/endif/more in vim script, etc (more)

Extradite

Brings up the commit log of the current file. In the log view (more)

Keybindings

,x
Open commit history for current file

Fugitive

A Git wrapper so awesome, it should be illegal (more)

markdown

Syntax highlighting for Markdown (more)

matchit

Extended % matching for HTML, LaTeX, and many other languages (more)

NERD tree

A tree explorer plugin for navigating the filesystem (more)

Keybindings

,m
Show/hide NERDTree
,f
Show current file in tree

nerdcommenter

A plugin that allows for easy commenting of code for many filetypes (more)

ragtag

A set of mappings for HTML, XML, PHP, ASP, eRuby, JSP, and more (more)

If you have already typed 'foo', the following shortcuts apply (with the cursor position marked by ^):

<C-X>=
foo<%= ^ %>
<C-X>+
<%= foo^ %>
<C-X>-
foo<% ^ %>
<C-X>_
<% foo^ %>
<C-X>'
foo<%# ^ %>
<C-X>"
<%# foo^ %>
<C-X><Space>
<foo>^</foo>
<C-X><CR>
<foo>
^
</foo>
<C-X>/
Last HTML tag closed
<C-X>!
<!DOCTYPE...>/<?xml ...?> (menu)
<C-X>@
<link rel="stylesheet" ...>
<C-X>#
<meta http-equiv="Content-Type" ... /> ragtag-CTRL-X_#
<C-X>$
<script src="/javascripts/^.js"></script> ragtag-CTRL-X_$

rails

Ruby on Rails: easy file navigation, enhanced syntax highlighting, and more (more)

Keybindings

,r
run rake

rake

It's like rails.vim without the rails (more)

repeat

Use the repeat command (.) with supported plugins (more)

## ruby

Ruby support (newer than the version released with vim). (more)

ruby-refactoring

Refactoring tool for Ruby in vim! (more)

See relish documentation for examples.

splitjoin

Switch between single-line and multi-line statements (more)

Keybindings

gS
to split a one-liner into multiple lines
gJ
(with the cursor on the first line of a block) to join a block into a single-line statement

SuperTab

Do all your insert-mode completion with Tab (more)

surround

Delete/change/add parentheses/quotes/XML-tags/much more with ease (more)

Tabular

Configurable, flexible, intuitive text aligning (more)

Keybindings

,aa
(when text is selected) format tables made with pipes (|)

unimpaired

Pairs of handy bracket maps (more)

vim-multiple-cursors

Multiple selection similar to Sublime Text (more)

ZoomWin (23)

Zoom in/out of windows (toggle between one window and multi-window) (more)

Keybindings

,z
Zoom

Other Keybindings

ctrl-]
Jump to definition (needs universal ctags installed - see Tags section below)
,c
Hide/show tabs and trailing spaces
,ff
Copy current filename and path to the system clipboard
,h
Hide search highlighting
,rr
Run ruby file
,,
Run rspec on current file
,rt
Generate tags (using ctags)
,s
Show/hide spelling errors
,sw
Strip trailing whitespace
,w
Toggle word wrapping
,p
Switch to 'projector mode' (large font, light colour scheme)
RB
Open Ruby docs in browser for word under cursor
RR
Open Rails docs in browser for word under cursor

Tags

The ctrl-] and ,rt shortcuts needs universal ctags installed

Other Commands

:SudoW
Save using sudo (run sudo -v in terminal first)

Vim Resources

See Kerry's vim bookmarks on pinboard. Also, Kerry seems to have moved on from using his own config, to using this one: https://github.com/AdamWhittingham/vim-config

About

My vim config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%