Created
September 14, 2012 15:11
-
-
Save lucasgameiro/3722534 to your computer and use it in GitHub Desktop.
vim settings file
-- vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Identation settings | |
set expandtab | |
set tabstop=4 | |
set smarttab | |
set shiftwidth=4 | |
" Display line number | |
set number | |
" Enable mouse integration | |
set mouse=a | |
" --- Maps that I use to copy & paste out of vim | |
" | |
" Disable line numbers. | |
map <C-N>d :set nonumber<cr> | |
" Disable mouse integration. Now you can copy with your mouse | |
map <C-M>d :set mouse=<cr> | |
" Enabling settings back | |
map <C-M>e :set mouse=a<cr> | |
map <C-N>e :set number<cr> | |
" --- NERDTree & tabs settings | |
" | |
map <C-Left> :tabprevious<cr> | |
map <C-Right> :tabnext<cr> | |
map <C-N>t :NERDTree<cr> | |
" --- Out of vim commands | |
" | |
" MySQL connect | |
map <C-M>y :!mysql -uroot -p123456<cr> | |
" Git status | |
map <C-G>s :!git status<cr> | |
" Git origin diff. | |
map <C-G>o :!git fetch && git log -p HEAD...origin<cr> | |
" Git add interactive | |
map <C-G>a :!git add -i<cr> | |
" Git add interactive | |
map <C-G>c :!git commit<cr> | |
" Git push | |
map <C-G>p :!git push origin<cr> | |
" Keep swap and backup files in a centralized directory | |
set backupdir=~/.vim/backup | |
set directory=~/.vim/tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment