Skip to content

Instantly share code, notes, and snippets.

@JerryFleming
Created May 14, 2014 13:13
Show Gist options
  • Save JerryFleming/0dee301dd0d9adbec04d to your computer and use it in GitHub Desktop.
Save JerryFleming/0dee301dd0d9adbec04d to your computer and use it in GitHub Desktop.
set ww=h,l,<,>,[,],b,s " move over new lines
set hls
set showcmd
"set ch=2 " enlarge cmdheight so as to avoid the message "HIT ENTER TO CONTINUE"
colorscheme elflord "murphy
" spacebar in command mode to pagedown
map <Space>
map <BS> X
map <Up> gk
map <Down> gj
noremap <F3> :execute "normal mava[:" \| :'<,'>!~/scripts/format_enyo_components<CR> \| :normal `a<ESC>:<CR><ESC>
noremap <F4> <ESC>:w<CR> \| :! pdflatex %<CR>
noremap <F5> <ESC>:w<CR> \| :silent! execute '!firefox http://jerrynb/doc/php-docs-20071125-r2/en/html/function.'. substitute(expand('<cword>'),'_','-','g') .'.html'<CR>
vnoremap <Leader>p p
vnoremap p "_dP
""inoremap { {<CR>}<C-O>O
""inoremap [ []<LEFT>
""inoremap ( ()<LEFT>
""inoremap " ""<LEFT>
""inoremap ' ''<LEFT>
""inoremap $- $this->
""inoremap $_ $this->_
syntax on
set number
set showmatch
set autoindent
set mps+=<:>
set mouse=a
set tabstop=4
set shiftwidth=4
set softtabstop=4
set lcs=tab:>-
set modeline
set modelines=3
set smartcase
"set wrap
set textwidth=0
set diffopt=filler,context:3
set backupdir=~/.vimbak//
set directory=~/.vimswp//
set formatoptions=ctroqwn
set ruler
set expandtab
set wildmode=list:full
set wildmenu
set title
"set foldmethod=indent
"set foldexpr=MyIndent(v:lnum)
set fdm=marker
fun! MyIndent(lnum)
let s:sw = &shiftwidth
if getline(a:lnum) =~ '\s*{$'
return indent(a:lnum) + s:sw
elseif getline(a:lnum) =~ '\s*}$'
return indent(a:lnum) - s:sw
else
return indent(a:lnum)
endf
fun! Pargo(cmd)
execute cmd
update
bd
endf
augroup JumpCursorOnEdit
au!
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ let JumpCursorOnEdit_foo = line("'\"") |
\ let b:doopenfold = 1 |
\ if (foldlevel(JumpCursorOnEdit_foo) > foldlevel(JumpCursorOnEdit_foo - 1)) |
\ let JumpCursorOnEdit_foo = JumpCursorOnEdit_foo - 1 |
\ let b:doopenfold = 2 |
\ endif |
\ exe JumpCursorOnEdit_foo |
\ exe "normal! g`\"" |
\ endif |
" Need to postpone using "zv" until after reading the modelines.
autocmd BufWinEnter *
\ if exists("b:doopenfold") |
\ exe "normal zv" |
\ if(b:doopenfold > 1) |
\ exe "+".1 |
\ endif |
\ unlet b:doopenfold |
\ endif
augroup END
let html_use_css = 1
let html_output_xhtml = 1
let html_whole_filler=1
let use_xhtml = 1
let html_use_encoding = 'utf-8'
"set paste
"set cursorline
"set t_ti= t_te= " dont clear screen after exit
"set comments=s:/*,mb:*,ex:*/
"set display=lastline,uhex
"set ignorecase
nmap <leader>bl :Tlist<CR>
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 php set omnifunc=phpcomplete#CompletePHP
set display=uhex
au BufRead,BufNewFile /tmp/psql.edit.* set ft=sql
au BufRead,BufNewFile *.as set ft=actionscript
au BufRead,BufNewFile *.htm set shiftwidth=2 tabstop=2 softtabstop=2
au BufRead,BufNewFile *.html set shiftwidth=2 tabstop=2 softtabstop=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment