[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs insert empty string
From: |
Deniz Dogan |
Subject: |
Re: Emacs insert empty string |
Date: |
Thu, 24 Mar 2011 11:50:25 +0100 |
2011/3/24 Kenneth Brun Nielsen <kenneth.brun.nielsen@gmail.com>:
> On Mar 24, 10:49 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
>> Am 24.03.2011 um 02:46 schrieb Kenneth Brun Nielsen:
>>
>> > How can I insert an empty string?
>>
>> What is "an empty string?" Can you exactly and comprehensively
>> describe this? Is it defined in Wikipedia? And give us a few examples?
>
> An empty string is the thing between the quotes here: "". My geek
> level is not high enough to rephrase it further :)
>
> An example is this command file consisting of 100001 commands:
>
> ---
> command 1
> command 2
> ..
> command 100000
> command 100001
> ---
> Now I want to outcomment the first 1000 commands. I select the 1000
> lines and use 'CTRL-x rt' for rectangle mode, and insert a "*" in
> front of the first 1000 lines. Now my file looks like this:
> ---
> *command 1
> *command 2
> ..
> *command 1000
> command 1001
> ..
> command 100000
> command 100001
> ---
> Now I "regret" outcommenting the commands 600-800. Again I select the
> lines/columns of interest and use the 'CTRL-x rt' command and remove
> the "*" column (i.e. replace the first column with an empty string)
> for that specific lines, targetting a file like this:
> ---
> *command 1
> ..
> *command 599
> command 600
> ..
> command 800
> *command 801
> ..
> *command 1000
> command 1001
> ..
> command 100000
> command 100001
> ---
>
> However this last step doesn't work as intended. Because I can not
> replace with an empty string. Simply pressing "Enter" will choose the
> default string, which is the equivalent to the previously inserted
> string "*".
>
This is where you should use C-x r d instead. It will delete the
rectangle you have selected and is the equivalent of replacing its
contents with the empty string.
--
Deniz Dogan
Message not available
Message not availableRe: Emacs insert empty string, David Kastrup, 2011/03/24
Message not availableRe: Emacs insert empty string, David Kastrup, 2011/03/24
Re: Emacs insert empty string, Peter Dyballa, 2011/03/24
Re: Emacs insert empty string, David Kastrup, 2011/03/24
Re: Emacs insert empty string, Peter Dyballa, 2011/03/24
Re: Emacs insert empty string, Tassilo Horn, 2011/03/24