Re: A recomended guide to vim - was {Re: Does bash have a tool ?}

2018-03-09 Thread Cousin Stanley
Richard Owlett wrote:

> 
> For example, GVIM launches with an unreadably small font.
>
> I have found the instructions to do ":set guifont=*".
>
> However I wish to set things appropriately in ~/.vimrc .
>
> I ended up in  a sample script to insert.
>
> However I could find no links to how to find how find a list 
> of designation of a font-face.
>  

  I use the following line in ~/.vimrc
  to specify a font to be used  

:set gfn=DejaVu\ Sans\ Mono\ 13

  The path to that particular font
  on my debian stretch system is  

/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf

  vim should probably find any valid font
  in /usr/share/fonts ?

  I've been using a similar font setting
  in this manner for several years 
  and believe I first saw it as an example
  while google-izing  

.vimrc example 
  


-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona



Re: A recomended guide to vim - was {Re: Does bash have a tool ?}

2018-03-09 Thread Richard Owlett

On 03/07/2018 03:05 PM, Curt wrote:

On 2018-03-07, Richard Owlett  wrote:

On 03/05/2018 04:27 AM, Richard Owlett wrote:

On 03/04/2018 11:27 AM, Curt wrote:

On 2018-03-04, Richard Owlett  wrote:

My eventual goal is to create a personalized FAQ.
To that end I've collected all my outgoing mail which DOES NOT have
"Re:" in the Subject into a single file {used standard SeaMonkey tools}.

Using a text editor's search&replace function I've placed "KEY1" at the
beginning of the body of each message. Similarly, I've placed "KEY2" at
the end of each body.

Searches led to  which
describes tools to do word frequency tasks, primarily with bash
builtins.

First I need to eliminate the irrelevant text between "KEY2" of the
previous message and "KEY1" of the message of interest. It should be
straight forard to do in BASIC.


vim (hit escape to get into command mode)

:/KEY2/+1;/KEY1/-1d

will delete everything between KEY2 and KEY1, excluding the
matching lines.


Haven't looked up the syntax you referenced. HOWEVER, an initial browse
of vim.org immediately led to a half dozen pages of interest which an
additional half dozen (at least) things that are inherent in vim that I
had not mentioned. As today should be chilly and damp, I suspect where I
will be warm, dry, and becoming educated.

Thank you.

[snip]


I've installed GVIM using Synaptic.
I have browsed vim.org but in the abundance of documentation I haven't
appropriate introductory material aimed at my mindset - I learn by doing.

For example, GVIM launches with an unreadably small font.
I have found the instructions to do ":set guifont=*".
However I wish to set things appropriately in ~/.vimrc .
I ended up in  a sample script to insert.
However I could find no links to how to find how find a list of
designation of a font-face.

I've not yet parsed the example given me

:/KEY2/+1;/KEY1/-1d


That may be longer relevant as my reading at vim.org has suggested
better ways to approach my problem [ vim appears to have a world-view
similar to Digital Equipment's TECO which I used ~40 years ago].

Where should I be looking for:
   1. how to parse the given example.


http://vimregex.com/

The above link seems edifying.


Yes. It also does something valuable [if unintentionally], it gives some 
insight into a 'vim mindset'.


Thank you.



Re: A recomended guide to vim - was {Re: Does bash have a tool ?}

2018-03-07 Thread Curt
On 2018-03-07, Richard Owlett  wrote:
> On 03/05/2018 04:27 AM, Richard Owlett wrote:
>> On 03/04/2018 11:27 AM, Curt wrote:
>>> On 2018-03-04, Richard Owlett  wrote:
 My eventual goal is to create a personalized FAQ.
 To that end I've collected all my outgoing mail which DOES NOT have
 "Re:" in the Subject into a single file {used standard SeaMonkey tools}.

 Using a text editor's search&replace function I've placed "KEY1" at the
 beginning of the body of each message. Similarly, I've placed "KEY2" at
 the end of each body.

 Searches led to  which
 describes tools to do word frequency tasks, primarily with bash 
 builtins.

 First I need to eliminate the irrelevant text between "KEY2" of the
 previous message and "KEY1" of the message of interest. It should be
 straight forard to do in BASIC.
>>>
>>> vim (hit escape to get into command mode)
>>>
>>> :/KEY2/+1;/KEY1/-1d
>>>
>>> will delete everything between KEY2 and KEY1, excluding the
>>> matching lines.
>> 
>> Haven't looked up the syntax you referenced. HOWEVER, an initial browse 
>> of vim.org immediately led to a half dozen pages of interest which an 
>> additional half dozen (at least) things that are inherent in vim that I 
>> had not mentioned. As today should be chilly and damp, I suspect where I 
>> will be warm, dry, and becoming educated.
>> 
>> Thank you.
>> 
>>[snip]
>
> I've installed GVIM using Synaptic.
> I have browsed vim.org but in the abundance of documentation I haven't 
> appropriate introductory material aimed at my mindset - I learn by doing.
>
> For example, GVIM launches with an unreadably small font.
> I have found the instructions to do ":set guifont=*".
> However I wish to set things appropriately in ~/.vimrc .
> I ended up in  a sample script to insert.
> However I could find no links to how to find how find a list of 
> designation of a font-face.
>
> I've not yet parsed the example given me
 :/KEY2/+1;/KEY1/-1d
>
> That may be longer relevant as my reading at vim.org has suggested 
> better ways to approach my problem [ vim appears to have a world-view 
> similar to Digital Equipment's TECO which I used ~40 years ago].
>
> Where should I be looking for:
>   1. how to parse the given example.

http://vimregex.com/

The above link seems edifying.

 3.2 Range of Operation, Line Addressing and Marks
 ...

 /Section 1/+,/Section 2/-

 - all lines between Section 1 and Section 2, non-inclusively, i.e. the
   lines containing Section 1 and Section 2 will not be affected.

It would appear the 1 (in '/KEY2/+1' and '/KEY1/-1d') is superfluous in
the sense that if you omit the number after + or - it defaults to 1 (one).

Maybe it's better to be explicit.

'd' means delete.

>   2. how to have found it as a possible solution to my problem statement?

You said text editor so I thought of vim. I used a search engine to look
up how to do it. 

-- 
Bah, the latest news, the latest news is not the last.
Samuel Beckett



A recomended guide to vim - was {Re: Does bash have a tool ?}

2018-03-07 Thread Richard Owlett

On 03/05/2018 04:27 AM, Richard Owlett wrote:

On 03/04/2018 11:27 AM, Curt wrote:

On 2018-03-04, Richard Owlett  wrote:

My eventual goal is to create a personalized FAQ.
To that end I've collected all my outgoing mail which DOES NOT have
"Re:" in the Subject into a single file {used standard SeaMonkey tools}.

Using a text editor's search&replace function I've placed "KEY1" at the
beginning of the body of each message. Similarly, I've placed "KEY2" at
the end of each body.

Searches led to  which
describes tools to do word frequency tasks, primarily with bash 
builtins.


First I need to eliminate the irrelevant text between "KEY2" of the
previous message and "KEY1" of the message of interest. It should be
straight forard to do in BASIC.


vim (hit escape to get into command mode)

:/KEY2/+1;/KEY1/-1d

will delete everything between KEY2 and KEY1, excluding the
matching lines.


Haven't looked up the syntax you referenced. HOWEVER, an initial browse 
of vim.org immediately led to a half dozen pages of interest which an 
additional half dozen (at least) things that are inherent in vim that I 
had not mentioned. As today should be chilly and damp, I suspect where I 
will be warm, dry, and becoming educated.


Thank you.

[snip]


I've installed GVIM using Synaptic.
I have browsed vim.org but in the abundance of documentation I haven't 
appropriate introductory material aimed at my mindset - I learn by doing.


For example, GVIM launches with an unreadably small font.
I have found the instructions to do ":set guifont=*".
However I wish to set things appropriately in ~/.vimrc .
I ended up in  a sample script to insert.
However I could find no links to how to find how find a list of 
designation of a font-face.


I've not yet parsed the example given me

:/KEY2/+1;/KEY1/-1d


That may be longer relevant as my reading at vim.org has suggested 
better ways to approach my problem [ vim appears to have a world-view 
similar to Digital Equipment's TECO which I used ~40 years ago].


Where should I be looking for:
 1. how to parse the given example.
 2. how to have found it as a possible solution to my problem statement?

TIA