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
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
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
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
-
ctrl + n : file explorer
-
ctrl + t : tag bar
-
ctrl + b : buffer explorer
-
ctrl + z : fullscreen zen mode
-
\ + ig : Highlight
Manages the vim runtime path. To install any new vim plugin simply place them into the .vim/bundle
directory.
Great git
wrapper giving you everything to use git from within vim.
Showing git diff
in the sign column, to show weather each line has been added, modified or removed.
Filesystem explorer to browse files and directories in the side bar.
Syntax detection and works great with TagBar together.
Provides keyword completion and works great with vim-go.
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.
Quickly and easily switch between buffers.
Insert or delete brackets, parens, quotes in pair.
Very nice status/tabline which works with git fugitive, syntastic, nerdtree etc.
Frontend for A.K.A. the_silver_searcher which is a fast ack / search replacement.
Visually displays indent levels.
Inspired by iA Writer for editing Markdown and reStructuredText in a distraction free environment.
CoffeeScript syntax, indenting, compiling support.
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.
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
I use the following configuration files to hold everything together:
Custom keyboard mappings as mentioned above and some others.
Settings for any of the above mentioned used plugins.
Language specific settings - I should move those to ftplugin/ one day.
Useful helper functions i found online used in various places.
If you wish to set custom settings create the file ~/.vimrc.custom
.
Most of the plugins I choosed to use I found via the great vimrc by @amix and the gist by @cridenour. Thank you!