Eclipseã®ãã¼ãã¤ã³ããvim風ã«ã§ããVrapperãç´ æ´ããããã件ã«ã¤ãã¦
俺ã¯ã¨ãã£ã¿ã¼ã¯vimæ´¾ã§ããæãè¦ãã¦ãã¾ã£ã¦ããã®ã§ã
æ®æ®µã¯ã¿ã¼ããã«ã§vimã使ã£ã¦ãã¦ãJavaã®ã³ã¼ããæ¸ãã¨ãã ãEclipseãªçæ´»ãªãã§ãããEclipseã®ã¨ãã£ã¿ã¼ã¯ã
ãªã®ã§ã常ã ä¸æºã«æã£ã¦ããã¾ããã
ãã¾ã¾ã§ãEclipseã®ãã¼ãã¤ã³ããvim風ã«ãããvipluginãEclimãªã©ã試ãã¦ã¿ãã®ã§ãããvipluginã¯eclipseã®è£å®ããã¾ãåããªããEclimã¯eclimdãèµ·åããã¦ããå¿ è¦ãããã¡ãã£ã¨å¤§ããããªã©ãããã ã£!ãã¨ãããã®ãããã¾ããã§ããã
ããã§ããVrapperãããã®ç»å ´ã§ãã!
Eclipseã®ã¨ãã£ã¿ã¼ãvim風ã®ãã¼ãã¤ã³ãã§ä½¿ãã¾ããããããEclipseã®è£å®æ©è½ãªã©ãåæã«ä½¿ãã¾ã!
Vrapperã®ã¤ã³ã¹ãã¼ã«
Eclipseã®æ´æ°ãµã¤ãã«"http://vrapper.sourceforge.net/update-site/stable"ãè¨å®ãã¦ã¤ã³ã¹ã³ãã¾ãããã
Vrapperã®ä½¿ãæ¹
ã¤ã³ã¹ã³ãã¨ããã¼ã«ãã¼ã«ãããªã¢ã¤ã³ã³ãã§ã¦ãã¾ãã
ãã®ãã¿ã³ãæ¼ããã¨ã§ãVimã¢ã¼ãã«ãªãã¾ãããã£ããæ¼ãã¨é常ã«ãã©ãã¾ãã
(æ¼ããå¾ãã¨ãã£ã¿ã¼ãéãç´ããªãã¨æå¹ã«ãªãã¾ãããããã¯ã¡ãã£ã¨æ®å¿µ)
Vrapperã§ã§ãããã¨
é常ã®vimã³ãã³ãã¯å¤§ä½ä½¿ãã¾ãã移åç³»ã¯ã»ã¼OKããã¸ã¥ã¢ã«ã¢ã¼ããã
ããã¹ããªãã¸ã§ã¯ãã大ä½ä½¿ãã¾ãããã vitãvi"ãªã©ãã¸ã¥ã¢ã«ã¢ã¼ãã®é¸æ次ã«ããã¹ããªãã¸ã§ã¯ãã使ããã¨ã¯ã§ããªãããã§ãã(di"ãªã©ã§""å ãã«ãããããã¯ã§ãã)
:%s/foo/bar/ã®ãããªç½®æã¯ã§ãã¾ããã
ãã¨ãå½ç¶ãªããvipluginã¯ç¡çã§ããvipluginã使ãããå ´åã¯ããã¯ãEclimãªã©ã®ã»ããããã§ãããã
ã¾ãå ¬å¼ããã¥ã¡ã³ãèªãã§ãã ããã
Vrapperã§ã¯ãã¼ãããã«Eclipseã³ãã³ããç»é²ã§ãã
ãããç´ æ´ãããã¨ãã§ãããVrapperã§ã¯ãã¼ãããã«Eclipseã³ãã³ããç»é²ã§ãã¾ãã
Vrapperã®ãã¼ããããªã©ã®è¨å®ã¯ãã¦ã¼ã¶ã®$HOMEã«.vrapperrcã¨ããè¨å®ãã¡ã¤ã«ãç½®ãã¦ãããã¨ã§å¤æ´ã§ãã¾ãã
ãã¨ãã°ã対å¿ããæ¬å¼§ã¸ã®ç§»åã[ã§ã§ããããã«ããã«ã¯ãé常ã®.vimrcã¨åãããã«ãnnoremap [ % ã¨æ¸ãã¦ããã ãã§ãã
ã§ããã®.vrapperrcã«ãeclipseaction <ã³ãã³ãå>
ãã¨ãã°ãã«ã¼ã½ã«ä½ç½®ã«ããã¯ã©ã¹ãã¡ã½ãããåç §ãã¦ããç®æãããã¸ã§ã¯ãå ããæ¤ç´¢ããã«ã¯ã以ä¸ã®ããã«æ¸ãã¾ãã
"srã§åç §ãããã¸ã§ã¯ãããæ¤ç´¢ eclipseaction SearchRef org.eclipse.jdt.ui.edit.text.java.search.references.in.project noremap sr :SearchRef<C-m>
ããã§ã:SearchRefã§ãEclipseã§"åç §ãããã¸ã§ã¯ãããæ¤ç´¢"ãå®è¡ããã®ã¨åãçµæã«ãªãã¾ãã
ããã«srã§å¼ã³åºããããã«ãã¼ããããç»é²ãã¦ãã¾ãã
Elicpseã³ãã³ãIDã¯ããã®ã¸ãã§æ¢ãã¦ãã ããã
workbench, text editors, java editors
æå¾ã«ã俺ã®.vrapperrcãè²¼ã£ã¦ããã¾ãã
:set ignorecase :set smartcase "ã¹ã¯ãã¼ã« noremap <Space>j <C-f> noremap <Space>k <C-b> "ã«ã¼ã½ã«ä½ç½®ã®åèªãyankãã nnoremap vv vawy "æå¾ã«å¤æ´ãããããã¹ããé¸æãã nnoremap gc `[v`] vnoremap gc ;<C-u>normal gc<Enter> onoremap gc ;<C-u>normal gc<Enter> " Insert modeä¸ã§åèªåä½/è¡åä½ã®åé¤ãã¢ã³ãã¥å¯è½ã«ãã inoremap <C-u> <C-g>u<C-u> inoremap <C-w> <C-g>u<C-w> " ;ã§Exã³ãã³ãå ¥å( ;ã¨:ãå ¥ãæ¿) noremap ; : noremap : ; "srã§åç §ãããã¸ã§ã¯ãããæ¤ç´¢ eclipseaction SearchRef org.eclipse.jdt.ui.edit.text.java.search.references.in.project noremap sr :SearchRef<C-m> "<space>j, <space>kã§ç»é¢éã noremap <Space>j <C-f> noremap <Space>k <C-b> "æå¾ã«ç·¨éãããä½ç½®ã«ç§»å eclipseaction GoLastEditPosition org.eclipse.ui.edit.text.gotoLastEditPosition nnoremap gb :GoLastEditPosition<C-m> "対å¿ããæ¬å¼§ã«ç§»å nnoremap [ % nnoremap ] % "次ã®ã¡ã³ã(ãã£ã¼ã«ã,ã¡ã½ãã) eclipseaction GoNextMember org.eclipse.jdt.ui.edit.text.java.goto.next.member nnoremap mm :GoNextMember<C-m> eclipseaction GoPrevMember org.eclipse.jdt.ui.edit.text.java.goto.previous.member nnoremap mp :GoPrevMember<C-m>