﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-佳为好友-随笔分类-Tool</title><link>http://www.cppblog.com/walkklookk/category/17768.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 22 Jan 2013 04:26:01 GMT</lastBuildDate><pubDate>Tue, 22 Jan 2013 04:26:01 GMT</pubDate><ttl>60</ttl><item><title>原:Mindjet文件导出</title><link>http://www.cppblog.com/walkklookk/archive/2013/01/11/197201.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Fri, 11 Jan 2013 08:48:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2013/01/11/197201.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/197201.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2013/01/11/197201.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/197201.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/197201.html</trackback:ping><description><![CDATA[创建:2013年01月11日<br /><br />Mindjet的免费账号的文件无法导出.<br /><br />可以绕过,方法如下:<br /># 可以使用iphone同步之.<br /># 然后,用iFunBox打开iphone程序的Documents文档. 见名知意,将需要的文件夹导出.<br /># 导出的文件虽然没有文件名,但是其实是mmap文件.改名即可.<br /># 使用其他兼容软件打卡mmap文件.<br /><br />+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/197201.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2013-01-11 16:48 <a href="http://www.cppblog.com/walkklookk/archive/2013/01/11/197201.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转:6 Ways to Force Quit Mac Applications</title><link>http://www.cppblog.com/walkklookk/archive/2013/01/04/196938.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Fri, 04 Jan 2013 05:44:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2013/01/04/196938.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196938.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2013/01/04/196938.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196938.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196938.html</trackback:ping><description><![CDATA[创建:2013年01月04日<br /><br />转:http://osxdaily.com/2012/03/02/force-quit-mac-apps/<br /><br /><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;"><img src="http://cdn.osxdaily.com/wp-content/uploads/2012/03/force-quit-mac.jpg" alt="Force Quit on a Mac" title="force-quit-mac" width="620" height="312" size-full=""  wp-image-27917"="" style="display: block !important; margin: 3px 10px 3px 0px; float: left; border: 1px solid #ffffff;" /></p><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;"><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Is your Mac seeing the infamously dreaded spinning beachball of death? Is an app failing to respond? Maybe you have an errant process or two? Here are six ways for apps to be force quit on a Mac, remember a few keyboard shortcuts or sequences now and save yourself a hassle later.</p><h2>1) Force Quit Currently Active Mac App with the Keyboard</h2><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;">Hold down&nbsp;<strong>Command+Option+Shift+Escape</strong>&nbsp;for a second or two until the app forcibly closes. This is the quickest way to force quit the foreground application in Mac OS X and a very good keyboard shortcut to remember.</p><h2>2) Bring Up the &#8220;Force Quit Applications&#8221; Window</h2><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;">Hit&nbsp;<strong>Command+Option+Escape</strong>&nbsp;to bring up the simple &#8220;Force Quit Applications&#8221; window, then click to select the app name, followed by clicking the &#8220;Force Quit&#8221; button to end the app immediately. Think of this as a simplified version of Activity Monitor, and it&#8217;s also a great&nbsp;<a href="http://osxdaily.com/2012/03/02/force-quit-mac-apps/#" id="KonaLink0" style="color: #0072bc; cursor: pointer; margin: 0px; top: 0px; right: 0px; bottom: 0px; left: 0px; outline: none; padding: 0px; position: static; background-color: transparent !important; font-family: inherit !important; border: 0px none transparent !important; background-image: none !important; display: inline !important; font-size: inherit !important;"><span style="border-bottom-width: 1px; border-bottom-style: solid; background-image: none; background-color: transparent; position: static; border-top-width: 0px !important; border-top-style: none !important; border-left-width: 0px !important; border-left-style: none !important; border-right-width: 0px !important; border-right-style: none !important; padding: 0px 0px 1px !important; width: auto !important; font-family: inherit !important; font-size: inherit !important;">keystroke</span></a>&nbsp;to remember to use since it allows for quickly ceasing multiple apps.</p><h2>3) Force Quitting Apps from the Dock</h2><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;"><strong>Option + Right Click</strong>&nbsp;on an apps icon in the Dock to bring up the &#8220;Force Quit&#8221; option, selecting this will kill the app without any confirmation.</p><h2>4) Force Quit from the Apple Menu</h2><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;"><strong>Hold the Shift Key</strong>&nbsp;and click on the  Apple menu to find &#8220;Force Quit [Application Name]&#8220;. This is easy to remember but not necessarily the most powerful method, since sometimes an application is completely unresponsive and the menus are inaccessible.</p><h2>5) Use Activity Monitor to Force Quit Apps</h2><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;">Bring up Spotlight with Command+Space and then type Activity Monitor. Select the process name or ID you wish to kill (unresponsive apps will usually appear as red), and hit the red &#8220;Quit Process&#8221; button. Think of this as the Mac equivalent to a&nbsp;<a href="http://osxdaily.com/2010/08/15/mac-task-manager/" style="background-color: inherit; color: #2266bb; font-weight: bold;">task manager</a>&nbsp;from the Windows world and a more complex version of the second tips Force Quit window. If one of the previous methods fails, this will almost certainly work.<br /><img src="http://cdn.osxdaily.com/wp-content/uploads/2012/03/force-quit-activity-monitor.jpg" alt="Force Quit Mac Apps from the Activity Monitor" title="force-quit-activity-monitor" width="600" height="214" size-full=""  wp-image-27913"="" style="display: block !important; margin: 3px 10px 3px 0px; float: left; border: 1px solid #ffffff;" /></p><h2>6) Using the Terminal &amp; kill Command</h2><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;">If all else fails, using the command line is a surefire way to force an app or process to quit by issuing the low-level kill command. Launch the Terminal and type one of the following commands:</p><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;"><code style="background-color: #f3f3f3; padding: 3px; font-size: 1.2em; border: 1px solid #dddddd; display: block;">killall [processname]</code></p><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;">For example, &#8220;killall Safari&#8221; would kill all instances of the Safari process. If you know the process id, which you can find with the ps or &#8216;ps aux&#8217; command. Aim kill at that process specifically:</p><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;"><code style="background-color: #f3f3f3; padding: 3px; font-size: 1.2em; border: 1px solid #dddddd; display: block;">kill -9 [pid]</code></p><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;">The kill commands will take out just about anything, and sometimes have the side effect of not honoring Versions, Window Restore, and Auto-Save, so be cautious of potential data loss.</p><h2>Bonus: Force Quit on iOS</h2><p style="margin: 0px 0px 10px; padding: 0px; color: #303030; font-family: 'Helvetica Neue', Verdana, Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 22.266666412353516px; background-color: #ffffff;">OK it&#8217;s not quite the Mac, but it&#8217;s useful to know for mobile users: from the iOS side of things, you can&nbsp;<a href="http://osxdaily.com/2012/02/14/force-quit-app-iphone-ipad-ipod-touch/" style="background-color: inherit; color: #2266bb; font-weight: bold;">force quit apps on iPhone, iPad</a>, or iPod touch, by holding down the Power button until the slide to power option appears, and then hold the Home button until the app closes.</p>+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/196938.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2013-01-04 13:44 <a href="http://www.cppblog.com/walkklookk/archive/2013/01/04/196938.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转：修改XCode文件的公司名 --2</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/29/196814.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Sat, 29 Dec 2012 11:53:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/29/196814.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196814.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/29/196814.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196814.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196814.html</trackback:ping><description><![CDATA[<div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">下面的方法只对XCode 3.0有效，对于XCode 4要在系统的Accounts里面修改登陆的名字，<wbr>并在Address Book里面修改公司信息，这样才能修改。</div><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">&nbsp;</div><div dir="ltr" align="left" style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;"></div><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;"></div><span style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">转:</span><a href="http://iphonedevelopertips.com/xcode/change-company-name-from-within-xcode-on-a-per-project-basis.html" target="_blank" style="color: #1155cc; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">http://iphonedevelopertips.<wbr>com/xcode/change-company-name-<wbr>from-within-xcode-on-a-per-<wbr>project-basis.html</a><br style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;" /><br style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;" /><h1><a title="Permanent Link: Change Company Name from Within  Xcode on a Per Project Basis" href="http://iphonedevelopertips.com/xcode/change-company-name-from-within-xcode-on-a-per-project-basis.html" rel="bookmark" target="_blank" style="color: #1155cc;">Change Company Name from Within Xcode on a Per Project Basis</a></h1><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">Posted on March 25, 2010 by&nbsp;<a title="Posts by John  Muchow" href="http://iphonedevelopertips.com/author/admin/" target="_blank" style="color: #1155cc;">John Muchow</a>&nbsp;in&nbsp;<a title="View all  posts in Xcode" href="http://iphonedevelopertips.com/category/xcode" rel="category tag" target="_blank" style="color: #1155cc;">Xcode</a></div><br style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;" /><br style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;" /><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff; float: right;"></div><p style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">A common question for most anyone new to Xcode is how to change the Company Name that is added to each new source file. The default information looks similar to the following:</p><blockquote style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;"><p>Copyright (c) 2010 MyCompanyName. All rights reserved.</p></blockquote><p style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">Up until Xcode 3.2 to change this value you had to resort to running a command from a terminal, you can see how this was previously done in this tip:&nbsp;<a href="http://iphonedevelopertips.com/xcode/change-company-name-in-xcode.html" target="_blank" style="color: #1155cc;">Change Company Name in Xcode</a>.</p><p style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">A welcome change with 3.2+ is that this value can now be managed from within Xcode. Even better, the name can be configured on a project by project basis, which is really nice if you need to maintain multiple copyright statements across projects.</p><h5>Change Company Name within Xcode</h5><p style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">In the Groups and Files window, right click on the project name and select&nbsp;<strong>Get Info</strong>:</p><p style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;"><img  alt="" /></p><p style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">In the&nbsp;<strong>General Settings</strong>&nbsp;tab, near the bottom you&#8217;ll see a field for the Organization Name:</p><p style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;"><img  alt="" /></p><p style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">Update this field and the new value will be reflected in each source code file you create in the active project.</p><br style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;" /><span style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">+++++</span><img src ="http://www.cppblog.com/walkklookk/aggbug/196814.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-29 19:53 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/29/196814.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转：在非ARC工程中使用ARC的framework</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/29/196761.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Sat, 29 Dec 2012 02:46:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/29/196761.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196761.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/29/196761.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196761.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196761.html</trackback:ping><description><![CDATA[<span style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">创建：2012.09.19</span><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;"></div><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">转：<a href="https://github.com/Cocoanetics/DTCoreText/wiki/Using-DTCoreText-in-Non-ARC-Projects" target="_blank" style="color: #1155cc;">https://github.com/<wbr>Cocoanetics/DTCoreText/wiki/<wbr>Using-DTCoreText-in-Non-ARC-<wbr>Projects</a></div><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;"><h1>Using DTCoreText in Non ARC Projects</h1></div><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;"></div><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;"><p style="line-height: 12.571428298950195px; margin-right: 0px; color: #333333; font-size: 14.285714149475098px; margin-left: 0px; margin-bottom: 15px; font-family: Helvetica, arial, freesans, clean, sans-serif; border: 0px; padding: 0px; margin-top: 0px !important;">You have two options in adding ARC based code to your non-ARC project:</p><p style="line-height: 12.571428298950195px; color: #333333; font-size: 14.285714149475098px; font-family: Helvetica, arial, freesans, clean, sans-serif; margin: 15px 0px; border: 0px; padding: 0px;">1) DIRECTLY ADDING FILES TO YOUR PROJECT</p><ul style="line-height: 12.571428298950195px; color: #333333; font-size: 14.285714149475098px; font-family: Helvetica, arial, freesans, clean, sans-serif; margin: 15px 0px; border: 0px; padding: 0px 0px 0px 30px;"><li style="margin: 0px; padding: 0px; border: 0px;"><p style="margin: 0px 0px 15px; padding: 0px; border: 0px;">add the DTCoreText files to your project</p></li><li style="margin: 0px; padding: 0px; border: 0px;"><p style="margin: 0px 0px 15px; padding: 0px; border: 0px;">in the Xcode project view, click on your target(s), Build Phases, Compile Sources category.</p></li><li style="margin: 0px; padding: 0px; border: 0px;"><p style="margin: 0px 0px 15px; padding: 0px; border: 0px;">for each of the DT files, you MUST paste this to the Compile Flags:</p><p style="margin: 15px 0px; padding: 0px; border: 0px;">-fobjc-arc</p></li></ul><p style="line-height: 12.571428298950195px; color: #333333; font-size: 14.285714149475098px; font-family: Helvetica, arial, freesans, clean, sans-serif; margin: 15px 0px; border: 0px; padding: 0px;">2) CREATE AN ARC-LIBRARY (for DTCoreText and any other files needing ARC)</p><ul style="line-height: 12.571428298950195px; color: #333333; font-size: 14.285714149475098px; font-family: Helvetica, arial, freesans, clean, sans-serif; margin: 15px 0px; border: 0px; padding: 0px 0px 0px 30px;"><li style="margin: 0px; padding: 0px; border: 0px;"><p style="margin: 0px 0px 15px; padding: 0px; border: 0px;">Create a New project within your main Xcode 4 workspace with type "Cocoa Touch Static Library", lets call it libArc.a</p></li><li style="margin: 0px; padding: 0px; border: 0px;"><p style="margin: 0px 0px 15px; padding: 0px; border: 0px;">insure that this project uses the same settings as the primary (SDK, arm types, has the same Configurations (if you added some specials to your primary duplicate them in this library project)</p></li><li style="margin: 0px; padding: 0px; border: 0px;"><p style="margin: 0px 0px 15px; padding: 0px; border: 0px;">add all the DT files to this library project</p></li><li style="margin: 0px; padding: 0px; border: 0px;"><p style="margin: 0px 0px 15px; padding: 0px; border: 0px;">set to "YES" the Build Settings flag under the LLVM 3.0 category that says "ObjectiveC Automatic Reference Counting"</p></li></ul><p style="line-height: 12.571428298950195px; color: #333333; font-size: 14.285714149475098px; font-family: Helvetica, arial, freesans, clean, sans-serif; margin: 15px 0px; border: 0px; padding: 0px;">Now the tricky part. In your primary project:</p><ul style="line-height: 12.571428298950195px; color: #333333; font-size: 14.285714149475098px; font-family: Helvetica, arial, freesans, clean, sans-serif; margin: 15px 0px; border: 0px; padding: 0px 0px 0px 30px;"><li style="margin: 0px; padding: 0px; border: 0px;"><p style="margin: 0px 0px 15px; padding: 0px; border: 0px;">open the project settings, select your Target, select Build Phases: a) add a dependency to your libarc.a library (you drag it over from the left pane I think) b) in the Link section, make sure that there is a libarc.a there too.</p></li><li style="margin: 0px; padding: 0px; border: 0px;"><p style="margin: 0px 0px 15px; padding: 0px; border: 0px;">now select your Project, and paste the following into the Other Link Flags section</p><p style="margin: 15px 0px; padding: 0px; border: 0px;">-force_load $(BUILT_PRODUCTS_DIR)/libarc.a</p></li></ul><p style="line-height: 12.571428298950195px; margin-right: 0px; color: #333333; font-size: 14.285714149475098px; margin-left: 0px; font-family: Helvetica, arial, freesans, clean, sans-serif; margin-top: 15px; border: 0px; padding: 0px; margin-bottom: 0px !important;">IF YOU DO NOT GET A DEPENDENCY TO THE LIBRARY YOU WILL NEVER COMPILE UPDATES! If you do not add the forceload command, everything will appear to compile and run, but when you go to use DTCoreText your app will crash (categories do not get loaded without the force load line).</p></div><div style="color: #222222; font-family: arial, sans-serif; font-size: 14.399999618530273px; line-height: normal; background-color: #ffffff;">＋＋＋＋＋</div><img src ="http://www.cppblog.com/walkklookk/aggbug/196761.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-29 10:46 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/29/196761.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转:Vim for Objective-c</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/27/196732.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Thu, 27 Dec 2012 08:55:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/27/196732.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196732.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/27/196732.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196732.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196732.html</trackback:ping><description><![CDATA[创建:2012年12月27日<br /><br />转:http://lazybirderic.wordpress.com/2010/09/11/vim-for-objective-c/<br /><br /><span style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; background-color: rgba(255, 255, 255, 0.882353);">There are so many posts on this topic already, so I&#8217;ll simply make my own conclusion:</span><p style="margin: 14px 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 22.100000381469727px; background-color: rgba(255, 255, 255, 0.882353);"></p><p style="margin: 14px 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 22.100000381469727px; background-color: rgba(255, 255, 255, 0.882353);">1. Install cocoa.vim:&nbsp;&nbsp;&nbsp;<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; font-style: italic; font-weight: bold;">unzip cocoa.zip -d ~/.vim</span><br />This include Objective-C filetype and syntax.</p><p style="margin: 14px 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 22.100000381469727px; background-color: rgba(255, 255, 255, 0.882353);">2. Install snipMate:&nbsp;&nbsp;<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; font-style: italic; font-weight: bold;">unzip snipMate.zip -d ~/.vim</span><br />This include Objective-C snippets</p><p style="margin: 14px 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 22.100000381469727px; background-color: rgba(255, 255, 255, 0.882353);">3. Set filetype for .h and .m file<br /><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 13px; font-style: italic; font-weight: bold;">echo "au BufNewFile,BufRead *.h,*.m&nbsp;&nbsp;&nbsp; set filetype=objc" &gt; ~/.vim/ftdetect/objc.vim</span></p><span style="color: #3366ff;">[自:可以在命令行指定文件类型:</span><br /><span style="color: #3366ff;">:set ft=objc</span><br /><span style="color: #3366ff;">]</span><br />+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/196732.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-27 16:55 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/27/196732.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>原:common_svn_command -2012年12月27日</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/27/196725.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Thu, 27 Dec 2012 06:00:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/27/196725.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196725.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/27/196725.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196725.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196725.html</trackback:ping><description><![CDATA[创建:2012年12月27日<br /><br /><div>common svn command</div><div></div><div>*svn log</div><div></div><div>**svn log -10 ios/ | egrep -3 'some text'</div><div>only show logs which contain 'some text' .</div><div></div><div>** svn log -c1111 xxx/xxx/xxx</div><div>only check revision 12345's log</div><div></div><div>** svn log -c1111 -v xxx/xxx/xxx</div><div>check which files have been modified.</div><div></div><div>** svn log -r1111:head xxx/</div><div>check revision 1111~head 's log.</div><div></div>+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/196725.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-27 14:00 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/27/196725.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>原:XVim  -2012年12月27日</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/27/196717.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Thu, 27 Dec 2012 05:36:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/27/196717.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196717.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/27/196717.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196717.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196717.html</trackback:ping><description><![CDATA[创建:2012年12月27日<br /><br /><div>C_w n addEditorWindow</div><div>C_w o closeAllButActive &nbsp; 只打开一个新的Window。</div><div>C_w s addEditorWindowHorizontal</div><div>C_w q removeEditorWindow &nbsp;关闭全部的新的Window。</div><div>C_w v addEditorWindowVertical</div><div></div><div>gi 在当前缓冲区最近一次插入模式停止的位置继续插入文本。 该位置记在 |&#8217;^| 位置标记里。如果标记在行末之后,和 "&#8216;^i" 有所差异。 该位置在插入/删除行时会自动修正。但_不_在插入/删除字符 时被修正。</div><div>使用 |:keepjumps| 命令修饰符时,不改变 |&#8217;^| 位置标记。</div><div></div><div>I &nbsp;在第一个非空字符前插入文本 [count] 次。</div><div>gI 在第一列插入文本 [count] 次。</div><div></div><div></div><div>~</div><div>g~</div><div>gu 使 {motion} 跨越的文本成为小写。</div><div>gU 使 {motion} 跨越的文本成为大写。</div><div></div>+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/196717.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-27 13:36 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/27/196717.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转:vim  -2012年12月27日</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/27/196716.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Thu, 27 Dec 2012 05:35:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/27/196716.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196716.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/27/196716.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196716.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196716.html</trackback:ping><description><![CDATA[创建:2012年12月27日<br /><br />转:<br /><br /><div>vim</div><div>ma &nbsp; 'a &nbsp; `a (back to same colome)</div><div>0-9 used by vim self. 0 means : last file edited.</div><div>a-z only current file.</div><div>A-Z across files.</div><div>:marks &nbsp; check all marks.</div><div>:delmarks markid markid...</div><div>:delmarks a b c</div><div>:delmarks a-c</div><div>:delmarks a f-i 1-4</div><div>:delmarks! &nbsp; &nbsp; delete all marks.</div><div></div>+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/196716.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-27 13:35 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/27/196716.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转:vim tips</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/27/196715.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Thu, 27 Dec 2012 05:34:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/27/196715.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196715.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/27/196715.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196715.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196715.html</trackback:ping><description><![CDATA[创建:2012年12月27日<br /><br />转:<br /><br /><div>XCode plugin: apple+. &nbsp;show complete list.</div><div></div><div></div><div>:%s/fred/joe/igc &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : general substitute command</div><div>:%s/\r//g &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: delete DOS Carriage Returns (^M)</div><div>:'a,'bg/fred/s/dick/joe/gc : VERY USEFUL</div><div>:s/\(.*\):\(.*\)/\2 : \1/ &nbsp;: reverse fields separated by :</div><div># non-greedy matching \{-}</div><div>:%s/^.\{-}pdf/new.pdf/ &nbsp; &nbsp; : to first pdf)</div><div>:s/fred/&lt;c-r&gt;a/g &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : substitute "fred" with contents of register "a"</div><div>:%s/^\(.*\)\n\1/\1$/ &nbsp; &nbsp; &nbsp; : delete duplicate lines</div><div>:help /\{-}</div><div># multiple commands</div><div>:%s/\f\+\.gif\&gt;/\r&amp;\r/g | v/\.gif$/d | %s/gif/jpg/</div><div>:%s/suck\|buck/loopy/gc &nbsp; &nbsp; &nbsp; : ORing</div><div>:s/__date__/\=strftime("%c")/ : insert datestring</div><div></div>+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/196715.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-27 13:34 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/27/196715.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转:sh tip</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/27/196712.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Thu, 27 Dec 2012 05:31:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/27/196712.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196712.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/27/196712.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196712.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196712.html</trackback:ping><description><![CDATA[创建:2012年12月27日<br /><br />转:<br /><br /><div>I'm a fan of the !$, !^ and !* expandos, returning, from the most recent submitted command line: the last item, first non-command item, and all non-command items. To wit (Note that the shell prints out the command first):</div><div></div><div>$ echo foo bar baz</div><div>foo bar baz</div><div>$ echo bang-dollar: !$ bang-hat: !^ bang-star: !*</div><div>echo bang-dollar: baz bang-hat: foo bang-star: foo bar baz</div><div>bang-dollar: baz bang-hat: foo bang-star: foo bar baz</div><div>This comes in handy when you, say ls filea fileb, and want to edit one of them: vi !$ or both of them: vimdiff !*. It can also be generalized to "the nth argument" like so:</div><div></div><div>$ echo foo bar baz</div><div>$ echo !:2</div><div>echo bar</div><div>bar</div><div>Finally, with pathnames, you can get at parts of the path by appending :h and :t to any of the above expandos:</div><div></div><div>$ ls /usr/bin/id</div><div>/usr/bin/id</div><div>$ echo Head: !$:h &nbsp;Tail: !$:t</div><div>echo Head: /usr/bin Tail: id</div><div>Head: /usr/bin Tail: id</div><div></div>+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/196712.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-27 13:31 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/27/196712.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转：[转] Gmail 的Host解决方案</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/22/196520.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Sat, 22 Dec 2012 02:29:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/22/196520.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196520.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/22/196520.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196520.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196520.html</trackback:ping><description><![CDATA[创建：2012年12月22日<br /><br />转：http://www.cnblogs.com/jianyungsun/archive/2012/11/01/2750392.html<p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; color: #333333; font-family: verdana, Arial, Helvetica, sans-serif; line-height: 25px; background-color: #ffffff;"><span style="margin: 0px; padding: 0px;">Gmail&nbsp;在国内可用google.cn的&nbsp;Host来改进连接速度，避免被GFW干扰，经测试联通&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">网络打开Gmail速度飞快，特共享之！&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">由于公布的Host地址很快会被GFW强奸，所以google.cn服务器的IP地址会经常变化，&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">那么只要我们能找到变化的IP地址，经常更新host文件便可以解决这个问题。&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">在运行里敲击cmd，然后敲击如下代码：&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">nslookup&nbsp;&nbsp;www.google.cn&nbsp;&nbsp;8.8.8.8&nbsp;</span></p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; color: #333333; font-family: verdana, Arial, Helvetica, sans-serif; line-height: 25px; background-color: #ffffff;">（补充：如果不行，可将命令中的&#8220;www.google.cn" 换成&#8221;www.google.com.hk"或者&#8220;www.google.com" 试下）<br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">返回得到的IP地址取任意一个来替换203.208.46.X，然后保存host文件即可。&nbsp;</span><br style="margin: 0px; padding: 0px;" /><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;maps.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;mail.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;maps-api-ssl.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;images1-focus-opensocial.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;images2-focus-opensocial.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;www.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;encrypted.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;chrome.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients1.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients2.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients3.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients4.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients5.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients6.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients7.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients1.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients2.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients3.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients4.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients5.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients6.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;clients7.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;profiles.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;plus.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;talkgadget.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;picasaweb.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh1.ggpht.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh2.ggpht.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh3.ggpht.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh4.ggpht.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh5.ggpht.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh6.ggpht.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh6.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh5.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh4.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh3.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh2.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;lh1.googleusercontent.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;spreadsheets.google.com&nbsp;&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;docs.google.com&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;pop.gmail.com&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;scholar.l.google.com&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;news.google.com&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;video.google.com&nbsp;</span><br style="margin: 0px; padding: 0px;" /><span style="margin: 0px; padding: 0px;">203.208.46.X&nbsp;translate.google.com</span></p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; color: #333333; font-family: verdana, Arial, Helvetica, sans-serif; line-height: 25px; background-color: #ffffff;">&nbsp;</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; color: #333333; font-family: verdana, Arial, Helvetica, sans-serif; line-height: 25px; background-color: #ffffff;"><span style="margin: 0px; padding: 0px;">(原文地址；<a href="http://www.cnblogs.com/jianyungsun" style="margin: 0px; padding: 0px; text-decoration: initial; color: #000000; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333;">http://www.cnblogs.com/jianyungsun</a>）</span></p>+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/196520.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-22 10:29 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/22/196520.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转:file is universal (3 slices) but does not contain a(n) armv7s slice error for static libraries on iOS, anyway to bypass?</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/21/196515.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Fri, 21 Dec 2012 10:26:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/21/196515.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196515.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/21/196515.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196515.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196515.html</trackback:ping><description><![CDATA[创建:2012年12月21日<br /><br />转:http://stackoverflow.com/questions/12402092/file-is-universal-3-slices-but-does-not-contain-an-armv7s-slice-error-for-st<br /><br /><strong><em><u>Question:</u></em></strong><br /><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; vertical-align: baseline; background-color: #ffffff; clear: both; word-wrap: break-word; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18.05555534362793px;">I upgraded Xcode version and when using external static libraries I get this message:</p><blockquote style="margin-top: 0px; margin-right: 0px; margin-left: 0px; padding-top: 10px; padding-bottom: 1px; border: 0px; vertical-align: baseline; background-color: #eeeeee; quotes: none; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18.05555534362793px;"><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; vertical-align: baseline; background-color: transparent; clear: both; word-wrap: break-word;">ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /file/location for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)</p></blockquote><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; vertical-align: baseline; background-color: #ffffff; clear: both; word-wrap: break-word; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18.05555534362793px;">Is there any way to bypass this and add support to the library if the developer of the library hasn't updated their library yet?</p><strong><em><u>Answer:</u></em></strong><br /><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; vertical-align: baseline; background-color: #ffffff; clear: both; word-wrap: break-word; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18.05555534362793px;">If you want to remove the support for any architecture, e.g. armv7s in your case, try this:</p><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; vertical-align: baseline; background-color: #ffffff; clear: both; word-wrap: break-word; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18.05555534362793px;">Project -&gt; Build Settings -&gt; remove the architecture from "valid architectures"</p><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; vertical-align: baseline; background-color: #ffffff; clear: both; word-wrap: break-word; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18.05555534362793px;">You can use this as a temporary solution until the library has been updated. You have to remove the architecture from your main project,not from the library.</p><p style="margin: 0px 0px 1em; padding: 0px; border: 0px; vertical-align: baseline; background-color: #ffffff; clear: both; word-wrap: break-word; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18.05555534362793px;">Alternatively, you can set the flag for your debug configuration's "Build Active Architecture Only" to Yes. Leave the release configuration's "Build Active Architecture Only" to No, just so you'll get a reminder before releasing that you aught to upgrade any 3rd party libraries you're using.</p>+++++<img src ="http://www.cppblog.com/walkklookk/aggbug/196515.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-21 18:26 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/21/196515.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转:Search and replace in multiple buffers</title><link>http://www.cppblog.com/walkklookk/archive/2012/12/12/196188.html</link><dc:creator>佳为好友</dc:creator><author>佳为好友</author><pubDate>Wed, 12 Dec 2012 01:02:00 GMT</pubDate><guid>http://www.cppblog.com/walkklookk/archive/2012/12/12/196188.html</guid><wfw:comment>http://www.cppblog.com/walkklookk/comments/196188.html</wfw:comment><comments>http://www.cppblog.com/walkklookk/archive/2012/12/12/196188.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/walkklookk/comments/commentRss/196188.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/walkklookk/services/trackbacks/196188.html</trackback:ping><description><![CDATA[<span style="background-color: #ffffff;">创建:2012年12月12日</span><br /><br /><span style="background-color: #ffffff;">转:</span>http://vim.wikia.com/wiki/Search_and_replace_in_multiple_buffers<br /><span style="background-color: #ffffff;"><br /></span><br /><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">Often&nbsp;</span><a href="http://vim.wikia.com/wiki/Search_and_replace" title="Search and replace" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; text-decoration: initial; color: #2b54b5;"><span style="background-color: #ffffff;">search and replace</span></a><span style="background-color: #ffffff;">&nbsp;is needed in multiple files. This tip uses the procedures from&nbsp;</span><a href="http://vim.wikia.com/wiki/Run_a_command_in_multiple_buffers" title="Run a command in multiple buffers" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; text-decoration: initial; color: #2b54b5;"><span style="background-color: #ffffff;">run a command in multiple buffers</span></a><span style="background-color: #ffffff;">&nbsp;to show how a substitute may be executed multiple times using&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:argdo</span></code><span style="background-color: #ffffff;">&nbsp;(all files in argument list), or&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:bufdo</span></code><span style="background-color: #ffffff;">&nbsp;(all buffers), or&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:tabdo</span></code><span style="background-color: #ffffff;">&nbsp;(all tabs), or&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:windo</span></code><span style="background-color: #ffffff;">&nbsp;(all windows in the current tab).</span></p><table id="toc" style="background-color: #003816; border-style: solid; border-color: #d9d9d9; margin: 1em 0px; padding: 5px; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px;"><tbody><tr><td><div id="toctitle" style="border: 0px; font-style: inherit; margin: 0px; vertical-align: baseline; direction: ltr;"><h2><span style="background-color: #ffffff;">Contents</span></h2><span style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 12px; background-color: #ffffff;">&nbsp;[<a href="http://vim.wikia.com/wiki/Search_and_replace_in_multiple_buffers#" id="togglelink" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; text-decoration: initial; color: #2b54b5;"><span style="background-color: #ffffff;">show</span></a></span><span style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; font-size: 12px; background-color: #ffffff;">]&nbsp;</span></div></td></tr></tbody></table><h2><span id="All_buffers" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; background-color: #ffffff;">All buffers</span><span style="border: 0px; font-style: inherit; margin: 0px 0px 0px 10px; padding: 0px; vertical-align: baseline; font-size: 13px;"><a href="http://vim.wikia.com/wiki/Search_and_replace_in_multiple_buffers?action=edit&amp;section=1" title="Edit All buffers section" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; text-decoration: initial; color: #2b54b5;"><img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D"  edit-pencil"="" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: text-bottom; background-image: url(http://slot1.images.wikia.nocookie.net/__cb61895/common/skins/oasis/images/sprite.png); height: 16px; width: 16px; background-position: -1000px -48px; background-repeat: no-repeat no-repeat;"  alt="" /><span style="background-color: #ffffff;">Edit</span></a></span></h2><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">The following performs a search and replace in all buffers (all those listed with the&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:ls</span></code><span style="background-color: #ffffff;">&nbsp;command):</span></p><pre style="border: 1px solid #cccccc; margin-top: 0px; margin-bottom: 0px; padding: 12px; vertical-align: baseline; background-color: #f2f2f2; line-height: 14px; overflow: auto; color: #3a3a3a; font-size: 13.194443702697754px;"><span style="background-color: #ffffff;">:bufdo&nbsp;%s/pattern/replace/ge | update </span></pre><table style="color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; text-align: start; background-color: #003816;"><tbody><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">bufdo</span></code></td><td><span style="background-color: #ffffff;">Apply the following commands to all buffers.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">%s</span></code></td><td><span style="background-color: #ffffff;">Search and replace all lines in the buffer.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">pattern</span></code></td><td><span style="background-color: #ffffff;">Search&nbsp;</span><a href="http://vim.wikia.com/wiki/Search_patterns" title="Search patterns" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; text-decoration: initial; color: #2b54b5;"><span style="background-color: #ffffff;">pattern</span></a><span style="background-color: #ffffff;">.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">replace</span></code></td><td><span style="background-color: #ffffff;">Replacement text.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">g</span></code></td><td><span style="background-color: #ffffff;">Change all occurrences in each line (global).</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">e</span></code></td><td><span style="background-color: #ffffff;">No error if the pattern is not found.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">|</span></code></td><td><span style="background-color: #ffffff;">Separator between commands.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">update</span></code></td><td><span style="background-color: #ffffff;">Save (write file only if changes were made).</span></td></tr></tbody></table><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">The command above uses&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:update</span></code><span style="background-color: #ffffff;">&nbsp;to save each buffer, if it was changed. That is necessary because, by default, Vim will not switch away from a buffer if it has been changed.</span></p><p style="border: 0px; margin: 1em 0px; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">One alternative is to set the&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">'autowriteall'</span></code><span style="background-color: #ffffff;">&nbsp;option so changed buffers are automatically saved when required:</span></p><pre style="border: 1px solid #cccccc; margin-top: 0px; margin-bottom: 0px; padding: 12px; vertical-align: baseline; background-color: #f2f2f2; line-height: 14px; overflow: auto; color: #3a3a3a; font-size: 13.194443702697754px;"><span style="background-color: #ffffff;">:set autowriteall :bufdo&nbsp;%s/pattern/replace/ge </span></pre><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">Another alternative is to set the&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">'hidden'</span></code><span style="background-color: #ffffff;">&nbsp;option so buffers do not need to be saved, then use&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:wa</span></code><span style="background-color: #ffffff;">&nbsp;to save all changes (only changed buffers are written):</span></p><pre style="border: 1px solid #cccccc; margin-top: 0px; margin-bottom: 0px; padding: 12px; vertical-align: baseline; background-color: #f2f2f2; line-height: 14px; overflow: auto; color: #3a3a3a; font-size: 13.194443702697754px;"><span style="background-color: #ffffff;">:set hidden :bufdo&nbsp;%s/pattern/replace/ge :wa </span></pre><h2><span id="All_windows" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; background-color: #ffffff;">All windows</span><span style="border: 0px; font-style: inherit; margin: 0px 0px 0px 10px; padding: 0px; vertical-align: baseline; font-size: 13px;"><a href="http://vim.wikia.com/wiki/Search_and_replace_in_multiple_buffers?action=edit&amp;section=2" title="Edit All windows section" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; text-decoration: initial; color: #2b54b5;"><img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D"  edit-pencil"="" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: text-bottom; background-image: url(http://slot1.images.wikia.nocookie.net/__cb61895/common/skins/oasis/images/sprite.png); height: 16px; width: 16px; background-position: -1000px -48px; background-repeat: no-repeat no-repeat;"  alt="" /><span style="background-color: #ffffff;">Edit</span></a></span></h2><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">If you are not dealing with a lot of files, it can be useful to display each wanted file in its own window, then operate on each window. For example, after opening multiple files with a shell command like&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">gvim *.c</span></code><span style="background-color: #ffffff;">, you could choose which files you wanted to operate on like this:</span></p><table style="color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; text-align: start; background-color: #003816;"><tbody><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:sball</span></code></td><td><span style="background-color: #ffffff;">Split screen to show all buffers (one window per buffer).</span></td></tr><tr><td><span style="background-color: #ffffff;">...</span></td><td><span style="background-color: #ffffff;">Move to a window you do&nbsp;</span><em style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; background-color: #ffffff;">not</em>&nbsp;want to change.</td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">&lt;C-w&gt;c</span></code></td><td><span style="background-color: #ffffff;">Close the window (press Ctrl-W then&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">c</span></code><span style="background-color: #ffffff;">).</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">&lt;C-w&gt;T&lt;C-PageUp&gt;</span></code></td><td><span style="background-color: #ffffff;">Or, move the window to a new tab page, then switch back to the original tab.</span></td></tr><tr><td><span style="background-color: #ffffff;">...</span></td><td><span style="background-color: #ffffff;">Repeat until only buffers you want to change are displayed in the current tab page.</span></td></tr><tr><td style="white-space: nowrap;"><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:windo&nbsp;%s/pattern/replace/ge</span></code></td><td><span style="background-color: #ffffff;">Search and replace in all visible windows.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:wa</span></code></td><td><span style="background-color: #ffffff;">Save all changes.</span></td></tr></tbody></table><h2><span id="All_files_in_a_tree" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; background-color: #ffffff;">All files in a tree</span><span style="border: 0px; font-style: inherit; margin: 0px 0px 0px 10px; padding: 0px; vertical-align: baseline; font-size: 13px;"><a href="http://vim.wikia.com/wiki/Search_and_replace_in_multiple_buffers?action=edit&amp;section=3" title="Edit All files in a tree section" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; text-decoration: initial; color: #2b54b5;"><img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D"  edit-pencil"="" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: text-bottom; background-image: url(http://slot1.images.wikia.nocookie.net/__cb61895/common/skins/oasis/images/sprite.png); height: 16px; width: 16px; background-position: -1000px -48px; background-repeat: no-repeat no-repeat;"  alt="" /><span style="background-color: #ffffff;">Edit</span></a></span></h2><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">Suppose all *.cpp and *.h files in the current directory need to be changed (not subdirectories). One approach is to use the argument list (arglist):</span></p><table style="color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; text-align: start; background-color: #003816;"><tbody><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:arg *.cpp</span></code></td><td><span style="background-color: #ffffff;">All *.cpp files in current directory.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:argadd *.h</span></code></td><td><span style="background-color: #ffffff;">And all *.h files.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:arg</span></code></td><td><em style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; background-color: #ffffff;">Optional</em>: Display the current arglist.</td></tr><tr><td style="white-space: nowrap;"><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:argdo&nbsp;%s/pattern/replace/ge | update</span></code></td><td><span style="background-color: #ffffff;">Search and replace in all files in arglist.</span></td></tr></tbody></table><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">A similar procedure can perform the same operation on all wanted files in the current directory, and in all subdirectories (or in any specified tree of directories):</span></p><table style="color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; text-align: start; background-color: #003816;"><tbody><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:arg **/*.cpp</span></code></td><td><span style="background-color: #ffffff;">All *.cpp files in and below current directory.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:argadd **/*.h</span></code></td><td><span style="background-color: #ffffff;">And all *.h files.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">...</span></code></td><td><span style="background-color: #ffffff;">As above, use&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:arg</span></code><span style="background-color: #ffffff;">&nbsp;to list files, or&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:argdo</span></code><span style="background-color: #ffffff;">&nbsp;to change.</span></td></tr></tbody></table><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">In the above, a forward slash was used in&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">**/*.cpp</span></code><span style="background-color: #ffffff;">. That works on all systems (Unix and Windows). If wanted, a backslash can be used on Windows systems.</span></p><h2><span id="Replacing_current_word" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; background-color: #ffffff;">Replacing current word</span><span style="border: 0px; font-style: inherit; margin: 0px 0px 0px 10px; padding: 0px; vertical-align: baseline; font-size: 13px;"><a href="http://vim.wikia.com/wiki/Search_and_replace_in_multiple_buffers?action=edit&amp;section=4" title="Edit Replacing current word section" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; text-decoration: initial; color: #2b54b5;"><img src="data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D"  edit-pencil"="" style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: text-bottom; background-image: url(http://slot1.images.wikia.nocookie.net/__cb61895/common/skins/oasis/images/sprite.png); height: 16px; width: 16px; background-position: -1000px -48px; background-repeat: no-repeat no-repeat;"  alt="" /><span style="background-color: #ffffff;">Edit</span></a></span></h2><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">A common requirement is to replace the word under the cursor in a number of files. Rather than automating the process, it is best to use Vim's procedures. For example:</span></p><table style="color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; text-align: start; background-color: #003816;"><tbody><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:arg *.cpp</span></code></td><td><span style="background-color: #ffffff;">All *.cpp files in directory.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:argadd *.h</span></code></td><td><span style="background-color: #ffffff;">And all *.h files.</span></td></tr><tr><td><span style="background-color: #ffffff;">...</span></td><td><span style="background-color: #ffffff;">Move cursor to word that is to be replaced.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">*</span></code></td><td><span style="background-color: #ffffff;">Search for that exact word.</span></td></tr><tr><td style="white-space: nowrap;"><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:argdo&nbsp;%s//replace/ge | update</span></code></td><td><span style="background-color: #ffffff;">Search and replace in all files in arglist.</span></td></tr></tbody></table><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">In the above substitute command:</span></p><ul style="border: 0px; margin: 0.4em 0px 0.5em 2.5em; padding: 0px; vertical-align: baseline; list-style: square; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><li style="border: 0px; font-style: inherit; margin: 3px 0px; padding: 0px; vertical-align: baseline; line-height: 20px;"><span style="background-color: #ffffff;">The search pattern is empty, so the last search is used.</span></li><li style="border: 0px; font-style: inherit; margin: 3px 0px; padding: 0px; vertical-align: baseline; line-height: 20px;"><span style="background-color: #ffffff;">Type your replacement text instead of&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">replace</span></code><span style="background-color: #ffffff;">. If the text is similar to the current word press Ctrl-R then Ctrl-W to insert that word into the command line, then change it.</span></li></ul><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">Alternatively, you might try the following user command or mapping.</span></p><pre style="border: 1px solid #cccccc; margin-top: 0px; margin-bottom: 0px; padding: 12px; vertical-align: baseline; background-color: #f2f2f2; line-height: 14px; overflow: auto; color: #3a3a3a; font-size: 13.194443702697754px;"><span style="background-color: #ffffff;">" Search for current word and replace with given text for files in arglist. function! Replace(bang, replace)   let flag = 'ge'   if&nbsp;!a:bang     let flag .= 'c'   endif   let search = '\&lt;' . escape(expand('&lt;cword&gt;'), '/\.*$^~[') . '\&gt;'   let replace = escape(a:replace, '/\&amp;~')   execute 'argdo&nbsp;%s/' . search . '/' . replace . '/' . flag endfunction command! -nargs=1 -bang Replace&nbsp;:call Replace(&lt;bang&gt;0, &lt;q-args&gt;) nnoremap &lt;</span><a href="http://vim.wikia.com/wiki/Search_and_replace_in_multiple_buffers#" id="itxthook0" rel="nofollow"  itxthook"="" style="border: 0px none transparent; margin: 0px; padding: 0px; vertical-align: baseline; text-decoration: initial; color: #2b54b5; cursor: pointer; background-color: transparent; background-image: none; display: inline;"><span id="itxthook0p" itxtrstspan=""  itxtnowrap"="" style="border: 0px; font-style: inherit; vertical-align: baseline; height: auto; left: auto; right: auto; top: auto; bottom: auto; background-color: transparent; line-height: normal; position: static; font-family: inherit; font-size: inherit; margin: 0px !important; padding: 0px !important; float: none !important; display: inline !important; white-space: nowrap !important;"><span id="itxthook0w" itxtrstspan="" itxtnowrap=""  itxtnewhookspan"="" style="border-width: 0px 0px 1px; border-style: none none solid; border-color: transparent transparent #00cc00; font-style: inherit; vertical-align: baseline; float: none; height: auto; left: auto; right: auto; top: auto; bottom: auto; background-color: #ffffff; position: static; display: inline; white-space: normal; font-family: inherit; color: #009900; margin: 0px !important; padding: 0px 0px 1px !important; text-decoration: underline !important;">Leader</span><img itxtrstimg=""  itxthookicon"="" id="itxthook0icon" src="http://images.intellitxt.com/ast/adTypes/icon1.png" style="font-style: inherit; left: auto; right: auto; top: auto; bottom: auto; background-color: transparent; position: static; white-space: normal; max-height: none; border: 0px !important; margin: 0px !important; padding: 0px 0px 0px 4px !important; vertical-align: baseline !important; float: none !important; display: inline !important; max-width: none !important; width: auto !important; height: auto !important;"  alt="" /></span></a><span style="background-color: #ffffff;">&gt;r&nbsp;:call Replace(0, input('Replace '.expand('&lt;cword&gt;').' with: '))&lt;CR&gt; </span></pre><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">For example:</span></p><table style="color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; text-align: start; background-color: #003816;"><tbody><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:arg *.c</span></code></td><td><span style="background-color: #ffffff;">All *.c files in current directory.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:set hidden</span></code></td><td><span style="background-color: #ffffff;">Allow switching away from a changed buffer without saving.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:set autowriteall</span></code></td><td><span style="background-color: #ffffff;">Or, use this for automatic saving (instead of&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:set hidden</span></code><span style="background-color: #ffffff;">).</span></td></tr><tr><td><span style="background-color: #ffffff;">...</span></td><td><span style="background-color: #ffffff;">Move cursor to word that is to be replaced.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:Replace whatever</span></code></td><td><span style="background-color: #ffffff;">Search and replace in all files in arglist; confirm each change.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:Replace! whatever</span></code></td><td><span style="background-color: #ffffff;">Same, but do not confirm each change.</span></td></tr><tr><td><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:wa</span></code></td><td><span style="background-color: #ffffff;">Write all changed files (not needed if used&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:set autowriteall</span></code><span style="background-color: #ffffff;">).</span></td></tr></tbody></table><p style="border: 0px; margin: 0.4em 0px 0.5em; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">Instead of the&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">:Replace</span></code><span style="background-color: #ffffff;">&nbsp;command, you could use the mapping. Move the cursor to the word that is to be replaced and press&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">\r</span></code><span style="background-color: #ffffff;">&nbsp;(backslash, assuming the default Leader key, then&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">r</span></code><span style="background-color: #ffffff;">).</span></p><p style="border: 0px; margin: 1em 0px; padding: 0px; vertical-align: baseline; color: #3a3a3a; font-family: Helvetica, Arial, sans-serif; font-size: 13.194443702697754px; line-height: 20.99536895751953px; background-color: #003816;"><span style="background-color: #ffffff;">In the function, any special characters in the search word are escaped for generality, although that is unlikely to be needed since a word will not contain special characters. If the cursor is on the word&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">old_text</span></code><span style="background-color: #ffffff;">, the search pattern will be&nbsp;</span><code style="border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre; background-color: #c1e7cb;"><span style="background-color: #ffffff;">\&lt;old_text\&gt;</span></code><span style="background-color: #ffffff;">&nbsp;so that only instances of the whole word are found.</span></p><br /><span style="background-color: #ffffff;">+++++</span><div class="vimiumReset vimiumHUD" style="right: 150px; opacity: 0; display: none;"></div><img src ="http://www.cppblog.com/walkklookk/aggbug/196188.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/walkklookk/" target="_blank">佳为好友</a> 2012-12-12 09:02 <a href="http://www.cppblog.com/walkklookk/archive/2012/12/12/196188.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>