ãã©ãããé»åæ¸ç±åã«å¯ãã¦: ãã©ãããã¨ç§
æ¸ããæ¸ããã¨æããªããéåæéãç«ã£ã¦ãã¾ã£ããã©ããã©ãããé»åæ¸ç±åã®ãã¥ã¼ã¹ããã£ãã
「ドラえもん」電子書籍化、てんとう虫コミックス1〜45巻とデジタルカラー版Vol.1〜141を配信開始 -INTERNET Watch
ç¾å¨æ¢ã«é»åæ¸ç±çã販売ããã¦ãããæ°ä»ãããKindleçã販売ããã¦ããã
å ã キンコーズで電子書籍用に1冊108円で断裁してもらったお話と個人的な自炊のお話。 - ゆず日記 ã§é»åæ¸ç±ã¸ã®ç§»è¡ãé²ãã¦ãã¦ãã¡ãã£ã¨åã®50%éå ã»ã¼ã«ã®éã«ãã³ã¬ãKindleçããããã®ã¯ãã¹ã¦Kindleã§è²·ãç´ããæå ã®ã³ããã¯ã¹ã¯ãã¼ã±ãããã¬ã¤ã¹ã¨ããã¯ãªãã§å£²ã£ã¦ãã¾ã£ãã
Oreillyã¯Ebook Storeãããããä»ã®æè¡æ¸ãæ°æ¸ã¯ãã®ã¾ã¾é»åæ¸ç±çãè²·ããããé»åæ¸ç±ããªããã°ç´ã®æ¸ç±ãè²·ã£ã¦æè£ãScanSnapã§åãè¾¼ãã§...ã¨ãã£ããæ¬æ£ä¸è¦ã®çæ´»ã«ãªã£ãã
åºç社ã«ããæ¸ç±ã¨ã®é
ããããå ´åãããããèªåãè²·ã£ã¦ãããã³ã¬ã¯ææ°åçºå£²æ¥ã®0æé ã«æå
ã®Kindleã«é
ä¿¡ãããããèªå®
, ãªãã£ã¹, ã«ãã§, ä½å¦ã§ãKindleãã600åå¼·ã®æ¸ç±ã«ã¢ã¯ã»ã¹ã§ããç°å¢ãé
åã§ããã
å
ã
æã£ã¦ããã«ãæ¬æ£ã¯å¼ã£è¶ãã®éã«å¦åããã
ã¡ãªã¿ã«ãã¸ã§ã¸ã§ã®ã³ããã¯ã¹ã¯ã¢ãã¡ã®å½±é¿ããã£ã¦ã1ã7é¨ãé«å¤ã§å£²ãã¦ãã¾ã£ãã 10年以ä¸åããå ¨å·»æ°åã§è³¼å ¥ãã¦ããåã§ã(63 + 17 + 24)å·» * 420 = 43,680åæãã£ã¦ãããã30,000åã§å£²å´ã§ããã æ庫æ¬ãã¼ã¹ã®Kindleã¢ãã¯ãçãå ¨é¨è³¼å ¥ããã¨34,600åã50%ãã¤ã³ãã»ã¼ã«æã«è²·ã£ãã®ã§æºå¸¯é»è©±ä¼ç¤¾é¢¨ã«ããã¨å®è³ª17,300åã ã£ãã®ã§ãæå ã®ãéã12,700åå¢ããå½¢ã§Kindleçã«ç§»è¡ã§ãããã¨ã«ãªãã
ã«ãã¼è£ã®èæ¨å çã®ã³ã¡ã³ãããããã¼ã!ã¹ãæ§ãæ»ãã !ãã¨ããèªããªããªãã®ã¯ãã¡ãªããã ããæ¬æ£ã¹ãã¼ã¹ãä¸è¦ã«ãªãã¡ãªããã®æ¹ãèªåã«ã¯å¤§ããã£ãã
15å¹´ç¨åããç´åªä½ã§æãç¶ãã¦ãããã©ãåæ¯ãã©ã¹ã§ç§»è¡åºæ¥ãã¨ã¯ä¸æè°ãªãã®ã ãªãã¨æã£ãã
話ãæ»ãã¦ãããã§èªåã«ã¨ã£ã¦ã¯æ¬æ£ã«æå¾ã¾ã§æ®ãç¶ãããã©ãããã³ããã¯ã¹ã¨ã¯ãå¥ãã¨ãªãã®ã§ãã¡ãã£ã¨ã®éSF(ãããã»ãµãã)ãªãã©ãããèªãããããã
ãã©ãããã¨ã®åºä¼ã
åãã¦èªãã ãã³ã¬ã¯ãã©ãããã ã£ãã
ä½æ³ã ã£ããã¯ããæ¶ãã¦ãªãããç©å¿ã¤ããé ãã家ã«ã¯ãã©ãããããã£ãã
ã«ãã¼ãç¡ããã®ããæ±ãã¦ãããã®ããã£ãã®ã§ãå
ã®çºã«ä¸å¤æ¬ãå«ãã¦è¦ªãè²·ã£ã¦ããããã®ããç¥ããªãã
æåã¯ã³ãã追ãé çªãåããããæ¼¢åã®ã«ããè¨èã®æå³ãããåãããªãã£ãããå°ã大ãããªã£ã¦ããã¯å¼ã«èªã¿èãããããããã¦ãããå°å¦æ代ã®å½èªã®é³èªãã¹ã©ã¹ã©èªããã®ã¯ãã©ãããã®ãé°ã ã å¤ä¼ã¿ã«ãã§ã³ã¢ã¤ã¹ãé£ã¹ãªããèªãã§ã¦è½ã¨ãã¦5å·»ãè¶è²ãæ±ãã¦ãã¾ã£ãã®ãããæãåºã ã
ããããªãã¨ãå¦ãã ãã©ããã
æ¥é£*1 太é½ã¨æã®è¦ç´å¾ã®éããç¥ã£ãã®ã¯ãã©ãããã§ããã
ç²ç¹*2ã®åå¨ãç¥ã£ãã®ããã©ãããã§ããã
å·ãè¾¼ã¿*3ãã亡å½*4ããå
ãã¡ã¤ãã¼*5ãã
æ°´ãé
¸ç´ ã¨æ°´ç´ ããæ§æããã¦ãããã¨*6ãç¥ã£ãã®ããã©ãããã§ããã
ãããããããã¹ã¦ãã©ãããã§ããã
ä¿¡é·ã®éæã§æ¥æ¬å²ãå¦ã³ãæ¡éã§å°çãå¦ã¶ã¨ãããããã©ãããã¯çç§ã社ä¼ãå¦ã¹ã¦ãã¾ãã®ã§ãããåãã
ã¹ãåã®åºè§ã¬ã³ãºã®çµãã®è©±*7ãªãã¦ä¸ç¼ã¬ããè²·ã£ãä»å¹´ã«ãªã£ã¦åãã¦æå³ãåãã£ãã
ã®ã³å¤ªã¨ã¹ã夫ããäºãã«ããµã¤ã«ãææãã¦ããã·ã¼ã³ãå·æ¦*8ãç®èã£ããã®ã ã£ããã¨ãå¾ã«ãªã£ã¦æ°ä»ãããããã¿ãå¤ãã
ã¡ãªã¿ã«ãããã¡ãã*9ã人é製é æ©*10ã®è©±ã§ãªããããªã«æãã®ãåããã¾ã§10å¹´ä½æãã£ãã
è±ç·
ã¡ãªã¿ã«å¹¾ã¤ãçãéããä¸ã§ãæ¹å¤ãããå 容ãããã
28å·»: ããªããåãã¡ãã£ã¯ãã£ã«ã ã¯å
容ã大ããæ¸ãæãããã¦ããã
å®å®¶ã«ãã£ãçã§ã¯ãããé»ãµã³ãã®åãè¡ãã·ã¼ã³ãããã®ã ãã10å¹´åã«è²·ãç´ããçã§ã¯ãã®ã·ã¼ã³ãã¾ãã¾ãã«ããããã¦ãã¾ã£ã¦ããã
åè: http://www.geocities.co.jp/Playtown-Dice/6159/d-28.html
ä»ã«ãããã¿ãã¦ã°ããã¿ã ãã°ã«ãªã£ã¦ãããã¨ããã©ããããå·®å¥åé¡ã«ããå½±é¿ã大ããåãã¦ããã
åè: 復元光線 Case4
å¥ã«ã³ã¬ãããããã®ã§ã¯... ã¨æããã®ãå¤ãã®ã ããèªè æ°ãå¤ãå½±é¿ã大ããã ãã«æ°ãé£ããªããã°ãªããªããã¨ãå¤ãã®ãã¨æãã å ã®ãã®ãèªã¿ãããã°ãä»ã§ã¯è¤åã»Fã»ä¸äºéå¤§å ¨éã«ãã¦ãã¨ãè«ã³ããã¯ã¹æªåé²ã®è©±ãå«ãã¦å ¨è©±æ²è¼ããã¦ããã®ã§ãã¡ãããªã¹ã¹ã¡ã(æ©ãé»åæ¸ç±åãã¦æ¬²ããã)
ãã©ããã 1 (è¤åã»Fã»ä¸äºéå¤§å ¨é)
- ä½è : è¤åã»Fã»ä¸äºé
- åºç社/ã¡ã¼ã«ã¼: å°å¦é¤¨
- çºå£²æ¥: 2009/07/24
- ã¡ãã£ã¢: ã³ããã¯
- è³¼å ¥: 8人 ã¯ãªãã¯: 483å
- ãã®ååãå«ãããã° (95件) ãè¦ã
å¤å1çªå¥½ããªè©±
23å·»: ãã¼ããããã¡ãªãã¤ãããã ã§ãããã®ã³å¤ªãããã¡ãªå¤ç®ãããå¼ã£è¶ãã¦ãã話ã ã
ãã©ããã (23) (ã¦ãã¨ãè«ã³ããã¯ã¹)
- ä½è : è¤åã»Fã»ä¸äºé
- åºç社/ã¡ã¼ã«ã¼: å°å¦é¤¨
- çºå£²æ¥: 1981/12/19
- ã¡ãã£ã¢: ã³ããã¯
- è³¼å ¥: 1人 ã¯ãªãã¯: 4å
- ãã®ååãå«ãããã° (5件) ãè¦ã
å¤ç®ããã¯ååéããã¡ãªåã§ãã®ã³å¤ªããåå¼·ãéåãã§ããªãã
å
çãã¸ã£ã¤ã¢ã³ãããã¤ããã³ããã¦ãã®ã³å¤ªã¯ãèªåãããã¡ãªãã¤ãæ¥ããã¨ã§ç¤¾ä¼çã«ã¼ã¹ãã®æä¸å±¤ããè±ããããä»ã¾ã§ã®å£çæã®ååãããä»åº¦ã¯å¤ç®ããã馬鹿ã«ãã ãã
ä¸è¦ä»²è¯ãããã«ä¸ç·ã«å®¿é¡ããã ãããã¢ã¯ã¢ã¯é å¼µãå¤ç®ããã¨ãããã«é£½ãã ãã®ã³å¤ªãã¸ã£ã¤ã¢ã³ã«éçã«èªãããããèªåã¯åå ããããªãã®ã§å¤ç®ããã代ããã«æ¨è¦ããã
è¦ããããã©ãããããã®ã³å¤ªã®è¡åãçã¿ããããã¨ã§éã¡ã«æ°ä»ãããã¸ã£ã¤ã¢ã³ã«éçã®è²¬ä»»ãåããã¦ãããã§æ®´ãããããªå¤ç®ããããã®ã³å¤ªãå©ãã«å
¥ãã¨ããå
容ã ã
ãã®è©±ã¯åä¾ãªããã«æ·±ãèããããããã
ã¾ãããã®è©±ã®è¦æãªåå¼·ã§ãæãåºããã«ã¢ã¯ã¢ã¯åªåããå¤ç®ããã®å§¿å¢ã«ãå¦ã°ãããã*11
è¤åå çã¯ããã¤ã³ã¿ãã¥ã¼ã§ãã®ã³å¤ªã¯ç§ãªãã§ãããã¨ãã話ããã¦ããã è¤åå çãå°å¦çæ代ãåå¼·ãéåããã¡ã§ããã¸ã§ããå çã«å±ããã¦ããã¨ãããå ¨å½ã«ããæ©ããåä¾ãã¡ããã¤ããæã§ããã©ããããèªãã§ãèªåãããã¸ãªã®ã³å¤ªãè¦ã¦å æ°ãåºãã¦æ¬²ãããã¨ãã£ãã¡ãã»ã¼ã¸ã ã£ãã
ç§ãå°å¦çæ代ãåå¼·ãããããªãã«ã¯åºæ¥ããéåãããã£ãããã¡ã§ãå°å¦çæ代ã«éåãåºæ¥ãªãã¨ããã®ã¯ç¤¾ä¼çã«ã¼ã¹ãã®ä¸å±¤ã«ãªããã¡ã§ãããå½æã¯ã¤ããæãããããã¨ãå¤ãã£ãä¸ã§ãã®ã³å¤ªã«èªå·±æå½±ãã¦ãã1人ã¨ãã¦ããã©ãããã«æãããç¥èãå¾ã¦ãã®ã³å¤ªã®è¡åããå¦ã¶ã
ãããã£ãçµé¨ããã©ãããã¯ç§ã«æ®ãã¦ãããã
ã
æµç³ã«ãã®ã³ããã¯ã¹ãå¦åãã¦ãã¾ãã®ã¯ãã®ã³ãªãã®ã§ãå®å®¶ã«éã£ã¦åã£ã¦ç½®ãã¤ããã ã ãã©ããããé£è¼ããã¦ããã®ã19xx-19xxå¹´ãèªåã®çã¾ãã¯1984å¹´ãããã§ãæ代ã®å¤åã«ä½ã®æµæãç¡ãèªããã¨ãåºæ¥ãã ä»ã®åä¾éããã©ã´ã³ãã¼ã«ãæ®éã«åãå ¥ãã¦ãããã®ã¨åãããããéåæãªãåãå ¥ãã¦ãããä½åã ã¨æãã
ããã¯ã³ããã¯ã¹ã¨ããåªä½ããé»åæ¸ç±ã«ãªã£ã¦ãå¤ãããªããã®ã ã¨æã£ã¦ããã ãã¤ãåä¾ã«ãKindleã¨ã»ããã§ãã¬ã¼ã³ããããã
æå¾ã«å°å¦å å¹´çã®3æå·ã«é »ç¹ã«æ²è¼ããã話ãã¤ã¾ãå°å¦çããã©ãããã®æ²è¼èªããåæ¥ããæå¾ã®å·ã®è©±ãã¾ãã大山ã®ã¶ä»£çã¢ãã¡ãã©ãããæçµè©±ã¨ãã¦ãæ¾éããã話ã§ãããã45å¹´å¾ã»ã»ã»ã*12ããããã®ã»ãªããå¼ç¨ããã¦ããã£ã¦ãããã
ãã¿ã¯ãããããä½åº¦ãã¤ã¾ã¥ãã ã§ããã®ãã³ã«ç«ã¡ç´ãå¼·ãããã£ã¦ããã ãã
ç§ã¯ã¾ãä¸ã¤ããã©ãããã¨ããä½åã«æãããã®ãããããªãã
ãã² ãã©ããããã©ã¹ã大é·ç·¨ãã©ããããè¤åFä¸äºéå ¨éã®Kindleåãæå¾ ãã¦çãç½®ããã¨æãã
ããã§ã¯ã¾ã ã©ããã§ã
*1:ãã©ããã30å·»: å®ç©ãããã¥ã¢å¤§ç¾ç§
*2:ãã©ããã40å·»: ã¢ã¼ãã³æ
*3:ãã©ããã37å·»: ãã¾ãã®ä¸ã®ããã¡ãã
*4:ãã©ããã40å·»: ããã®ã¿å»ºå½ç¨åãããã
*5:ãã©ããããã©ã¹2å·»: å ãã¡ã¤ãã¼ã¤ã
*6:ãã©ããã38å·»: ç©ä½å¤æé
*7:ãã©ããã32å·»: è¶ ãªã¢ã«ã»ã¸ãªã©ã大ä½æ¦
*8:ãã©ããããã©ã¹5å·»: ãã³ã·ã«ã»ããµã¤ã«ã¨èªåããããã¬ã¼ãã¼
*9:åä½ã§ã¯ãããã¡ããã§ãªããããã¡ããã§ãã
*10:ãã©ããã8å·»: 人é製é æ©
*11:ããã®æçºããåªåããã«è«¦ãã¦ãã人ãã¡ãã£ã¨å«ãã«ãªã£ãï¼è¤åå çããããªãããï¼
*12:ãã©ããããã©ã¹5å·»: 45å¹´å¾ã»ã»ã»
Vim ã§jsonãã¡ã¤ã«ãéããæã«ãã©ã¤ãããã«ã¯ã©ã¼ãã¼ã·ã§ã³ãä½ã¨ãããã話ã
Vimã§jsonãã¡ã¤ã«ç·¨éæã«ããã«ã¯ã©ã¼ããé表示ã«ãªããã«ã¼ã½ã«è¡ã ãããã«ã¯ã©ã¼ãã表示ããã(表示ãããåã ãããã¹ãä½ç½®ããºã¬ã)ç¾è±¡ãã
ãããªæããã¶ã£ã¡ããããªãã¤ã©ã¤ã©ããã
ãã¼vim-jsonãå
¥ãã¦ãªããã©ä½ã§ã ãï¼ã¨ãããã¨ã§ /Applications/MacVim.app/Contents/Resources/vim/runtime/syntax/json.vim
ã確èªãã¦ã¿ãæã
" NOTE that for the concealing to work your conceallevel should be set to 2 " Syntax: Strings " Separated into a match and region because a region by itself is always greedy syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString if has('conceal') > syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained else > syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape contained endif
ã¨ãã³ãã·ã£ãªç®æãããã¾ãã¦ã:help conceallevel
ãã¦ãã ãã ã¨ããªãã.vimrcã«
autocmd Filetype json setl conceallevel=0
ã¨æ¸ããã解決ããã
MacVimã§ã¯ãCustom Version 7.4 (KaoriYa 20141204) ã«ã¢ãããã¼ãããã¿ã¤ãã³ã°ã§json.vimãæ´æ°ããã¦ããã
Concealæ©è½
concealã¯é ããç§å¯ã«ããã®æã
è¦ã¯jsonã§ããããã«ã¯ã©ã¼ãã¼ã·ã§ã³ã®ãããªãæ§æã¨ãã¦ã¯å¿ è¦ã ãè¦èªæ§ã妨ãããã®ãé表示ã«ã§ããæ©è½ã®ããã ã
å¾è¿°ã® concealcursor
ã conceallevel
ã§æåãå¤æ´å¯è½ã
concealcursor
ã«ã¼ã½ã«è¡ã®ããã¹ãã Conceal表示ããã¢ã¼ããã»ãããã
concealcursor | 説æ |
---|---|
n | ãã¼ãã«ã¢ã¼ã |
v | ãã¸ã¥ã¢ã«ã¢ã¼ã |
i | æ¿å ¥ã¢ã¼ã |
c | ã³ãã³ãã©ã¤ã³ç·¨é |
試ãã« :set concealcursor
ãã¦ã¿ããi
ãã»ããããã¦ããã
conceallevel
conceallevel | 説æ |
---|---|
0 | é常éã表示(ããã©ã«ã) |
1 | conceal対象ã®ããã¹ãã¯ä»£çæå(åæè¨å®ã¯ã¹ãã¼ã¹)ã«ç½®æããã |
2 | conceal対象ã®ããã¹ãã¯é表示ã«ãªã |
3 | conceal対象ã®ããã¹ãã¯å®å ¨ã«é表示 |
conceallevel=0
ãå¾æ¥éãã®è¡¨ç¤ºã
conceallevel=2
ã ã¨ã«ã¼ã½ã«è¡ãããã«ã¯ã©ã¼ãã¼ã·ã§ã³åã ãããã¦è¦ã¥ããã
conceallevel=1
ã¯ã¹ãã¼ã¹ã§ç½®ãæãã£ã¦ããããããºã¬ããªãã«ã¬ã³ãè¡ã«ããæã®ã¿ããã«ã¯ã©ã¼ãã¼ã·ã§ã³ã表示ãããã¹ãããªãã¦ãã¦è¦æãã®ã§æçµçã«ã¯ãã£ã¡ã使ããã¨ã«ããã
ã¾ã¨ã
æçµçã«ã¯ä»¥ä¸ã®è¨å®ã«ãã¦æ§åè¦ãããã¨ã«ããã
if has('conceal') set conceallevel=1 concealcursor= endif
æ¬æ¥ã¯ conceallevel=0 concealcursor=
ã®çºãä»åã®MacVimã®ã¢ãããã¼ãã§åçç¶ãåºã人ã¯éãããã¨æãã
èªåã®ç°å¢ã§ã¯å¥ã®pluginã®è¨å®ç®æ㧠set conceallevel=2 concealcursor=i
ããã¦ããã®ã§ãã©ãã«ã«è¦èãããã
ããåæ§ã®çç¶ãèµ·ãã¦ããããã©ããã§conceallevelãå¤æ´ãã¦ãªãã確èªãã¦ã¿ãã¨ããã§ããã
Vimã§Pythonæ¸ãã¦ãæã«åºãã¡ã½ãããã¬ãã¥ã¼ãæ¶ãã話ã
set completeopt-=preview
ãã¾ããã
JSHintãªãã·ã§ã³ä¸è¦§ãçºãã¦ã¿ãã話ã
JSHintãªãã·ã§ã³ä¸è¦§
JSHint Options Reference ãçºãã¦ã¿ãã(JSHint 2.5 ç¾å¨)
ããã¥ã¡ã³ãåããã¦ãªãé ããªãã·ã§ã³ãä¸é¨å«ã¿ã¾ãã
å¶éç³»ãªãã·ã§ã³
trueã«ããã¨ãã§ãã¯ãå³ãããªã
ãªãã·ã§ã³å | default | |
---|---|---|
bitwise | true | ãããæ¼ç®åã®ç¦æ¢ |
camelcase | false | camelCase, UPPERASEã®å¼·å¶ |
curly | true | if, forã®ãããã¯ã¹ã³ã¼ããå¿ ã{}ã§æ¬ãããå¼·å¶ |
eqeqeq | true | æ¯è¼æ¼ç®åã¯==, != ã§ã¯ãªã===, !==ãå¼·å¶ |
forin | true | for...inã«ã¼ãå ã§hasOwnPropertyã§ã®ãã§ãã¯ãå¼·å¶ |
immed | false | æ¬å¼§ã§æ¬ããã¦ããªãç¡åé¢æ°ã®å³æå®è¡ç¦æ¢ e.g. (function () { } ()); |
indent | 4 | ã¤ã³ãã³ã |
latedef | false | varåã®å¤æ°ä½¿ç¨ç¦æ¢ "nofunc"ã§é¢æ°ã¯é¤å¤ |
maxcomplexity | false | 循環的複雑度 - Wikipedia ã®å¶é |
maxdepth | false | æ大ãã¹ãæ°ã®å¶é |
maxerr | 50 | æ大ã¨ã©ã¼æ°ã®å¶é |
maxlen | false | ä¸è¡ã®é·ãå¶é |
maxparams | false | é¢æ°ã®æ大å¼æ°ã®å¶é |
maxstatements | false | é¢æ°ãã¨ã®æ大è¡æ°ã®å¶é |
newcap | false | ã³ã³ã¹ãã©ã¯ã¿åã¯å¤§æåã«å¼·å¶ e.g. new F() |
noarg | true | arguments.caller and arguments.callee ã®ä½¿ç¨ç¦æ¢ |
noempty | true | 空ãããã¯ã®ç¦æ¢ |
nonbsp | true | ã®ç¦æ¢ |
nonew | false | new ã®ç¦æ¢ |
plusplus | false | ++ , -- ã®ç¦æ¢ |
quotmark | false | ã¯ã©ã¼ãã®è¦å® true: ã©ã¡ããã«è¦å®, false: è¦å®ããªã, "single", "double" |
strict | true | use strict;ã®å¼·å¶ |
trailing | true | è¡æ«ã®ãã¯ã¤ãã¹ãã¼ã¹ç¦æ¢ |
undef | true | æªå®ç¾©å¤æ°ã®ç¦æ¢ |
unused | true | æªä½¿ç¨å¤æ°ãè¦å |
許å¯ç³»ãªãã·ã§ã³
true ã«ããã¨ãã§ãã¯ãçããªã
ãªãã·ã§ã³å | default | |
---|---|---|
asi | false | ã»ãã³ãã³æããã§ãã¯ã®ç¡å¹å |
boss | false | == ãæ¸ãã¹ãæã« = ãæ¸ãã¦ãªãããã§ãã¯ç¡å¹å |
debug | false | debugger ã®è¨±å¯ |
eqnull | false | == null ã®è¨±å¯ |
es5 | false | ECMAscript 5 ã¡ã½ããè¨±å¯ |
esnext | false | ECMAScript 6 ã¡ã½ããè¨±å¯ |
evil | false | eval 㨠new Function() ã®è¨±å¯ |
expr | false | ExpressionStatement (å¼æ) ã®è¨±å¯ |
funcscope | false | é¢æ°ã¹ã³ã¼ããã§ãã¯ã®ç¡å¹å |
globalstrict | false | ã°ãã¼ãã«ãª"use strict"è¨±å¯ |
iterator | false | iterator ããããã£ã®è¨±å¯ |
lastsemic | false | ã¯ã³ã©ã¤ãã¼ã§æ¸ããæã®æå¾ã®ã»ãã³ãã³æããã§ãã¯ã®ç¡å¹å |
laxbreak | false | å®å ¨ã§ãªãæ¹è¡ã®è¨±å¯ |
laxcomma | false | , ãå ã«æ¸ãã¹ã¿ã¤ã«ã®è¨±å¯ |
loopfunc | false | é¢æ°ã®ç¡éã«ã¼ããã§ãã¯ã®ç¡å¹å |
moz | false | Firefoxã®JS1.7ã§è¿½å ãããã¡ã½ããè¨±å¯ (æå¹æã¯esnextããåªå ããã) |
multistr | false | æ¹è¡ã\ã§ã¨ã¹ã±ã¼ããã¦ããªãè¤æ°è¡ããã¹ãã®ãã§ãã¯ç¡å¹å |
proto | false | proto ã®è¨±å¯ |
scripturl | false | javascript:... ã¯ãã¾ãã®URLã®è¨±å¯ |
shadow | false | å®ç¾©æ¸ã¿å¤æ°ã®åå®ç¾©ãè¨±å¯ |
smarttabs | false | ã¿ãã¨ã¹ãã¼ã¹ã®æ··å¨è¨±å¯ |
sub | false | é£æ³é åã®å³å¯ãªå¼ã³åºãæ¹ãã§ãã¯ã®ç¡å¹å e.g. person['name']ã¨person.name |
supernew | false | new function () { ... }; 㨠new Object; ã®è¨±å¯ |
validthis | false | ã³ã³ã¹ãã©ã¯ã¿é¢æ°ä»¥å¤ã®é¢æ°å ã§thiså©ç¨è¨±å¯(strict modeã®æã®ã¿) |
ã©ã¤ãã©ãª/ãã¬ã¼ã ã¯ã¼ã¯ãªãã·ã§ã³
使ç¨ããã©ã¤ãã©ãªé¡ãtrueã«ããã¨ããã®ã©ã¤ãã©ãªã§ä½¿ç¨ãã¦ããã°ãã¼ãã«å¤æ°è¦åãåºãªããªã
ãªãã·ã§ã³å | default | |
---|---|---|
browser | false | ãã©ã¦ã¶ (window, document, etc) |
couch | false | CouchDB |
devel | false | éçº, ãããã°ç¨å¤æ° (alert, confirm, etc) |
dojo | false | Dojo Toolkit |
jquery | false | jQuery |
mootools | false | MooTools |
node | false | Node.js |
nonstandard | false | éæ¨å¥¨ã®ã°ãã¼ãã«å¤æ°(escape, unescape, etc) |
phantom | false | PhantomJS |
prototypejs | false | Prototype.js |
rhino | false | Rhino |
worker | false | Web Workers |
wsh | false | Windows Scripting Host |
yui | false | Yahoo User Interface |
ã¬ã¬ã·ã¼
å°æ¥çã«åé¤äºå®ã®ãªãã·ã§ã³
ãªãã·ã§ã³å | default | |
---|---|---|
nomen | false | æ«å°¾ã`ã®å¤æ°åãç¦æ¢ |
onevar | false | å¤æ°å®£è¨ãé¢æ°ã®æåã«æ¸ããã¨ã®å¼·å¶ |
passfail | false | è¦åããã£ãæç¹ã§JSHintãæ¢ãã |
white | false | Douglas Crockfordæ°ã®JavaScriptã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã«ãªã£ã¦ãããã§ã㯠|
ã°ãã¼ãã«å¤æ°ã®è¿½å ãªãã·ã§ã³
ãªãã·ã§ã³å | default | |
---|---|---|
globals | {} | {}å ã«ã°ãã¼ãã«å¤æ°ãå®ç¾©ã§ãã. e.g. "globals": {"AjaxZip3":false} |
è¨å®ä¾
.jshintrc ã¨ãã¦ä¸è¨è¨å®ãjsonå½¢å¼ã§ä¿åãã好ããªæã«é ç½®ããã .jshintrc ã®å©ç¨ãããé åºã¯ã
- ã«ã¬ã³ããã£ã¬ã¯ããªã«ãã.jshintrc
- 親ãã£ã¬ã¯ããªã«ãã.jshintrcããªããã°è¦ªã®è¦ªãã£ã¬ã¯ããªã«ãã.jshintrcããªããã°è¦ªã®è¦ªã®è¦ªã®(以ä¸ç¥)
- $HOME/.jshintrc
ã¨ãªã£ã¦ããã
{ "maxerr" : 50, // Enforcing "bitwise" : true, "camelcase" : false, "curly" : true, "eqeqeq" : true, // Custom Globals "globals" : {"CKEDITOR": false, "jQuery": false} }
å ¬å¼ã®ãµã³ãã«ã¯ãã¡ãã«ããã jshint/.jshintrc at master · jshint/jshint · GitHub
Vim ã§ãªã¬ãªã¬ PHPCS ã¨ãªã¬ãªã¬ PHPMD ã§ãã§ãã¯ãããã話ã
Syntastic ãå ¥ãã
Vim の Syntastic で PSR-2 コーディング規約でチェックするお話。 - ゆず日記 ãåèã
ãªã¬ãªã¬PHPCS
PSR-2 ãã¼ã¹ã«ä»åã¯ã«ã¼ã«ãä½ããã®ã¨ãã
% pear install PHP_CodeSniffer # PHP_CodeSniffer ã¤ã³ã¹ãã¼ã« % pear config-show # ã¤ã³ã¹ãã¼ã«ãã¹ç¢ºèª % cd ~/.phpbrew/php/php-5.4.29/lib/php/PHP/CodeSniffer/Standards # PSR2 ã®ã«ã¼ã«ã»ãããã³ãã¼ãã % cp -r PSR2 OREORE % vi OREORE/ruleset.xml
ä»åã¯è©¦ãã«PSR-2ãã£ã¬ã¯ããªãã¾ããã¨ã³ãã¼ãã¦ãã¤ã³ãã³ãã2ã¹ãã¼ã¹ã§ãè¦åãåºãªãããã¤ã³ãã³ãã«ã¼ã«ãç¡è¦ããã»ãããä½ã£ã¦ã¿ãã
# 2è¡ç®ã®rulesetãOREOREã« <?xml version="1.0"?> <ruleset name="OREORE"> <description>The OREORE coding standard.</description> # 59-64è¡ç®ãã³ã¡ã³ãã¢ã¦ã <!-- Code MUST use an indent of 4 spaces, and MUST NOT use tabs for indenting. --> <!-- <rule ref="Generic.WhiteSpace.ScopeIndent"> --> <!-- <properties> --> <!-- <property name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT"/> --> <!-- </properties> --> <!-- </rule> --> <!-- <rule ref="Generic.WhiteSpace.DisallowTabIndent"/> --> % phpcs --standard=oreore ./hoge.php # ã¤ã³ãã³ãè¦åãç¡ããªãã
.vimrc ã«ã¯ãããªæãã§å®è¡æã®ãªãã·ã§ã³æå®ã§ããã
" ã«ã¼ã«åã«ä¾ãæå® let g:syntastic_php_phpcs_args='--standard=oreore'
ä»è¦ããã--standardã«ã¯ãã¹æå®ãå¯è½ã ã£ãã®ã§
" ãã¹ã«ä¾ãæå® let g:syntastic_php_phpcs_args='--standard=$HOME/.conf/phpcs/ruleset.xml'
ã¨ãã«ãã¦ç½®ã㨠dotfiles ãªãã¸ããªãéçºç°å¢ã®ãªãã¸ããªã®ã«ã¼ã«ã»ãããåç §ãã¦è¦åãã»ããã§ããã
ãã£ã¨è©³ãã㯠Manual :: A sample ruleset.xml file that describes all features of the format ãè¦ããã
ãªã¬ãªã¬PHPMD
PHPMD - PHP Mess Detector ã®éãã«ã¤ã³ã¹ãã¼ã«
Syntastic ã®ããã©ã«ãè¨å®ã¯ãããªæã syntastic/phpmd.vim at master · scrooloose/syntastic · GitHub
'post_args': 'codesize,design,unusedcode,naming'
phpmd ã«ã¯ãã1㤠controversial-rules ã¨å¼ã°ããã«ã¼ã«ãããããã ãããã®åã®éãè³å¦ä¸¡è«ãªãããªã®ã§æå¹ã«ããã¦ãªãã¨ããã¨ãããã
ãªããå¤æ°åã3æå以ä¸ã®å ´åã $db
ã¨ãã§ãè¦åãåºã¦ã¦ã¶ãã®ã§ã試ãã« naming
ã«ã¼ã«ãæ¶ãã¦ã¿ãã
let g:syntastic_php_phpmd_post_args='codesize,design,unusedcode'
ããã§Vimãèµ·åããã¨ãnaming
ã«ã¼ã«ã®è¦åãã§ãªããªãã
ãã ãããã㯠naming-rules ã«è¼ã£ã¦ããä»ã® naming ã«ã¼ã«ãåºãªããªããä¾ãã°ãgetX() ãªã©ã®ã¡ã½ãããªã®ã« boolean ãè¿ãã¡ã½ããã¯å½åç®æã« isX() ã¨ãã«ãããã¨ããè¦åãã§ãªããªããããå³å¯ã«ããã®ã§ããã° creating-a-ruleset ãåèã«ç¬èª ruleset ãæå®ããã¹ãã§ããã
"ã¹ãã§ãã"ã¨ãè¨ã£ã¡ãã£ãã®ã§ãã£ã¦ã¿ãã
let g:syntastic_php_phpmd_post_args='$HOME/.conf/phpmd/ruleset.xml'
ã¨ãã«ãã¦ãruleset.xmlã«ä»¥ä¸ã®ããã«æ¸ãã¦ã¿ãã
<?xml version="1.0"?> <ruleset name="OREORE PHPMD rule set" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation=" http://pmd.sf.net/ruleset_xml_schema.xsd"> <description> OREORE PHPMD rule set </description> <rule ref="rulesets/codesize.xml" /> <rule ref="rulesets/design.xml" /> <rule ref="rulesets/unusedcode.xml" /> <rule ref="rulesets/naming.xml"> <exclude name="ShortVariable" /> <exclude name="LongVariable" /> </rule> </ruleset>
<exclude name="ShortVariable" />
ã§ã«ã¼ã«ã»ããå
ã®ç¹å®ã«ã¼ã«ã®ã¿ç¡å¹ã«ãã¦ããã
ããç¡å¹ã«ããã®ã§ãªããé¾å¤ãå¤æ´ããã«ã¯ä»¥ä¸ã®ããã«ããã¨ããæãã
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"> <priority>1</priority> <properties> <property name="reportLevel" value="5" /> </properties> </rule>