Skip to content

Latest commit

 

History

History
147 lines (131 loc) · 6.05 KB

README.md

File metadata and controls

147 lines (131 loc) · 6.05 KB

Introduction

My first personal configuration of Vim for web development.

Manual installation

  1. Check out the source form github:

     git clone https://github.com/sducamp/dotfiles.git ~/.vim 
    
  2. Create symlinks for vimrc:

     ln -s ~/.vim/.vimrc ~/.vimrc 
    
  3. Clone vundle repository inside the bundle folder:

     git clone https://github.com/gmarik/Vundle.vim ~/.vim/bundle/Vundle.vim
    
  4. Open Macvim and install the plugins with the following command line:

     :PluginInstall
    
  5. Compile Vimproc

     cd ~/.vim/bundle/vimproc.vim
     make
    
  6. 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
    

Plugins

All plugins here are clone of their original repository. Vundle is being used as a plugins manager.

Mapping

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>'

Thanks

A special thank you to Nicholas.