- somewhat more conventional: while I don't use code snippet
  generators for loops and the like, I do find it helpful to add
  JavaDoc-style comments to function definitions (this first
  draft can convert single-line function definitions with
  parameters into doc templates: with cursor on the line of
  the function definition, type '\/').

Code is short and attached, to avoid transmission errors - it should go into 'vimfiles/after/ftplugin/javascript.vim', so that it adds to the standard javascript filetype plugins. Adapt/adopt as you like, and please share your own Vim Javascript tips!

I did as you said but unfortunately it ends up just putting me into visual mode. The shortcut is just the capital letter V while in normal mode on the line of a function definition?

'V' (one character) is for vertical visual mode, you need two
characters: '\' (unless you've set <LocalLeader> to something
else), followed by '/' (mnemonic for commenting). Sorry about
the confusion. The other commands, for include- and definition-
search, are standard and documented (:help include-search/
:help definition-search). My favourite is ctrl-w ctrl-d.

Claus


--
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to