My first personal configuration of Vim for web development.
-
Check out the source form github:
git clone https://github.com/sducamp/dotfiles.git ~/.vim
-
Create symlinks for vimrc:
ln -s ~/.vim/.vimrc ~/.vimrc
-
Clone vundle repository inside the bundle folder:
git clone https://github.com/gmarik/Vundle.vim ~/.vim/bundle/Vundle.vim
-
Open Macvim and install the plugins with the following command line:
:PluginInstall
-
Compile Vimproc
cd ~/.vim/bundle/vimproc.vim make
-
Install YouCompleMe
Make sure you have CMake installed. You can use [Homebrew](http://brew.sh/) to install it. cd ~/.vim/bundle/YouCompletMe/ ./install.py --tern-completer
All plugins here are clone of their original repository. Vundle is being used as a plugins manager.
- NerdTree: A tree explorer plugin fon Vim.
- Snipmate: TexteMate's snippets for Vim.
- Unite: Search and display form arbitrary sources like files, buffers, recents used files or registers.
- Phpcomplete: Improved PHP omnicompletion.
- Php.vim: PHP syntax.
- neocomplete: Next generation completion framework after neocomplcache.
- supertab: Perform all your vim insert mode completion with Tab.
- ctrlp: Fuzzy file, buffer, mru, tag, etc finder.
- vim-gitgutter: A vim plugin which shows a git diff in the gutter and stages/reverts hunks.
- vim-fugitive: a Git wrapper so awesome, it should be illegal.
- vim-airline: lean & mean status/tabline for vim that's light as air.
- vmustache: Mustache template system for VIMScript
- ultisnips: The ultimate snippet solution for vim.
- pdv: PHP Documentor for Vim.
- tagbar: Vim plugin that displays tags in a window, ordered by scope.
- nerdcommenter: Vim plugin for intensely orgosmic commenting
- ag: Vim plugn for the_silver_searcher, 'ag' a replacement for the Perl module / CLI script 'ack'
- syntastic: Syntax checking hacks for vim.
- Stupid-EasyMotion: A dumbed down version of EanyMotion that aids navigation no che current line.
- base16-vim: Base 16 for Vim.
- terryma/vim-multiple-cursors: True Sublime Text style multiple selections for Vim.
- [tpope/vim-surround] (https://github.com/tpope/vim-surround): The plugin provides mappings to easily delete, change and add such surroundings in pairs.
- [yonchu/accelerated-smooth-scroll] (https://github.com/yonchu/accelerated-smooth-scroll): Vim plugin for accelerated smooth scroll.
- [wookiehangover/jshint.vim] (https://github.com/wookiehangover/jshint.vim): JSHint fork of jslint.vim
- [mkusher/padawan.vim] (https://github.com/mkusher/padawan.vim): A vim plugin for padawan.php completion server
- [mattn/emmet-vim] (https://github.com/mattn/emmet-vim): Emmet for Vim.
- [aaronbieber/vim-quicktask] (https://github.com/aaronbieber/vim-quicktask): Quicktask is a lightweight Vim task management plugin.
- [xolox/vim-notes] (https://github.com/xolox/vim-notes): Easy note taking in Vim.
- [xolox/vim-misEasy note taking in Vimc] (https://github.com/xolox/vim-misc): Miscellaneous auto-load Vim scripts.
- [pangloss/vim-javascript] (https://github.com/pangloss/vim-javascript): Vastly improved Javascript indentation and syntax support in Vim.
- [elzr/vim-json] (https://github.com/elzr/vim-json): A better JSON for Vim: distinct highlighting of keywords vs values, JSON-specific (non-JS) warnings, quote concealing. Pathogen-friendly.
- [othree/html5.vim] (https://github.com/othree/html5.vim): HTML5 omnicomplete and syntax.
- [plasticboy/vim-markdown] (https://github.com/plasticboy/vim-markdown): Syntax highlighting, matching rules and mappings for the original Markdown and extensions.
- [Valloric/YouCompleteMe] (https://github.com/Valloric/YouCompleteMe): A code-completion engine for Vim.
- [ternjs/tern_for_vim] (https://github.com/ternjs/tern_for_vim): This is a Vim plugin that provides Tern-based JavaScript editing support.
tab navigation like Firefox
nnoremap <C-h> :tabprevious<CR>
nnoremap <C-s> :tabnext<CR>
turn off search highlight
nnoremap <Leader><Space> :nohlsearch<CR>
space open/close folds
nnoremap <Space> za
move vertically by visual line
nnoremap j gj
nnoremap k gk
move to beginning/end of the line
nnoremap B ^
nnoremap E $
reset $/^
nnoremap $ <Nop>
nnoremap ^ <Nop>
highlight last inserted text
nnoremap gV `[v`]
jk is escape
inoremap jk <Esc>
Set leader key to ,
let mapleader=","
php annotations
map <C-f> :call pdv#DocumentWithSnip()<CR>
show/hide methode and parameters
map <C-R> :TagbarToggle<CR>
NerdTree
map <C-n> nNERDTree<cr>
Toggle the relative number
nnoremap rn :call NumberToggle()<cr>
Fugitive configuration
map <leader>gw :Gwrite<cr>
map <leader>gs :Gstatus<cr>
map <leadeR>gc :Gcommit<cr>
map <leader>gd :Gdiff<cr>
map <leader>gp :Gpull<cr>
map <leader>gg :Gpush<cr>
map <leader>gm :Git mergetool<cr>
Vim Multi Cursors
let g:multi_cursor_next_key='<C-c>'
let g:multi_cursor_prev_key='<C-P>'
let g:multi_cursor_skip_key='<C-X>'
let g:multi_cursor_quit_key='<Esc>'
A special thank you to Nicholas.