Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " This isn't 1980, we don't need to act like plain 'vi'
- set nocompatible
- " Use bash instead of sh
- set shell=/bin/bash
- syntax on
- filetype on
- filetype indent on
- filetype plugin on
- set number
- set cindent
- set showmatch
- set autoindent
- set smartindent
- " Don't artificially wrap long lines on the screen
- set nowrap
- " For terminal, we'll try elflord
- " colorscheme elflord
- set background=dark
- " Show the ruler and 1 line of status all the time
- set ruler
- set cmdheight=1
- set laststatus=2
- set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\ [%l/%L\ (%p%%)]
- " Allow backspacing through newlines
- set backspace=indent,eol,start whichwrap+=<,>,[,]
- " Set 4-space tabs
- set tabstop=4
- set shiftwidth=4
- set softtabstop=4
- set expandtab
- set number " line numbers
- " Quickly highlight matching braces/parentheses/brackets
- set showmatch
- set showcmd
- " Keep 5 lines of context when scrolling
- set scrolloff=3
- " Enable vim modelines
- set modeline
- " Use the 'global' flag by default in search/replace
- set gdefault
- " Yes, we have a fast terminal
- set ttyfast
- " Make window splitting behave
- set noequalalways
- set splitbelow
- " Don't make backup files (filename.c~)
- set nobackup
- " Enable the mouse - clickity clickity
- set mouse=a
- " Correct typos.
- iab erturn return
- iab retrun return
- iab retunr return
- iab seperate separate
- iab truely truly
- iab flase false
- iab fasle false
- function! OnlineDoc()
- if &ft =~ "cpp"
- let s:urlTemplate = "http://doc.trolltech.com/4.4/%.html"
- elseif &ft =~ "python"
- let s:urlTemplate = "http://riverbankcomputing.co.uk/static/Docs/PyQt4/html/%.html"
- elseif &ft =~ "ruby"
- let s:urlTemplate = "http://www.ruby-doc.org/core/classes/%.html"
- elseif &ft =~ "perl"
- let s:urlTemplate = "http://perldoc.perl.org/functions/%.html "
- else
- return
- endif
- let s:browser = "firefox"
- let s:wordUnderCursor = expand("")
- let s:url = substitute(s:urlTemplate, "%", s:wordUnderCursor, "g")
- let s:cmd = "silent !" . s:browser . " " . s:url . "&"
- execute s:cmd
- endfunction
- " online doc search
- map :call OnlineDoc()
- set encoding=utf-8 " Use UTF-8 Go Unicode!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement