Wednesday, August 10, 2016

Re: VimScript tips needed

Thanks so much to everyone that provided tips on what I was trying to do! I have it working now and want to share it. This is a plugin for operating on JavaScript arrow functions. See https://github.com/mvolkmann/vim-js-arrow-function.

On Sun, Aug 7, 2016 at 6:34 PM, Mark Volkmann <r.mark.volkmann@gmail.com> wrote:
I want to write a fairly simple VimScript function, but I'm having trouble getting started.
I'm hoping a kind soul can give me some tips or point me to a similar script to use as an example.
Here's what I want to do:
- move to the beginning of the current line (:normal '^' seems to work)
- find the first occurrence of => on the line
- determine whether that is followed by optional whitespace and {
There's more, but maybe if I can get this far, I can figure out the rest.

--
R. Mark Volkmann
Object Computing, Inc.



--
R. Mark Volkmann
Object Computing, Inc.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: