Skip to content

zhausong/vimrc

 
 

Repository files navigation

vim @140am

What is this?

I appreciate a good IDE (hi JetBrains and Sublime Text) but love the speed and flexibility of vim and MacVim. After years of Sublime Text 2/3 use I moved back to vim. My primary motivation being the lack of a good go plugin and my lag of mouse use. This is my daily used configuration of plugins and settings using MacVim on OS X. Use at your own risk!

My primarily used languages are:

  • go
  • python
  • german
  • javascript / coffeescript

How does it look?

Screenshot 1

Requirements

Vim 7.4+ with lua support (required by the neocomplete plugin).

To install on OSX using homebrew run:

brew install vim --with-lua --override-system-vim

To install the MacVim GUI run:

brew install macvim --with-lua --with-cscope

Optional

The tagbar source code browser requires ctags:

brew install ctags

If you plan on using go install:

brew install gotags

To make use of the ag search plugin install:

brew install the_silver_searcher

Installation

Clone the repository to your machine:

git clone git://github.com/140am/vimrc.git ~/.vim
cd .vim
git submodule init
git submodule update
cat ~/.vim/vimrc > ~/.vimrc

Start vim or mvim (MacVim).

Install go tools if required (gocode, godef, goimport,..) within vim via:

:GoInstallBinaries

Example Keyboard Shortcuts

  • ctrl + n : file explorer

  • ctrl + t : tag bar

  • ctrl + b : buffer explorer

  • ctrl + z : fullscreen zen mode

  • \ + ig : Highlight

Used Plugins

pathogen

Manages the vim runtime path. To install any new vim plugin simply place them into the .vim/bundle directory.

fugitive

Great git wrapper giving you everything to use git from within vim.

gitgutter

Showing git diff in the sign column, to show weather each line has been added, modified or removed.

NERDTree

Filesystem explorer to browse files and directories in the side bar.

Syntastic

Syntax detection and works great with TagBar together.

neocomplete

Provides keyword completion and works great with vim-go.

tagbar

Eeasy way to browse the tags of the current file and get an overview of its structure. Requires Exuberant ctags and if used with go gotags.

bufexplorer

Quickly and easily switch between buffers.

auto pairs

Insert or delete brackets, parens, quotes in pair.

vim-airline

Very nice status/tabline which works with git fugitive, syntastic, nerdtree etc.

Ag

Frontend for A.K.A. the_silver_searcher which is a fast ack / search replacement.

vim-indent-guides

Visually displays indent levels.

vim-zenroom2 + goyo.vim

Inspired by iA Writer for editing Markdown and reStructuredText in a distraction free environment.

vim-coffee-script

CoffeeScript syntax, indenting, compiling support.

vim-go

Go comes with basic vim plugins. The vim-go plugin provides additional improved syntax highlighting, auto completion, gofmt on save, go to declrations and much more.

Color Themes

I use the molokai color scheme by default and mayansmoke in full screen zen mode. A few others I like can be activated by using the following commands within vim:

  • colorscheme peaksea
  • colorscheme wombat
  • colorscheme ir_black
  • colorscheme mayansmoke
  • colorscheme molokai

Configuration

I use the following configuration files to hold everything together:

.vim/keymap.vim

Custom keyboard mappings as mentioned above and some others.

.vim/plugins_config.vim

Settings for any of the above mentioned used plugins.

.vim/language_support.vim

Language specific settings - I should move those to ftplugin/ one day.

.vim/helper_function.vim

Useful helper functions i found online used in various places.

If you wish to set custom settings create the file ~/.vimrc.custom.

Credit

Most of the plugins I choosed to use I found via the great vimrc by @amix and the gist by @cridenour. Thank you!

About

My personal Vim IDE setup (Go/Python/JS/Markdown)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%