Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding .irbrc to support vi editing inside and improved autocompletio…

…n and colors
  • Loading branch information...
commit ef822ffd49874ec7bfba558ea0f8f986f95fac27 1 parent 94f4756
Thorsten Lorenz authored
Showing with 31 additions and 3 deletions.
  1. +3 −0  .gitmodules
  2. +7 −0 .irbrc
  3. +1 −0  .vim/bundle/blackboard
  4. +20 −3 .vimrc
View
3  .gitmodules
@@ -61,3 +61,6 @@
[submodule "vim/bundle/vividchalk"]
path = vim/bundle/vividchalk
url = https://github.com/tpope/vim-vividchalk.git
+[submodule ".vim/bundle/blackboard"]
+ path = .vim/bundle/blackboard
+ url = https://github.com/nelstrom/vim-blackboard.git
View
7 .irbrc
@@ -0,0 +1,7 @@
+require 'rubygems'
+
+require 'interactive_editor'
+
+require 'wirble'
+Wirble.init
+Wirble.colorize
1  .vim/bundle/blackboard
@@ -0,0 +1 @@
+Subproject commit c216b4355d4ece0b0868d621c60dd221e7751b0f
View
23 .vimrc
@@ -7,12 +7,18 @@ call pathogen#helptags()
let mapleader=","
let isGui = has("gui_running")
+
+" Restore cursor position e.g. when using via irb
+ autocmd BufReadPost *
+ \ if line("'\"") > 1 && line("'\"") <= line("$") |
+ \ exe "normal! g`\"" |
+ \ endif
" Font
set gfn=Courier:h16
" Editing and reloading vimrc
- nmap <silent> <leader>ev :sp ~/.vimrc<CR><C-W>_
- nmap <silent> <leader>sv :source ~/.vimrc<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>
+ nmap <silent> <leader>ev :sp $MYVIMRC<CR><C-W>_
+ nmap <silent> <leader>sv :source $MYVIMRC<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>
" Haskell specific
@@ -78,6 +84,7 @@ call pathogen#helptags()
"Automatically remove trailing spaces"
au FileType c,cpp,java,php,js,py,coffee au BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")'))
+
"Maximize Window
" au GUIEnter * simalt ~x
@@ -88,6 +95,7 @@ call pathogen#helptags()
" BufferNavigation
map ,j :bp<CR>
map ,k :bn<CR>
+ set hidden
"Ruby
au FileType ruby,eruby set omnifunc=rubycomplete#Complete
@@ -140,7 +148,7 @@ call pathogen#helptags()
" FileUtils
" NerdTree
- map <C-l> :wa \| NERDTreeToggle<CR>
+ map <C-l> :NERDTreeToggle<CR>
" Close current buffer
map <silent> <leader>, :bd<CR>
@@ -153,6 +161,9 @@ call pathogen#helptags()
" Open new terminal shell
map <leader>d :sh <CR>
+"Commands
+command! -nargs=* Wrap set wrap linebreak nolist
+
"Shell inside Vim
command! -complete=shellcmd -nargs=+ S call s:RunShellCommand(<q-args>)
function! s:RunShellCommand(cmdline)
@@ -180,3 +191,9 @@ function! s:RunShellCommand(cmdline)
1
endfunction
+" Diff current Buffer with original file
+if !exists(":DiffOrig")
+ command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
+ \ | wincmd p | diffthis
+endif
+
Please sign in to comment.
Something went wrong with that request. Please try again.