These are simple tools for Vim/GVim and Windows command. The Original version for UNIX/OS X is written to Software Design magazine October, 2013 by Daichi GOTO ([twitter:@daichigoto], [twitter:@BSDc_teweet]). Use with cat.exe. vbcat.vbs works like UNIX cat command only with pipe.
Vim/GVim ã Windows ã§ä½¿ãã®ã«å½¹ç«ã¤ã·ã³ãã«ãªã³ãã³ãã§ãã Software Design èª 2013å¹´10æå·ã®ç¹éãVimè³ä¸ä¸»ç¾©ã第2ç« ï¼å¾è¤å¤§å°æ°èï¼ã§ ç´¹ä»ããã¦ãããUNIX/OS X ç¨ã®ã·ã§ã«ã¹ã¯ãªãããã¨ã¤ãªã¢ã¹ã Windows ããã ãã¡ã¤ã«ã«ç§»æ¤ãããã®ã§ãã cat.exe ãå¿
è¦ã§ããEXE ãã¡ã¤ã«ãæã¡è¾¼ããã¨ãã§ããªãç°å¢ç¨ã« vbcat.vbs ã ä½ãã¾ããããã¤ãã®æ©è½ã®ã¿ UNIX ã® cat ã³ãã³ãã®ããã«åä½ãã¾ãã
GitHub ã«ææ°çãããã¾ãã
bf.bat
@echo off if NOT "%HOME%"=="" ( REM Windows XP cat >"%HOME%\vimfiles\bf" ) else if NOT "%HOMEPATH%"=="" ( REM Windows 7/8 cat >"%HOMEPATH%\vimfiles\bf" ) else ( echo bf.bat error )
bfcat.bat
@echo off if NOT "%HOME%"=="" ( REM Windows XP type "%HOME%\vimfiles\bf" ) else if NOT "%HOMEPATH%"=="" ( REM Windows 7/8 type "%HOMEPATH%\vimfiles\bf" ) else ( echo bfcat.bat error )
_vimrc
imap <C-b> <ESC>:read ~/vimfiles/bf<CR>i nmap <C-b> :read ~/vimfiles/bf<CR> vmap <C-b> :w!~/vimfiles/bf<CR>
vbcat.vbs
Option Explicit Dim strScriptHost strScriptHost = LCase(Wscript.FullName) If Right(strScriptHost, 11) <> "cscript.exe" Then WScript.Echo "Use with CScript.exe." & vbNewLine _ & vbNewLine _ & "Usageï¼" & vbNewLine _ & "> cscript //NoLogo " & WScript.ScriptName WScript.Quit End If Dim StdIn, StdOut Dim str Set StdIn = WScript.StdIn Set StdOut = WScript.StdOut Do While Not StdIn.AtEndOfStream str = StdIn.ReadLine StdOut.WriteLine str Loop
ãã®ããã°ã®é¢é£è¨äº
Software Design (ã½ããã¦ã§ã¢ ãã¶ã¤ã³) 2013å¹´ 10æå· [éèª]
- ä½è :
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2013/09/18
- ã¡ãã£ã¢: éèª