I'm having a bit of a problem with map(). I've had problems with
map() before, and consequently I really really hate to use it. Here goes: 1: construct a comment: " Testing: one two | three four | five | six |2. grab characters: fo<ctrl-v>j$"ay 3. convert to list: let list= split(@a,'\s*|\s*;\=',' ')4. Now, try to use map(): call map(list,"substitute(v:val,'<&>','','ge')")5. Bonus request: my construction above carefully gets a newline into the list. Using :echo string(list): ['one two', 'three four', 'five', 'six', 'I cannot seem to get rid of the newline, but its probably due to my lack of success with substitute(). I've spent about three hours on this so far, with multiple attempts, all unsuccessful. Perhaps an extra example in help map() illustrating how to do this would be of use? Thank you, Chip Campbell -- -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/91e26ba3-9e1b-19ad-3c43-ff7b42a0de3c%40drchip.org. |
- help with map(), please! Charles Campbell
- Re: help with map(), please! Salman Halim
- Re: help with map(), please! Charles Campbell
- Re: help with map(), please! 'Andy Wokula' via vim_use