sponsor Vim development Vim logo Vim Book Ad

mu-marks : Script inspired by AlphaTk & Stephen Riemhm's bracketing function

 script karma  Rating 4/1, Downloaded by 1575    Comments, bugs, improvements  Vim wiki

created by
Gergely Kontra
script type
Template expander.
Unique feature: one command for insert and visual-mode expansion.

The MarkMap and MarkMapB commands allows you to make global and filetype-specific mappings. MarkMapB commands can be in your ftplugin dir in the appropiate file. The only weirdness is the typing of the command. Well, these weird characters should be configurable. (But I think they're at least readable, and look good)
One example mapping (in my vim.vim)
MarkMapB wh wh «»<CR>¶endw«¡»
After typing wh, and pressing <C-Space> (you can change it) in insert mode, you will get
wh |
| symbols the cursor.
So the «» characters are the cursor positions, and the furthers are the jump-points. There can be an explanation text between these 2 chars, so «explanation» is allowed.
If you have a line
echo 'Hello world'
and you select it visually, press <C-Space> and type wh<CR>, you will get
wh |
  echo 'Hello world'
So the ¶ sign is replaced by the visually selected text (adding an extra newline if needed).
If you want to remove the trailing newline (if any) you can use the · symbol.
Notice, that there is no mark after the endw.
Marks, that begin with «¡ are not used in visual mappings.
install details
Drop into your plugin dir.
A little usage comment inside.
Ask me, if something isn't clear!

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
mu-marks.vim 0.12 2002-03-12 6.0 Gergely Kontra Bugfixes
mu-marks.vim 0.11 2002-03-12 6.0 Gergely Kontra Bugfixes
MicroMarks.vim 0.1 2002-03-11 6.0 Gergely Kontra Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo