Created
June 3, 2014 23:12
-
-
Save obeid/a3c7d2202ae67ef1cd49 to your computer and use it in GitHub Desktop.
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 relativenumber | |
set ruler | |
set t_Co=256 | |
syntax enable | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" Set Vim to use the colors of Xresources and specifically the scheme hybrid | |
let g:hybrid_use_Xresources = 1 | |
colorscheme hybrid | |
" Yank text to the OS X clipboard | |
noremap <leader>y "*y | |
noremap <leader>yy "*Y | |
" Preserve indentation while pasting text from the OS X clipboard | |
noremap <leader>p :set paste<CR>:put *<CR>:set nopaste<CR> | |
" Vranger trick | |
function! RangeChooser() | |
let temp = tempname() | |
" The option "--choosefiles" was added in ranger 1.5.1. Use the next line | |
" with ranger 1.4.2 through 1.5.0 instead. | |
"exec 'silent !ranger --choosefile=' . shellescape(temp) | |
exec 'silent !ranger --choosefiles=' . shellescape(temp) | |
if !filereadable(temp) | |
" Nothing to read. | |
return | |
endif | |
let names = readfile(temp) | |
if empty(names) | |
" Nothing to open. | |
return | |
endif | |
" Edit the first item. | |
exec 'edit ' . fnameescape(names[0]) | |
" Add any remaning items to the arg list/buffer list. | |
for name in names[1:] | |
exec 'argadd ' . fnameescape(name) | |
endfor | |
redraw! | |
endfunction | |
command! -bar RangerChooser call RangeChooser() | |
nnoremap <leader>r :<C-U>RangerChooser<CR> | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
" The following are examples of different formats supported. | |
" Keep Plugin commands between vundle#begin/end. | |
" plugin on GitHub repo | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'Shutnik/jshint2.vim' | |
" plugin from http://vim-scripts.org/vim/scripts.html | |
" Plugin 'L9' | |
" Git plugin not hosted on GitHub | |
" Plugin 'git://git.wincent.com/command-t.git' | |
" git repos on your local machine (i.e. when working on your own plugin) | |
" Plugin 'file:///home/gmarik/path/to/plugin' | |
" The sparkup vim script is in a subdirectory of this repo called vim. | |
" Pass the path to set the runtimepath properly. | |
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} | |
" Avoid a name conflict with L9 | |
" Plugin 'user/L9', {'name': 'newL9'} | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - list configured plugins | |
" :PluginInstall(!) - install (update) plugins | |
" :PluginSearch(!) foo - search (or refresh cache first) for foo | |
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment