Skip to content

Instantly share code, notes, and snippets.

@nicolaiskogheim
Created February 13, 2015 19:50
Show Gist options
  • Save nicolaiskogheim/af2c2136e485c10b2bd0 to your computer and use it in GitHub Desktop.
Save nicolaiskogheim/af2c2136e485c10b2bd0 to your computer and use it in GitHub Desktop.
Vimrc for reference with bugs in peekaboo plugin
""" Settings for vundle following
set nocompatible
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'junegunn/vim-peekaboo'
call vundle#end() " required
filetype plugin indent on " required
""" End settings for Vundle
syntax on
set autoindent
set backspace=2
set encoding=utf-8
set expandtab
set hlsearch
set ignorecase
set laststatus=2
set laststatus=2
set modelines=0
set number
set shiftwidth=2
set showcmd
set showmatch
set smartcase
set softtabstop=2
set tabstop=2
set textwidth=0
set ttyfast
set wildmenu
set wildmode=list:longest
set wrapmargin=0
" function to execute current buffer using it's shebang
au BufEnter *
\ if match (getline(1) , '^\#!') == 0 |
\ execute("let b:interpreter = getline(1)[2:]") |
\ endif
fun! CallInterpreter()
if exists("b:interpreter")
exec("! ".b:interpreter." %")
endif
endfun
map <leader>x :call CallInterpreter()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment