前言:最近用mac开发环境了,自然一天到晚用coda,可总是有不顺的地方,搜到这篇文章感觉像看到了知音人,实在是解决了我不少疑难问题啊。外文针对的coda版本较低,我总结的针对版本是version1.7.3
coda快捷键操作总结如下:
1、切换工具
Cmd+1到6 ,如Cmd+1切换到Sites,Cmd+2切换到Edit
2、切换当前文档
Cmd+shift+{ 与 Cmd+shift+} ,可以往前或往后切换当前文档
3、一行代码和整段缩进
Cmd+[ 与 Cmd+],往前和往后缩进。
一行代码可用tab键完成,整段代码缩进前提是需要选中需要缩进的多行代码,这个功能让我找了好久,网上都说coda没这功能,甚至还出了第三方插件,也许低版本有这问题,至少现在可以用这个快捷键快速缩进。
4、代码导航
对于js和css来说代码导航非常实用,可迅速定位到函数,缺点是没有显示对象的功能,只能显示函数名
原文地址:
http://colincavaliere.com/blog/10-coda-tips-and-plugins
When beginning with web design or development you will need some sort of code editor to write the website. From there, you will also need software to refine images, a web browser to test your design, tools to store code clips, and lastly an FTP client. I have in the past relied heavily on Adobe Dreamweaver, as I am a big fan of the entire web design Adobe Suite. But, when it comes to writing a blog I find it cumbersome to write PHP for some reason in Dreamweaver.
I turn to Coda as an application that is capable of performing each of the tasks I need to perform throughout a web project. Coda is strictly Mac software. This software has come a long way since it came out, and there are many articles out there with long lists of “useful plugins”. I want to just give a user a quick insight into what can make Coda faster, easier to use which will result in less headaches in the end.
1.Switching Through Tools
One thing that Coda makes easy is keyboard shortcuts. They allow a user to switch through different modes by pressing “Command and 1-6″. This would be used if you want to switch between your editor, preview or sites, etc. easily without using the mouse.
2.Toggle through documents
To indent a line of code press “Command, Shift, and the Left or Right Brackets.
Example: Command Shift { or }
3.Line Indent
When you begin coding in CSS or HTML you will find that Coda will indent lines for you on the fly. If you need to indent a line manually press “Command” and the left or right { } to indent any line the cursor is on.
4. HTML Validation
Coda will validate you HTML on the fly as you are working or you can validate it once you are finished. Coda will give you a hint as to what needs to be fixed, and take you to the beginning where the error is when clicked. You can find this at the bottom of the Coda window.
5. Setting up Sites
You can set up your website project within Coda and store them as different “Sites”. They can be automatically imported using Trasmit, but you have to be a user, or you can manually input the data to sync the sites. The homepage of the site will become the icon hanging on the Sites wall.
The sites that are set up have a remote and local folder linked to it, along with terminal settings if you also set that up. This is very useful, so when you save the file it will then update and publish to both file destinations. This will save you time over using Firefox FTP to load the files to the server each time you need to update the code.
6. Using Preview
I am a strong believer in using Mac tools, since they have always made my life easier as compared to other “easier” OS’s out there. I still rely on using Firefox web dev tools, and firebug most of the time but this will come in handy. This Preview will allow you to edit source code and see the changes without doing any editing to the document window.
7. Code Navigator
When you get into a coding project the tags, or elements can begin to pile up. This code navigator window can help you jump to specific tags within your document without having to scroll through and manually find them.
8. Coding Clips
Coda has a feature that allows you to store snippets of code, and insert them into a project on the fly. You can save snippets to use in any document.
9. Coda Books
From time to time I find it useful to have reference information available within Coda. It will come with 2 books for you to use right away, but you will want to find more books here.
10. Split Window
Coda gives you the opportunity to split multiple windows to view code on either horizontally or vertically.
You can right click on the file you wish to open and select “Split View” or use the keyboard shortcut: Command, Control, L.
There are many plugins available for Coda developed by third party vendors that you can install to increase functionality. I am currently using a few of them, and will report on them at a later time.
I hope these tips will get you started, there are plenty more so feel free to comment on what works for you as you explore.
-Colin