20111011 追è¨
node.jsãã¤ã³ã¹ãã¼ã«ããªãã¨.coffeeå ã®æ¥æ¬èªã.jsã«ã³ã³ãã¤ã«ãããå¾ã«æ¬ è½ããåé¡ãããã¾ããã
brew install node.js
ã§ãnode.jsãã¤ã³ã¹ãã¼ã«ãããã¨ããããããã¾ãã
Homebrew㯠https://github.com/mxcl/homebrew/wiki/installation ãåèã«ç°¡åã«ã¤ã³ã¹ãã¼ã«ã§ãã¾ãã
ããçJSã¯è§¦ããªã
Titaniumã§ãã¸ãã¯ãæ¸ãã¦ãã¦çJSã®éåãã«çµ¶æãã¦ããã¨ãããCoffeeScriptã®ãã¨ãæãåºãã¦é£ããå«ãã§è§¦ã£ã¦ãªãã£ãã®ã§è©¦ãã«CoffeeScriptã触ã£ã¦ã¿ãã壮絶è¯ãã£ãã®ã§ãããTitaniumãCoffeeScriptã§æ¸ããã¨æãã¾ããã
Guardã§èªåã³ã³ãã¤ã«
CoffeeScriptã¯ã³ã³ãã¤ã«ãããã¨ã§JavaScriptã®ã½ã¼ã¹ã³ã¼ããåãåºãããã®ã§ããã¡ãã¡ã³ã³ãã¤ã«ããªãããããªããã©ãããã¯èªåã³ã³ãã¤ã«ãããã¨ããã
GuardでTitanium+CoffeeScriptの開発を快適に | ひげろぐãåèã«ãèªåã³ã³ãã¤ã«ç°å¢ãä½ãã¾ãã
Node.jsã¯ãããªã
ããCoffeeScriptãã¤ã³ã¹ãã¼ã«ããããã«Node.jsãã¤ã³ã¹ãã¼ã«ãã¾ãããã¨ããã¨ã³ããªã¼ãè¦ããã©ãä¸è¨ã®æ¹æ³ã§ããã°Node.jsãã¤ã³ã¹ãã¼ã«ããå¿ è¦ã¯ããã¾ããã
Growlã§éç¥
Growlã¯æ¢ã«ã¤ã³ã¹ãã¼ã«ãã¦ããã®ã§growlnotifyã ã追å ã§ã¤ã³ã¹ãã¼ã«ãããã£ãã®ã ãã©ãã¼ã«ã«ã§Extrasã®ä¸ã«ããã¨ããgrowlnotifyãæ¢ãããã ãã©è¦ã¤ãããªãã£ãï¼ããããé å¸ç©ã«ããå ¥ã£ã¦ãªãï¼ï¼ã®ã§Growl - DownloadsããGrowl-1.2.2.dmgããã¦ã³ãã¼ããã¦ãããã«ã¯ãªãã¯ãã¦Extrasã®ä¸ã«ããã¾ããã
ãã¡ãããGrowlãã¤ã³ã¹ãã¼ã«ãã¦ããªã人ã¯Growlæ¬ä½ãã¤ã³ã¹ãã¼ã«ãã¾ãããã
CoffeeScriptãVimã§æ¸ã
Titanium Studioã¯CoffeeScriptãæ¸ããã¨ãªãã¦æ³å®ãã¦ãªãããã§ãTitanium Studioã§CoffeeScriptãæ¸ããã¨ã¯ä½ã®ã¡ãªããããªãã®ã§ä½¿ããããã¨ãã£ã¿ã§æ¸ãã®ãåã ã¨æããæ®æ®µæ £ãã¦ããVimã§æ¸ããã¨ã«ã
Vimãææ°ã«
ãã°ããVimãã¢ãããã¼ããã¦ãªãã£ãã®ã¨vim-pathogenã使ã£ã¦ã¿ããã£ãã®ã§Mac OSXでのvim環境整理。.vimrcやらオヌヌメPlug inやらまとめ。 - ( ꒪⌓꒪) ゆるよろ日記ãåèã«Vimãå ¥ããªãããã¨ã«ã
vim-pathogenãå ¥ãã
https://github.com/tpope/vim-pathogen ã®Installationãåèã«vim-pathogenãå ¥ãã¦ã.vimrcã«ä»¥ä¸ã追å
call pathogen#infect()
ãã¨ã¯ã~/.vim/bundle以ä¸ã«Vimãã©ã°ã¤ã³ãå ¥ããã ãã§OKãããã¼ããã§Vimãã©ã°ã¤ã³ããã£ããæ´çã§ãã¾ããã¼ã
vim-coffee-scriptãå ¥ãã
Vimã®CoffeeScriptãã©ã°ã¤ã³ãæãã¦é ããã®ã§vim-coffee-scriptãå ¥ããã
$ cd ~/.vim/bundle $ git clone https://github.com/kchmck/vim-coffee-script.git
ããã§ã²ã¨ã¾ãVimã§CoffeeScriptãæ¸ãã¦èªåã³ã³ãã¤ã«ããç°å¢ã¾ã§ã§ãã¾ããã
ã ãã¶ããæããã ãã¶ããæããªãã ãã©Titanium APIãé·ãã®ã§è£å®ã欲ããã¨ãã...æ¢ãã¦ãæ¢ãã¦ãè¦ã¤ãããªãã£ããã©Twitterã§æãã¦é ãã¾ããããããã¨ããããã¾ãï¼
titanium-vimãå ¥ãã
ã¨ãããã¨ã§æãã¦ããã ããtitanium-vimãå ¥ããã
$ cd ~/.vim/bundle $ git clone https://github.com/pekepeke/titanium-vim.git
ããã¨ããããããããè£å®ã§ãããããï¼ï¼ï¼
ããã«èªåè£å®ããã
neocomplcacheã¨ããVimãã©ã°ã¤ã³ãå ¥ããã¨èªåè£å®ãã¦ãããããã«ãªãã¾ãã
$ cd ~/.vim/bundle $ git clone https://github.com/Shougo/neocomplcache.git
è¨å®ã¯ä»¥ä¸ãåèã«ãè¨å®é ç®ãå¤ãã®ã§ããä¸åº¦ç®ãéãã¦ææ¡ãã¦ãããã¨ããå§ããã¾ãã
- http://vim-users.jp/2010/10/hack177/
- http://vim-users.jp/2010/11/hack185/
- http://vim-users.jp/2011/01/hack193/
yuroyoroさんの.vimrcãåèã«ãªãã¾ãã
ã¡ãªã¿ã«ãã¨ã«ãã試ãããã¨ããæ¹ã¯ä»¥ä¸ã.vimrcã«ã©ããã
" neocomplcache settings " http://vim-users.jp/2010/10/hack177/ " http://vim-users.jp/2010/11/hack185/ " http://vim-users.jp/2011/01/hack193/ " Disable AutoComplPop. let g:acp_enableAtStartup = 0 " Use neocomplcache. let g:neocomplcache_enable_at_startup = 1 " Use smartcase. let g:neocomplcache_enable_smart_case = 1 " Use camel case completion. let g:neocomplcache_enable_camel_case_completion = 1 " Use underbar completion. let g:neocomplcache_enable_underbar_completion = 1 " Set minimum syntax keyword length. let g:neocomplcache_min_syntax_length = 3 let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*' " Define dictionary. let g:neocomplcache_dictionary_filetype_lists = { \ 'default' : '', \ 'vimshell' : $HOME.'/.vimshell_hist', \ 'scheme' : $HOME.'/.gosh_completions' \ } " Define keyword. if !exists('g:neocomplcache_keyword_patterns') let g:neocomplcache_keyword_patterns = {} endif let g:neocomplcache_keyword_patterns['default'] = '\h\w*' " Plugin key-mappings. imap <C-k> <Plug>(neocomplcache_snippets_expand) smap <C-k> <Plug>(neocomplcache_snippets_expand) inoremap <expr><C-g> neocomplcache#undo_completion() inoremap <expr><C-l> neocomplcache#complete_common_string() " SuperTab like snippets behavior. "imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>" " Recommended key-mappings. " <CR>: close popup and save indent. inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>" " <TAB>: completion. inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" " <C-h>, <BS>: close popup and delete backword char. inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>" inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>" inoremap <expr><C-y> neocomplcache#close_popup() inoremap <expr><C-e> neocomplcache#cancel_popup() " AutoComplPop like behavior. "let g:neocomplcache_enable_auto_select = 1 " Shell like behavior(not recommended). "set completeopt+=longest "let g:neocomplcache_enable_auto_select = 1 "let g:neocomplcache_disable_auto_complete = 1 "inoremap <expr><TAB> pumvisible() ? "\<Down>" : "\<TAB>" "inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>" " Enable omni completion. autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS autocmd FileType python setlocal omnifunc=pythoncomplete#Complete autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags " Enable heavy omni completion. if !exists('g:neocomplcache_omni_patterns') let g:neocomplcache_omni_patterns = {} endif let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' "autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
ããã¨ããããããããèªåè£å®ã§ãããããï¼ï¼ï¼ï¼ç»å使ãåãï¼
ããã§Vim+CoffeeScript+Guardã§èªåã³ã³ãã¤ã«ãããã®ã§ãTitanium Studioã§å®è¡ãã¦iOSã·ãã¥ã¬ã¼ã¿ã§ãã¹ãã§ããããã§ããããã«ãå®è¡ãã³ãã³ãã©ã¤ã³ã§ããããã§ãããã¼ï¼
Titaniumããã¸ã§ã¯ãã®ãã«ãã¨iOSã·ãã¥ã¬ã¼ã¿ã®èµ·åãã³ãã³ãã©ã¤ã³ã§
以ä¸ã®builder.pyãã³ãã³ãã©ã¤ã³ã§ãã«ããªã©ãã§ããã³ãã³ãã§ãã
$ /Library/Application\ Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py builder.py <command> <version> <project_dir> <appid> <name> [options] available commands: install install the app to itunes for testing on iphone simulator build and run on the iphone simulator distribute build final distribution bundle xcode build from within xcode run build and run app from project folder
é·ãã®ã§aliasãè¨å®ãã¾ãã
vim ~/.zshrc
# Titanium builder alias ti='/Library/Application\ Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py'
source ~/.zshrc
ã§ãTitaniumããã¸ã§ã¯ãã®ã«ã¼ããã£ã¬ã¯ããªã§ä»¥ä¸ã®ã³ãã³ããå®è¡ããã¨ããã«ããã¦iOSã·ãã¥ã¬ã¼ã¿ãèµ·åãã¾ãã
ti run .
ãã ããã®æ¹æ³ã ã¨ãªãã«ããã¦å度iOSã·ãã¥ã¬ã¼ã¿ã§ç¢ºèªãããå ´åã¯ãCtrl-Cã§çµäºãã¦ãå度ã³ãã³ããå®è¡ããå¿ è¦ãããã¾ããããã¯ã°ã©ã¦ã³ãã§å®è¡ãã¦ãããã¬ãããã¬ãã¨ããããææ¦ãã¦ããã®ã§ãããã¾ã³ããæ®ã£ãããã¦ä¸æãããã¾ããã§ãããããiOSã·ãã¥ã¬ã¼ã¿ãåèµ·åããã«ãªãã«ãããã¢ããªã確èªã§ããã¨å¬ããã®ã§ãããTitanium Studioã§ãåæ§ã«iOSã·ãã¥ã¬ã¼ã¿ã¯åèµ·åããã®ã§iOSã·ãã¥ã¬ã¼ã¿çã«ç¡çãªã®ããªï¼æãã¦ï¼ã¨ã©ã¤äººï¼
ãããã¦èªã¿ãã
Vimãã¯ããã¯ãã¤ãã«ã?ä½æ¥å¹çãã«ã¤ã¼ã³ãã150ã®æ
- ä½è : Vimãµãã¼ã¿ã¼ãº
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2011/09/23
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- è³¼å ¥: 19人 ã¯ãªãã¯: 661å
- ãã®ååãå«ãããã° (37件) ãè¦ã
Titanium Mobileã§éçºããiPhone/Androidã¢ã㪠(Smart Mobile Developer)
- ä½è : åå°¾é 人,å¢äºéä¸é
- åºç社/ã¡ã¼ã«ã¼: ç¿æ³³ç¤¾
- çºå£²æ¥: 2011/06/10
- ã¡ãã£ã¢: 大åæ¬
- è³¼å ¥: 5人 ã¯ãªãã¯: 370å
- ãã®ååãå«ãããã° (48件) ãè¦ã
Titaniumã¯ãã¼ã¸ã§ã³ã¢ãããéãã®ã§ããèè ãããç²¾åçã«è£å®ç¨¿PDFã以ä¸ã§å ¬éããã¦ãã¾ããã¾ããwikiãã¼ã¸ã®UIã«ã¿ãã°ãAPIã«ã¿ãã°ã¯ãTitaniuméçºã§é常ã«å©ãããã¼ã¸ã§ããåãéçºããªãããã®ãã¼ã¸ãããè¦ã¦ãã¾ãã
http://code.google.com/p/titanium-mobile-doc-ja/
ã¨ãããã¨ã§ãTitaniumã§iOS/Androidã¢ããªéçºã¯CoffeeScript+Guard+Vimç°å¢ã§ãã£ã¦ãããã¨ã«ãã¾ãããããçJSã¯è§¦ããªãã