All pastes #633789 Raw Edit

Miscellany

public text v1 · immutable
#633789 ·published 2007-07-25 22:50 UTC
rendered paste body
set number
set shiftwidth=4
set tabstop=4
syntax on
colorscheme inkpot
highlight Comment cterm=bold
set incsearch
set hlsearch
set smartindent
set ignorecase
set smartcase

function InsertTabWrapper()
    let col = col('.') - 1
    if !col || getline('.')[col - 1] !~ '\k'
        return "\<tab>"
    else
        return "\<c-p>"
    endif
endfunction
 
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
inoremap <c-space> <c-x><c-o>
let mapleader = "\\"

augroup vim7highlightCurrentLineInActiveWindow
  au WinEnter * if g:HighlightCurrentLine | setlocal cul | endif
  au WinLeave * if g:HighlightCurrentLine | setlocal nocul | endif
augroup end

function!  s:ToggleHighlightCurrentLine()
  if !exists('g:HighlightCurrentLine') || g:HighlightCurrentLine==0
    setlocal cul
    let g:HighlightCurrentLine=1
  else
    setlocal nocul
    let g:HighlightCurrentLine=0
  endif
endfunction

command! ToggleHighlightCurrentLine :call <sid>ToggleHighlightCurrentLine() 

ToggleHighlightCurrentLine

nnoremap <CR> :nohlsearch<CR>/<BS><CR> 

command -bar -nargs=1 OpenURL :!firefox <args>

autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete


noremap § :b#<cr> 
map <c-s-tab> :tabprev<CR>
map <c-tab> :tabnext<CR>
map <c-t> :tabnew<CR>:tabmove<CR>
map <c-q> :q<CR>

hi TabLineFill  gui=NONE      gui=underline
hi TabLineSel   guifg=#000000 guibg=#cfbfad
hi TabLine      guibg=#404040