Hello! I searched, :h-ed and asked in #vim on freenode, but nobody seemed to know a good way to use marks in :map without having a destructive effect on what was marked before in those registers. It is annoying to read scripts or :maps on the internet that say "will ruin your s register". The solution given in :h restore-position will do just that.
Right now my solution is to map all these things to one register and never use it outside of these :maps, but that doesn't always work for plugins I've downloaded. The :h restore-position page says "For something more advanced see |winsaveview()| and |winrestview()|." This is apparently too advanced, as I've never seen it used. If nobody knows a solution for this, I think I'll send off a feature request for a special register dedicated for use inside :maps, a special mark set whenever a map is used, or an expanded :h restore-position page explaining how to use it in the context of simple :maps. I would prefer the first solution. If you are wonder why I can't use the `` mark, it is because my map does 99[(%v%= so I don't know how many jumps are executed. [( is a Slimv command which goes to the beginning of the () block the cursor is currently in, doing 99[( takes you to the outermost () block. Regards, Oliver Uvman -- 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
