Created
November 29, 2013 15:21
-
-
Save admiral0/7707227 to your computer and use it in GitHub Desktop.
WIP vim config
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
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! | |
Bundle 'gmarik/vundle' | |
filetype plugin indent on " required! | |
" | |
" vim-sublime basic bundles here: | |
" | |
Bundle 'L9' | |
Bundle 'tpope/vim-surround' | |
Bundle 'tomtom/tcomment_vim' | |
Bundle 'gcmt/breeze.vim' | |
Bundle 'bling/vim-airline' | |
"Bundle 'Raimondi/delimitMate' | |
Bundle 'kien/ctrlp.vim' | |
"Snipmate deps | |
Bundle "MarcWeber/vim-addon-mw-utils" | |
Bundle "tomtom/tlib_vim" | |
"Other modules | |
Bundle "garbas/vim-snipmate" | |
Bundle "honza/vim-snippets" | |
Bundle "ervandew/supertab" | |
Bundle "scrooloose/nerdtree.git" | |
Bundle "scrooloose/syntastic.git" | |
Bundle 'joonty/vdebug.git' | |
" Color Themes | |
Bundle 'flazz/vim-colorschemes' | |
" My settings | |
colorscheme Monokai | |
set paste | |
syntax on | |
let mapleader = "ç" | |
let g:mapleader = "ç" | |
set noerrorbells " No beeps | |
set number " Show line numbers | |
set backspace=indent,eol,start " Makes backspace key more powerful. | |
set showcmd " Show me what I'm typing | |
set showmode " Show current mode. | |
set noswapfile " Don't use swapfile | |
set nobackup " Don't create annoying backup files | |
set splitright " Split vertical windows right to the current windows | |
set splitbelow " Split horizontal windows below to the current windows | |
set encoding=utf-8 " Set default encoding to UTF-8 | |
set autowrite " Automatically save before :next, :make etc. | |
set autoread " Automatically reread changed files without asking me anything | |
set laststatus=2 | |
set fileformats=unix,dos,mac " Prefer Unix over Windows over OS 9 formats | |
set showmatch " Do not show matching brackets by flickering | |
set incsearch " Shows the match while typing | |
set hlsearch " Highlight found searches | |
set ignorecase " Search case insensitive... | |
set smartcase " ... but not when search pattern contains upper case characters | |
set switchbuf=usetab,newtab " open new buffers always in new tabs | |
set tabstop=2 shiftwidth=2 expandtab smarttab | |
set listchars=tab:▒░,trail:▓ | |
set list | |
" Gui Options | |
if has("gui_running") | |
set guioptions-=T | |
set guioptions+=e | |
set t_Co=256 | |
set guitablabel=%M\ %t | |
endif | |
" | |
" Basic shortcuts definitions | |
" most in visual mode / selection (v or ⇧ v) | |
" | |
" Find | |
map <C-f> / | |
" indend / deindent after selecting the text with (⇧ v), (.) to repeat. | |
vmap <Tab> > | |
vmap <S-Tab> < | |
" comment / decomment & normal comment behavior | |
vmap <C-m> gc | |
" Disable tComment to escape some entities | |
let g:tcomment#replacements_xml={} | |
" Text wrap simpler, then type the open tag or '," | |
vmap <C-w> S | |
" Cut, Paste, Copy | |
vmap <C-x> d | |
vmap <C-v> p | |
vmap <C-c> y | |
" Undo, Redo (broken) | |
nnoremap <C-z> :undo<CR> | |
inoremap <C-z> <Esc>:undo<CR> | |
nnoremap <C-y> :redo<CR> | |
inoremap <C-y> <Esc>:redo<CR> | |
" Tabs | |
let g:airline_theme='badwolf' | |
let g:airline#extensions#tabline#enabled = 1 | |
nnoremap <C-b> :tabprevious<CR> | |
inoremap <C-b> <Esc>:tabprevious<CR>i | |
nnoremap <C-n> :tabnext<CR> | |
inoremap <C-n> <Esc>:tabnext<CR>i | |
nnoremap <C-t> :tabnew<CR> | |
inoremap <C-t> <Esc>:tabnew<CR>i | |
nnoremap <C-k> :tabclose<CR> | |
inoremap <C-k> <Esc>:tabclose<CR>i | |
map <S-Right> :tabn<cr> | |
map <S-Left> :tabp<cr> | |
map <S-l> :bn<cr> | |
map <S-j> :bp<cr> | |
map <S-k> :bd<cr> | |
map <leader>f :NERDTreeToggle<cr> | |
map <leader>s :call NERDTreeSync()<cr> | |
map <leader>o :browse confirm e<cr> | |
map <leader>n :tabnew<cr> | |
inoremap <leader>p <ESC>"+p`]a | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Functions | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
fun! NERDTreeSync() | |
lcd %:p:h | |
NERDTreeCWD | |
endf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment