Skip to content

Instantly share code, notes, and snippets.

@olimpiurob
Forked from david-batranu/.vimrc
Created October 19, 2015 18:19
Show Gist options
  • Save olimpiurob/53b2c36d0a72d5208066 to your computer and use it in GitHub Desktop.
Save olimpiurob/53b2c36d0a72d5208066 to your computer and use it in GitHub Desktop.
plug-only vim, requires a ~/.vim/backups folder for persistent undo
call plug#begin('~/.vim/plugged')
Plug 'kien/ctrlp.vim'
Plug 'kien/rainbow_parentheses.vim'
Plug 'jeetsukumaran/vim-gazetteer'
Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdtree'
Plug 'vim-scripts/AutoComplPop'
Plug 'Yggdroot/indentLine'
Plug 'groenewege/vim-less'
"Plugin 'Lokaltog/vim-powerline'
Plug 'amiorin/vim-project'
Plug 'zeis/vim-kolor'
Plug 's3rvac/vim-syntax-redminewiki'
Plug 'jonathanfilip/vim-lucius'
Plug 'flazz/vim-colorschemes'
Plug 'chriskempson/base16-vim'
Plug 'aaronj1335/underscore-templates.vim'
Plug 'tyru/current-func-info.vim'
Plug 'nice/sweater'
Plug 'bling/vim-airline'
Plug 'majutsushi/tagbar'
Plug 'tpope/vim-surround'
Plug 'mbbill/undotree'
Plug 'valloric/MatchTagAlways'
"Plugin 'Valloric/YouCompleteMe'
Plug 'rawsource/Monkey-VIM'
Plug 'airblade/vim-gitgutter'
Plug 'rking/ag.vim'
Plug 'wellle/targets.vim'
call plug#end()
set completeopt=menu,menuone
filetype on
filetype plugin on
filetype plugin indent on
syntax on
set nowrap
set nocursorcolumn
set nocursorline
set synmaxcol=200
"syntax sync minlines=256
set undodir=~/.vim/backups
set undofile
" airline
let g:airline#extensions#tabline#enabled = 1
" end airline
if has('gui_running')
set background=dark
else
set background=dark
endif
"colorscheme colorful
"colorscheme sweater
"colorscheme kolor
"colorscheme beauty256
"colorscheme tutticolori
"colorscheme blackboard
"colorscheme rdark
"colorscheme wombat
"colorscheme espresso
"colorscheme solarized
"colorscheme zenburn
"colorscheme github
"colorscheme slate
"colorscheme codeschool
"colorscheme grb256
"colorscheme blue
"colorscheme lucius
"colorscheme proton
"colorscheme base16-eighties
"colorscheme base16-brewer
"colorscheme lucius
"colorscheme base16-tomorrow
"colorscheme base16-bright
"colorscheme ego
colorscheme badwolf
set go-=m
set go-=T
set go-=r
set go-=L
set hls
set nu
set hid
set wildmenu
set ruler
set showmatch
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set nolazyredraw
set smartindent
set autoindent
set smarttab
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set incsearch
set ignorecase
set smartcase
set encoding=utf-8
set fileencoding=utf-8
set clipboard=unnamedplus
set nocompatible
let g:Powerline_symbols = 'fancy'
let g:indentLine_char = '┊'
" powerline fix (probably for buffer stuff)
set laststatus=2
" 256 color support
set t_Co=256
nnoremap ; :
nnoremap t :CtrlP $pwd<CR>
nnoremap T :CtrlPBuffer<CR>
nnoremap <C-]> :execute 'tj' expand('<cword>')<CR>zv
vnoremap <Leader>] yq/p<ESC><CR>
set wildmenu
"set wildmode=list:longest,full
set wildmode=longest:full,full
set mouse=a
" disable backup and swap
set nobackup
set nowb
set noswapfile
"set guifont=Droid\ Sans\ Mono\ 11
"set guifont=Monaco\ 10
"set guifont=Monaco\ 9
"set guifont=Consolas\ 14
"set guifont=Consolas\ 10
"set guifont=M+\ 1mn\ 12,light\ 12
"set guifont=M+\ 1m\ 8,light\ 8
"set guifont=M+\ 2m\ 10,light\ 10
"set guifont=Inconsolata\ 12
"set guifont=Anka/Coder\ Narrow\ 8
"set guifont=Anka/Coder\ 8
"set guifont=Consolas\ 14
"set guifont=Terminus\ 11
"set guifont=Terminus\ 9
"set guifont=Terminus\ 8
"set guifont=Ubuntu\ Mono\ 10
"set guifont=Ubuntu\ Mono\ 8
"set guifont=Terminus\ 10
"set guifont=Menlo\ for\ Powerline\ 10
"set guifont=Mutex\ 10
"set guifont=Pointfree\ 10
"set guifont=GohuFont\ 10
"set guifont=White\ Rabbit\ 12
"set guifont=Liberation\ Mono\ 10
"set guifont=Audimat\ Mono\ 12
set guifont=Consola\ Mono\ 12
set tags+=./tags;$HOME
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
au BufRead,BufNewFile *.json set ft=javascript syntax=javascript
au BufRead,BufNewFile *.zcml set ft=xml syntax=xml
au BufRead,BufNewFile *.pt,*.zpt set ft=xhtml syntax=xhtml
au BufRead,BufNewFile *.jst set ft=htmlcheetah syntax=htmlcheetah
au BufRead,BufNewFile *.vpy set ft=python syntax=python colorcolumn=80
" Rainbow parantheses plugin
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
let Tlist_Use_Right_Window = 1
"map <F2> s<span lang="en" class="multilang">
"map <F3> s<span lang="fr" class="multilang">
"map <F4> s<span lang="es" class="multilang">
"map <F5> :set filetype=htmldjango<CR>
map <F6> oimport ipdb; ipdb.set_trace()<ESC>
map <s-F6> oimport rpdb2; rpdb2.start_embedded_debugger("000123")<ESC>
nnoremap <F8> :bd<CR>
nnoremap <F9> :TagbarToggle<CR>
nnoremap <F10> :UndotreeToggle<cr>
"map <F10> \be
"map <F11> :!ctags -R -f ./tags `python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`<CR>
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType javascript setlocal ts=2 sts=2 sw=2
autocmd FileType rst setlocal ts=2 sts=2 sw=2
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType html setlocal ts=2 sts=2 sw=2
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml setlocal ts=2 sts=2 sw=2
" save registers
set viminfo=%,'50,\"100,n~/.viminfo
""let g:miniBufExplMapWindowNavVim = 1
""let g:miniBufExplMapWindowNavArrows = 1
""let g:miniBufExplMapCTabSwitchBufs = 1
""let g:miniBufExplModSelTarget = 1
"buftabs
noremap <f1> :bprev<CR>
noremap <f2> :bnext<CR>
noremap <s-f1> :tabprevious<CR>
noremap <s-f2> :tabnext<CR>
map <C-J> <C-W>j
map <C-K> <C-W>k
map <C-L> <C-W>l
map <C-H> <C-W>h
nnoremap <C-g>f :echo cfi#format("%s", "")<CR>
" Strip trailing whitespace
function! <SID>StripTrailingWhitespaces()
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" Do the business:
%s/\s\+$//e
" Clean up: restore previous search history, and cursor position
let @/=_s
call cursor(l, c)
endfunction
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
"let g:BASH_Ctrl_j = 'off'
"nnoremap <C-j> oimport ipdb; ipdb.set_trace()<ESC>
python << EOF
import os
import sys
import vim
for p in sys.path:
if os.path.isdir(p):
vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
# for the omelette zc.buildout recipe
if os.path.isdir('parts/omelette'):
vim.command(r"set path+=%s" % 'parts/omelette')
EOF
command! -nargs=? Filter let @a='' | execute 'g/<args>/y A' | new | setlocal bt=nofile | put! a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment