Skip to content

sducamp/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

My personal configuration of Vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published