Skip to content

Instantly share code, notes, and snippets.

@AdamSaleh
Created January 9, 2014 13:54
Show Gist options
  • Select an option

  • Save AdamSaleh/8334416 to your computer and use it in GitHub Desktop.

Select an option

Save AdamSaleh/8334416 to your computer and use it in GitHub Desktop.
set shm=atI " Disable the distracting intro screen.
set lazyredraw " Don't redraw the screen during macros.
set ttyfast " Improves redrawing for "newer" computers
" (where "newer" is defined as "not ancient").
set timeoutlen=500 " Lower timeout for custom mappings.
set go+=a
set clipboard=unnamed
set titlestring=%f title " Display the filename in the terminal window.
set statusline=%t[%{strlen(&fenc)?&fenc:'none'},%{&ff}]%h%m%r%y%=%c,%l/%L\ %P
set showcmd " Show incomplete command at bottom right, please.
set splitbelow " Open new split windows BELOW the current.
set bs=2 " Allow backspacing over anything (why would this not be the default)?
set wrap linebreak " Visually "break" lines longer than the terminal window.
set wim=full wildmenu " Enable command-line tab completion (REALLY useful).
set completeopt=menu " Don't show extra info on completions (not so useful).
set wig+=*.o,*.obj,*.pyc,*.DS_Store,*.db " Hide irrelevent matches when
" completing stuff.
set ignorecase smartcase " Only be case sensitive when search contains
" uppercase letters.
set gdefault " Assume /g flag on :s searches, and use the /g flag to denote
" the opposite.
set hidden " Allow hidden buffers (REALLY useful as well).
set mouse=a " Enable mouse support.
set enc=utf-8 " Enable unicode support (seriously).
set nofoldenable " Disable folding.
set number
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set expandtab
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
"let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" My Bundles here:
"
" original repos on github
Bundle 'bling/vim-airline'
Bundle 'myusuf3/numbers.vim'
Bundle 'scrooloose/syntastic'
Bundle 'mhinz/vim-signify'
"Bundle 'tpope/vim-fugitive'
"Bundle 'Shougo/unite.vim'
Bundle 'Valloric/YouCompleteMe'
Bundle 'tpope/vim-fireplace'
Bundle 'tpope/vim-classpath'
Bundle 'kien/rainbow_parentheses.vim'
Bundle 'guns/vim-clojure-static'
filetype plugin indent on
syntax on " Who uses a text editor without syntax highlighting these days?
set background=dark " nice colorscheme
set hlsearch " Highlight search matches!
" Et cetera... (now, go work instead of screwing around with your text editor!)
""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
set laststatus=2
let g:syntastic_python_checkers=['pylint', 'pyflakes']
"au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
"match ErrorMsg '\s\+$'
" Formar the status line
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
au Syntax * RainbowParenthesesLoadChevrons
" Removes trailing spaces
function! TrimWhiteSpace()
%s/\s\+$//e
endfunction
autocmd FileType python,java autocmd FileWritePre * :call TrimWhiteSpace()
autocmd FileType python,java autocmd FileAppendPre * :call TrimWhiteSpace()
autocmd FileType python,java autocmd FilterWritePre * :call TrimWhiteSpace()
autocmd FileType python,java autocmd BufWritePre * :call TrimWhiteSpace()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment