Bram Kuijper schrieb:
Hi,

I tried to use the following tip on enclosing a visual block with quotes in vim: http://schlitt.info/applications/blog/index.php?/archives/331-Comfortable-PHP-editing-with-VIM-3.html

"Sometimes you want to include text you already typed text into braces or (more likely) into quotes. Using this feature you can simply mark the text (go into visual mode using v/<CTRL>-v/<SHIFT>-v/... in command mode) and type the char you want to wrap around the text (like ( for (), ' for '',...) and it will be enclosed."

For me that doesn't seem to work. I do start visual mode, e.g. <Ctrl>-v on the beginning of a word, use e to block the whole word and then press any quoting character, like '

Then I press <enter>

Obviously, I get the following error message:
E78: Unknown mark

anybody a solution to easily enclose parts of text using visual mode?

cheers,
Bram


I guess it is a feature of that .vimrc provided on that web site (link is dead). In Vim the feature you described is not included.

The "unknown mark" you mentioned is <Enter>, because '<Enter> would be a motion command (also in visual mode) and there is no <Enter> mark defined in Vim.

I guess 2ndly the author has defined mappings like
:vmap ' c'<c-r>"'<esc>
:vmap " c"<c-r>""<esc>
:vmap ( c(<c-r>")<esc>

These ones may help you on the first run. Hint: There is no need to press Enter afterwards.

Andy

--
EOF



        
                
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de

Reply via email to