Skip to content

Instantly share code, notes, and snippets.

@lukaszkorecki
Created August 9, 2012 16:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save lukaszkorecki/3305649 to your computer and use it in GitHub Desktop.
Save lukaszkorecki/3305649 to your computer and use it in GitHub Desktop.
" replace 'function' with λ
au BufNewFile,BufRead *.js syntax keyword javasScriptFunction function conceal cchar=λ
au BufNewFile,BufRead *.js hi! link javasScriptFunction Conceal
au BufNewFile,BufRead *.js setlocal conceallevel=2
" add abbreviations for JS
" f_
" expands to
" function() {
" <cursor>
"
" }
" f- expands to
" function() { <cursor )
autocmd Filetype javascript iabbr f_ function(){<CR>:}<ESC>?:<CR><ESC>xO
autocmd Filetype javascript iabbr f- function(){:}<ESC>?:<CR><ESC>xO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment