Here are two good testimony from other migrants:
Here are several useful learning resources:
- Vim Commands Cheat Sheet (for good reference, there are multiple other similar cheat sheets)
- vimtutor (simply open your terminal and type vimtutor)
- A Byte of Vim
- Vim Recipes
- Essential Vim Plugins (plugins are very helpful to create your effective workflow)
Plugins shipped with Janus:
Spend 5 minutes to go through the brief introduction for all the plugins that ships with Janus. Janus also includes a handy way to allow you to create/edit ~/.janus.rake file to add more plugins and you can run rake inside ~/.vim to update these plugins.
Sample ~/.janus.rake
NERDTree: provides a file browser, use \n to show/hide.
Command-T: provides an efficient way to search for files in current working directory. Use ⌘+T to show/hide.
snipMate: provides the same Textmate Snippet feature. As you do in TextMate, you can simply type snippet keywords and press tab to expand to code snippets and use tab to jump through various locations in the snippets. You can find all snippet definitions for various languages in ~/.vim/snippets.
ctags: TagList plugin is shipped with Janus. Use :Tlist to show/hide it. But I like Tagbar better than TagList (see below for installation instructions).
Other handy plugins I installed:
Syntastic: syntax checker, you can also go to the jslint route. This Stackoverflow post covers the setup in details.
Tagbar: displays tags of the current file in a sidebar, sorta like TagList, but more comprehensive and orders tags under correct scope/context.
doctorjs: previously known as jstags, provides a set of static analysis tools for JavaScript. Combined with Tagbar, it provides a more detailed code structure navigation than TagList. See this Stackoverflow post for instructions how to set it up. Note that you need to install NodeJS as a prerequisite.
There are two issues to get doctorjs set up properly that is not covered in that Stackoverflow post:
Spend 5 minutes to go through the brief introduction for all the plugins that ships with Janus. Janus also includes a handy way to allow you to create/edit ~/.janus.rake file to add more plugins and you can run rake inside ~/.vim to update these plugins.
Sample ~/.janus.rake
vim_plugin_task "zencoding", "git://github.com/mattn/zencoding-vim.git" vim_plugin_task "minibufexpl", "git://github.com/fholgado/minibufexpl.vim.git"
NERDTree: provides a file browser, use \n to show/hide.
Command-T: provides an efficient way to search for files in current working directory. Use ⌘+T to show/hide.
snipMate: provides the same Textmate Snippet feature. As you do in TextMate, you can simply type snippet keywords and press tab to expand to code snippets and use tab to jump through various locations in the snippets. You can find all snippet definitions for various languages in ~/.vim/snippets.
ctags: TagList plugin is shipped with Janus. Use :Tlist to show/hide it. But I like Tagbar better than TagList (see below for installation instructions).
Other handy plugins I installed:
Syntastic: syntax checker, you can also go to the jslint route. This Stackoverflow post covers the setup in details.
Tagbar: displays tags of the current file in a sidebar, sorta like TagList, but more comprehensive and orders tags under correct scope/context.
doctorjs: previously known as jstags, provides a set of static analysis tools for JavaScript. Combined with Tagbar, it provides a more detailed code structure navigation than TagList. See this Stackoverflow post for instructions how to set it up. Note that you need to install NodeJS as a prerequisite.
There are two issues to get doctorjs set up properly that is not covered in that Stackoverflow post:
- It seems that installing doctorjs needs sudo (sudo make install inside doctorjs git clone directory) to get around permission issue.
- I also got errors about underscore module and ctags NodeJS module cannot be found. They are located at /usr/local/lib/jsctags/ after doctorjs is installed. But node cannot locate them somehow. To fix it, I installed underscore using npm (npm install underscore -g), then I updated my NODE_PATH environment variable to include /usr/local/lib/jsctags/.
No comments:
Post a Comment