block insertion not working

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

block insertion not working

WenMin Tu
using visual block mode to select few lines(I tried CTRL+v, v, V, CTRL+q), and I tried to using "i" to insert some chars in front of every selected line, but turns out it is not even respond to the command "i". but it does respond to "d" which will delete the selected parts.

hopefully I make sense here.

so anyone bumped into this scenario before?

--
--
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: block insertion not working

Björn Winckler
I think "I" (capital I) is what you're looking for.

Björn

On Fri, Feb 22, 2013 at 10:31 AM, WenMin Tu <[hidden email]> wrote:

> using visual block mode to select few lines(I tried CTRL+v, v, V, CTRL+q), and I tried to using "i" to insert some chars in front of every selected line, but turns out it is not even respond to the command "i". but it does respond to "d" which will delete the selected parts.
>
> hopefully I make sense here.
>
> so anyone bumped into this scenario before?
>
> --
> --
> You received this message from the "vim_mac" 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_mac" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
--
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: block insertion not working

WenMin Tu
In reply to this post by WenMin Tu
no,  björn, I think u don't get it.  capital I or i are both for insertion except they insert at different place. I know this, but what I'm trying to do is insert something into every selected line, after I insert something and press ESC they should be inserted at every line I selected.
now they don't even responds after pressed v and selected few lines.

--
--
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: block insertion not working

David Henderson

On 22 Feb 2013, at 06:29, WenMin Tu wrote:

> no,  björn, I think u don't get it.  capital I or i are both for insertion except they insert at different place. I know this, but what I'm trying to do is insert something into every selected line, after I insert something and press ESC they should be inserted at every line I selected.
> now they don't even responds after pressed v and selected few lines.


Björn’s advice is correct. In column-wise visual selection, one needs to use shift-i to cause insertion to occur on every line before the cursor. i and shift-I work differently in the mode created by crtl-v.

David P Henderson
c: 757.286.3212
--
"You can't have capitalism on the way up and socialism on the way down."
   -- Newt Gingrich

--
--
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: block insertion not working

Barrie Stott
In reply to this post by WenMin Tu

On 22 Feb 2013, at 09:31, WenMin Tu wrote:

> using visual block mode to select few lines(I tried CTRL+v, v, V, CTRL+q), and I tried to using "i" to insert some chars in front of every selected line, but turns out it is not even respond to the command "i". but it does respond to "d" which will delete the selected parts.

In Normal mode type ctrl-v to get visual block mode. Type characters to move the cursor to get to the end of the Visual-Block and the whole block should be highlighted. Suppose we want to add ABC at the beginning of each line of the block. Type IABC and ABC will appear at the beginning of the first line of the block; the highlighting will disappear after typing the A. Type Esc to finish the insertion and ABC will appear at the beginning of each line of the block; at least that is what happened on my machine using Snow Leopard.

Typing ':h visual.txt' in MacVim gives a whole chapter about Visual stuff and ':h blockwise-operators' is the main section for the current exercise with the warning: {not available when compiled without the +visualextra feature}

Barrie.

--
--
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: block insertion not working

WenMin Tu
在 2013年2月22日星期五UTC+8下午11时59分55秒,Barrie写道:

> On 22 Feb 2013, at 09:31, WenMin Tu wrote:
>
>
>
> > using visual block mode to select few lines(I tried CTRL+v, v, V, CTRL+q), and I tried to using "i" to insert some chars in front of every selected line, but turns out it is not even respond to the command "i". but it does respond to "d" which will delete the selected parts.
>
>
>
> In Normal mode type ctrl-v to get visual block mode. Type characters to move the cursor to get to the end of the Visual-Block and the whole block should be highlighted. Suppose we want to add ABC at the beginning of each line of the block. Type IABC and ABC will appear at the beginning of the first line of the block; the highlighting will disappear after typing the A. Type Esc to finish the insertion and ABC will appear at the beginning of each line of the block; at least that is what happened on my machine using Snow Leopard.
>
>
>
> Typing ':h visual.txt' in MacVim gives a whole chapter about Visual stuff and ':h blockwise-operators' is the main section for the current exercise with the warning: {not available when compiled without the +visualextra feature}
>
>
>
> Barrie.

oh mama mia. a huge thank u to u, buddy.
it works. It just works for the CTRL+v and I(capital).
didn't what got on me, I used to remember that it should working in every situation as long as I selected few lines(v or V or CTRL+v), I mean it should working as long as I'm in visual mode.
ok, turns out it didn't. thank u again

--
--
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: block insertion not working

Barrie Stott

On 22 Feb 2013, at 16:14, WenMin Tu wrote:

> 在 2013年2月22日星期五UTC+8下午11时59分55秒,Barrie写道:
>> On 22 Feb 2013, at 09:31, WenMin Tu wrote:
>>
>>
>>
>>> using visual block mode to select few lines(I tried CTRL+v, v, V, CTRL+q), and I tried to using "i" to insert some chars in front of every selected line, but turns out it is not even respond to the command "i". but it does respond to "d" which will delete the selected parts.
>>
>>
>>
>> In Normal mode type ctrl-v to get visual block mode. Type characters to move the cursor to get to the end of the Visual-Block and the whole block should be highlighted. Suppose we want to add ABC at the beginning of each line of the block. Type IABC and ABC will appear at the beginning of the first line of the block; the highlighting will disappear after typing the A. Type Esc to finish the insertion and ABC will appear at the beginning of each line of the block; at least that is what happened on my machine using Snow Leopard.
>>
>>
>>
>> Typing ':h visual.txt' in MacVim gives a whole chapter about Visual stuff and ':h blockwise-operators' is the main section for the current exercise with the warning: {not available when compiled without the +visualextra feature}
>>
>>
>>
>> Barrie.
>
> oh mama mia. a huge thank u to u, buddy.
> it works. It just works for the CTRL+v and I(capital).
> didn't what got on me, I used to remember that it should working in every situation as long as I selected few lines(v or V or CTRL+v), I mean it should working as long as I'm in visual mode.
> ok, turns out it didn't. thank u again

It was my pleasure. No reply needed.

Barrie.

--
--
You received this message from the "vim_mac" 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_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.