RE: write a very basic syntax file

2015-11-11 Thread John Beckett
Jose Caballero wrote:
> Now I only need to figure out how to highlight comments.

I'm not sure if that point is covered, but try:
http://vim.wikia.com/wiki/Creating_your_own_syntax_files

John

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: conflagration between expantab and softtabstop

2015-11-01 Thread John Beckett
toothpik wrote:
> I find this unexpected -- history dictates when I am having unexpected
> results it is because I don't fully understand what I am doing, so please,
> ppl, educate me -- why are spaces inserted with noexpandtab set?

The info here might help:
http://vim.wikia.com/wiki/Indenting_source_code

John


-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: vimdiff options by file type?

2015-09-30 Thread John Beckett
David Woodfall wrote:
> Sorry for going off topic a little, but is the order that
> .vimrc, .vim/plugin/* etc. are read listed somewhere?

For more detail than can be digested:

:help startup

John


-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: visincr and mswin not compatible

2015-09-24 Thread John Beckett
jordi_frei wrote:
> The thing is that, I really need to use cntrl-C, cntrl-V

Do not source mwwin.vim and do not use 'behave mswin'.
Instead, put the following in your _vimrc.

" Select all, cut, copy, paste.
nnoremap  ggVG
vnoremap  "+x
vnoremap  "+y
nnoremap  "+gP
cnoremap  +
exe 'inoremap 

RE: displaying ^M carriage returns in a file, like the 'old' vi used to do

2015-08-18 Thread John Beckett
 So, the question has been raised, and I'm posting it to this group.  Is there 
 a
 simple method, in vim, of displaying ^M carriage return characters as a
 precaution or test when their presence in a file can be detrimental, if not
 catastrophic?

There is some good information at:
http://vim.wikia.com/wiki/File_format

To be sure there are no lingering ^M you can search:

/\r

In a search, \r finds ^M.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Diff mode via Tabs

2015-06-18 Thread John Beckett
David Fishburn wrote:
 I use gVim for diffing from my source control system using:
 gvim.exe -O -d file1.txt file2.txt

I avoid problems by working in Vim. I use some external tool to generate a list 
of files I want to diff, then paste it into a temporary buffer in Vim. Either 
the external tool or a Vim script massages the list to come up with text like 
this:

:tabe new1.txt
:vert diffs old1.txt
:tabe new2.txt
:vert diffs old2.txt
:tabe new3.txt
:vert diffs old3.txt

With the cursor in that, the following copies and executes it:

yip
@

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: reverting keymaps for location-list buffer

2015-05-02 Thread John Beckett
Stephan Sahm wrote:
 I remapped CR and I really like my remapping. There are
 however some problems For quickfix buffers I found this:

 autocmd BufReadPost quickfix nnoremap CR CR

 is there something similar for location-list buffers?

To make Enter work normally in a quickfix window, rather than
rely on auto commands, you can create file:

~/vimfiles/ftplugin/qf.vim

containing the single line:

nnoremap buffer CR CR

The above is all that is needed to make Enter behave as Enter
in quickfix and local-list buffers (in normal mode, which is
all you need).

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: BufReadPost event for location list

2015-05-02 Thread John Beckett
Stephan Sahm wrote:
 I want to do the following for location-list buffers:
 autocmd BufReadPost quickfix nnoremap CR CR

Please don't ask essentially the same question twice.
See my answer to the other question.

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: reverting keymaps for location-list buffer

2015-05-02 Thread John Beckett
Stephan Sahm wrote:
 is the vimfiles folder maybe wrong?
 must it be somewhere under .vim/ maybe?

Sorry, my confusion. For a Unix-based system, create file
(you may have to create the directory first):

~/.vim/ftplugin/qf.vim

containing the single line:

nnoremap buffer CR CR

The above should make pressing Enter work as expected in
quickfix and local-list buffers. With the cursor in one of those
windows, enter the following command to see what mapping is in
effect, and where it was set. You only care about the n line
which is the mapping for normal mode.

:verbose map CR

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Cannot log into my vim account.

2015-04-24 Thread John Beckett
 I cannot log into my vim account
 (http://www.vim.org/account/profile.php?user_id=34258) and there is no
 way to reset the password. It says to ask Bram to reset my password.

You can email me as Bram might be a bit busy.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: gvim not showing unicode Devanagari - Hindi text

2015-03-03 Thread John Beckett
V S Rawat wrote:
 My gvim, vim 7.4 on w8 is not showing unicode Devanagari -
 Hindi text.

What is it showing? Vim requires that you have selected a
suitable font which has to be mono-spaced.

This shows that CJK can be handled with the right font so presumably
some font would handle what you need, although I do not know
how well it works for editing.
http://vim.wikia.com/wiki/Generate_all_Unicode_characters

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: How can I better use Vim help

2015-02-03 Thread John Beckett
Sayth Renshaw wrote:
 How is the best way in vim to use the help system when I am
 unsure exactly what term or phrase to look for?

The tip has some useful info:
http://vim.wikia.com/wiki/Learn_to_use_help

Your question about vertical splits is very general and an
example of what you mean might be needed.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: why function! instead of just function

2015-01-20 Thread John Beckett
Bao Niu wrote:
 I am learning Vimscript and I wonder if there is any
 difference between writing function! vs. function?

Expanding on Tim's reply, suppose you have file h.vim which
contains:

  function! Hello()
echoerr 'Hello'
  endfunction

In Vim, assuming the directory shown by :pwd is the directory
holding h.vim, you can do the following to source the script:

  :so h.vim

That executes h.vim which defines the function.

You could edit h.vim and source it again, and the edited
function would replace the original.

The idea is to help you to not accidentally overwrite functions.
If you do not have !, the function will not be replaced if you
try to define it again.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Should vimgrep always use / to enclose your search patterns?

2015-01-20 Thread John Beckett
Bao Niu wrote:
 in Vim is enclosing your search pattern with / recommended?
 The documentation says it is optional. If it's optional then
 why not just forget it?

I would be too nervous to follow Tim's advice, but it seems to
work. Are you aware of the general rule that applies to commands
like :s (substitute)?

An example to replace hello with goodbye:

  :%s/hello/goodbye/g

Suppose you need to replace something with slashes in it.
The following attempt to replace a/b will NOT WORK:

  :%s/a/b/goodbye/g

However, the following will work:

  :%s.a/b.goodbye.g

These tips are worth careful study:
http://vim.wikia.com/wiki/Searching
http://vim.wikia.com/wiki/Search_and_replace

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: converting format

2015-01-18 Thread John Beckett
John Culleton wrote:
 I have a customer's file in dos format.
 Is there a command to convert it to *nix format?

The advice you have received so far is not the whole story.

See:
http://vim.wikia.com/wiki/File_format

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Site error

2014-12-30 Thread John Beckett
Gabor Urban wrote:
 I wanted to check something among the scripts, and encountered
 the following error:
 An error has been encountered in accessing this page.
 1. Server: www.vim.org
 2. URL path: /scripts/script_search_results.php

The site is hosted on sourceforge.org and they have problems
from time to time. I check the above every day and it has been
broken for the last few days. However, it is now ok. There is
not much we can do about it, but thanks for reporting.

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: how to display different color in vi

2014-12-24 Thread John Beckett
skyworld wrote:
 normally I use gvim instead of vi. My question is for gvim is:
 can i use different color to show diffent word?  For example,
 I would like to highlight word red with red and yellow
 with color yellow in one document. Is this possible?

The tip for that is:
http://vim.wikia.com/wiki/Highlight_multiple_words

It can be done manually to a limited extent. In the following,
Search and Error are highlight groups that should be
displayed by default with the :highlight command.

:match Search /\yellow\/
:2match Error /\red\/

To switch highlighting off:

:match none
:2match none

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Expanding a variable

2014-12-02 Thread John Beckett
David Fishburn wrote:
 Assume the net result is I have this:
 let test_newline = '\n'

Is this what you mean?

:let x = '\n'
:let x = substitute(x, '\\n', '\n', 'g')
:echo char2nr(x)

The first line puts a string of two characters (a backslash and n) into x.

The second line changes that to a single newline character.

The third line displays 10 (linefeed).

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: vim to format/prettyprint assembly lang source - Best way?

2014-11-24 Thread John Beckett
russurquhart1 wrote:
 I have some assembly language source, in an older document, that when it
 was ported to our current platform, the code samples got messed up.

 I am now faced with the task of going through and reformatting the assembly
 language examples. I'm using vim, to format the code but it is still a pretty
 manual task. I was wondering if anyone could suggest a better method.

 I start with something like this:

 Code MOVIZF32 R1H, #-2.0 ; R1H = -2.0 (0xC000) ABSF32 R1H, R1H ;
 R1H = 2.0 (0x4000), ZF = NF = 0 MOVIZF32 R0H, #5.0 ; R0H = 5.0
 (0x40A0) ABSF32 R0H, R0H ; R0H = 5.0 (0x40A0), ZF = NF = 0
 MOVIZF32 R0H, #0.0 ; R0H = 0.0 ABSF32 R1H, R0H ; R1H = 0.0 ZF = 1, NF =
 0/Code

 And to maintain the formatting i need to end up with something like this:

 Code
 MOVIZF32  R1H, #-2.0; R1H = -2.0 (0xC000)
 ABSF32   R1H, R1H  ; R1H = 2.0 (0x4000), ZF = NF = 0

 MOVIZF32  R0H, #5.0 ; R0H = 5.0 (0x40A0)
 ABSF32   R0H, R0H  ; R0H = 5.0 (0x40A0), ZF = NF = 0

 MOVIZF32  R0H, #0.0 ; R0H = 0.0
 ABSF32   R1H, R0H  ; R1H = 0.0 ZF = 1, NF = 0/Code

Are you able to inspect the file with a hex editor (or use
:r !xxd file name) and determine whether there are any
Unique bytes that mark end of line? Or, did all the line endings
end up a space?

How long is a typical line which contains all the statements?

Does each statement have a comment? If so, something might be
done with a substitute. That would be easier if each instruction
had an identifiable form. Does each consist of uppercase letters
with 32 at the end? If so, try:

:%s/ \ze\u\u\+32\/\r   /g

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: How to make a local option global?

2014-09-28 Thread John Beckett
Cesar Romani wrote:
 How can I make an option global for the current session?
 For example, I notices that comments is set as a local option.
 How can I make it global when editing a bunch of files?

As Ben mentioned, settings like that should be set via filetype.

If you have several open files and you want to change a local
setting in each of them, use :bufdo or one of its variants such
as :argdo.

:bufdo set commentstring=//\ %s

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: vim.org fails to redirect to www.vim.org for Chrome users

2014-08-20 Thread John Beckett
Andrew Pennebaker wrote:
 When I enter vim.org into the address bar in Firefox, it
 successfully redirects to www.vim.org. But when I enter
 vim.org in Chrome, no redirect happens.

That has been discussed a couple of times in the past. The
person who provides the DNS for Vim does so in an extremely
reliable and efficient manner, so what they say goes. The issue
is that vim.org is a domain and should not be expected to work
in a browser. A browser has to connect to a host (www.vim.org).

Some browsers try adding www. when plain vim.org does not
resolve to a host name, so vim.org works in some browsers.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: vim function for printing text in to a buffer.

2014-08-02 Thread John Beckett
sinbad wrote:
 i'm trying to write a vim function to generate the following
 output. first of all why is it so difficult to ptint text into
 the buffer, i thought vim will have a simple printf() command
 which can dump the text into the buffer, but after googling a
 lot i found that append() is the function i should use. so i
 wrote the following function.
 ...

I cannot work out exactly what you want, but a quick translation
of the code you posted would be the following.

function! Test()
  for a in range(20)
for b in range(20)
  $put =printf('1.2.%x:%d', a, b)
endfor
  endfor
endfunction
call Test()

The '$put' appends to the current buffer ($ = last line) the
value of the expression ('='). The printf generates a string
containing '1.2.', then a in hex, then ':', then b in decimal.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Question about setting default syntax highlighter

2014-07-17 Thread John Beckett
Carfield Yim wrote:
 Hi, I need to use vim to edit config files for Visual Studio
 project a lot, all the config file are XML but edit with
 *.conf. How can I config vim to use XML syntax highlighter for
 all *.conf file?

See the example at
http://vim.wikia.com/wiki/Filetype.vim

Sorry it's a bit hard to follow, but where it says:

au! BufNewFile,BufRead *.csv setf csv

you need:

au! BufNewFile,BufRead *.conf setf xml

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: how to hidden the ^M without change the file

2014-07-13 Thread John Beckett
fengidri wrote:
 when the file has '\r\n' and '\n', I donot want see the ^M,
 but I donot want change the file.

I recommend reading the details:
http://vim.wikia.com/wiki/File_format

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Clean string returned by windows console cmd

2014-07-09 Thread John Beckett
Ni Va wrote:
 Your command is pretty good but can I affect a variable
 instead of output command under the cursor into the buffer

You have to do some work.

:new
:r !wmic logicaldisk get deviceid
:1,2d
:%s/\s\+$//e
:let drives = getline(1,'$')
:echo drives

Select the above text and yank it (type yip).
Then type :@ to execute the yanked text.

The result is that a variable named drives is a list of the
drive letters, for example:

:echo drives
['C:', 'D:', 'E:']

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Clean string returned by windows console cmd

2014-07-08 Thread John Beckett
Ni Va wrote:
 This is obtained by launching this command :
 echo system(wmic logicaldisk get deviceid)

The problem is that the output from wmic is Unicode, and system
is dumping the bytes. I don't know how to avoid that, but the
following reads the plain text if you have the correct settings:

:r !wmic logicaldisk get deviceid

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Vim trick to make all the same numbers to replace by the numbera in ascending order ?

2014-07-02 Thread John Beckett
Arup Rakshit wrote:

 replace by the numbera in ascending order ?

 

You have good answers, but you might want to see the tip:

http://vim.wikia.com/wiki/Making_a_list_of_numbers

 

John

 

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: vim 7.4: pasting is very slow on HP UX machine.

2014-06-30 Thread John Beckett
Sarath Addanki wrote:
 I'm using right click to paste into Vim via PuTTY.

Has anyone pointed out what is happening? On paste (right
click), PuTTY sends each character from the clipboard over the
SSH session to the server where Vim is running, as if you had
typed the character. I do not know the details, but PuTTY must
somehow throttle sending in order to avoid overrunning the input
buffer on the server. My guess is that slow pasting is an
unavoidable consequence. I don't need to use PuTTY much, but in
the past I have found it easier to use a separate command prompt
window to upload a file (pscpy) with whatever text I needed,
then read it into Vim (:r filename.txt).

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: how can I mark the indentation with (dots) in Vim ?

2014-06-28 Thread John Beckett
Arup Rakshit wrote:
 You can see, that, while he is typing code, indentations are
 showing with dots. 2 dots for 2 space indentations, 4 dots for
 4 spaces etc..

 How the same can be done in Vim ?

Search for listchars at
http://vim.wikia.com/wiki/Highlight_unwanted_spaces

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: How to join vim maillist v...@vim.org

2014-06-19 Thread John Beckett
Qin Fu Qi wrote:
 I want to join the mail list v...@vim.org.

Welcome, you are now a member and your message and my reply has
been sent to the mailing list.

The method of joining is tricky. I don't think there is any
feedback from Google Groups as to what will happen next.
In order to avoid spam, the first message sent has to be
approved by a manager, so there may be a delay of several hours.

Ideally I would have made you a member without bothering
everyone by sending your message to the list, but I don't know
how! I couldn't see your email address to respond directly to
you. I was using the Google Groups interface for managers, and
normally just click allow or spam so if there are any other
useful features, I haven't seen them.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: How to join the maillist v...@vim.org? Who can

2014-06-19 Thread John Beckett
Qin Fu Qi wrote:
 I would be insanly happy if the email could be seen by you.
 I am a big fun of vim and I am looking forward to joining
 v...@vim.org.

I have replied to the other message. I went to click remove to
remove this near-duplicate from the list of messages waiting to
be moderated, but accidentally clicked the button which posted
it. I normally remove duplicates which occur because the person
posting gets no feedback from Google Groups (I think) telling
that their message has been put in a queue and nothing will
happen until a manager approves it (to avoid spam).

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: How to join vim maillist v...@vim.org

2014-06-19 Thread John Beckett
Qin Fu Qi wrote:
 [personal info]

Another confusing issue is that clicking Reply replies
TO THE GROUP (most mail clients will show the email address
of the group in the To field).

Unfortunately, your message has been sent to well over a
thousand people, and will be archived on various websites.
I removed it from the Google Groups website, but that's all
I can do.

A manager cannot join anyone to a group. That stops Google from
being used to send unsolicited mail (spam) to people unless they
go to some trouble to request it (anyone can create a Google
Group which makes them the owner and a manager).

If some...@example.com wants to receive mail from a group, that
email address must be used to join the group. Within 24 hours,
the email address should start receiving messages from the group
(except that vim-announce rarely sends messages, and you don't
really need to join that group if reading vim_use).

I suggest waiting for a couple of weeks before using any other
email addresses to join the group because you may find that the
volume of mail is a bit tedious. For example, how will you
decide which messages to ignore when reading from the second
address.

It is quite easy to work out my email address from this message,
so please compose a new message to that address if you want to
ask any questions.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: How to start vimdiff?

2014-06-07 Thread John Beckett
wolfv wrote:
 How to start vimdiff?

Using :help vimdiff shows that vimdiff is equivalent to vim -d.

Using gvim (which I recommend), you could start it at command prompt:

gvim -d file1 file2

Or, if you are already editing file2, you would enter:

:diffs file1

It is handy to do the last step in a new tab:

gvim file2
:tab sp
:vert diffs file1

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: relative marks?

2014-05-08 Thread John Beckett
Chris Lott wrote:
 Is there a way to set a mark (or similar) that is relative to
 a word? For instance, given the following text:
 
 Foo bar. Baz.
 And more stuff.
 
 I'd like to be able to quickly jump to the space after bar.
 even if the text has been changed to something like:

You could do a map. The following has a space after the f.

:nnoremap F8 `af 

Pressing F8 will then jump to the position of mark a, then to
the first space.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Problem with latex template

2014-04-15 Thread John Beckett
Alain Bertrand wrote:
 The mailing list server seems quite slow to publish new threads.

It's fast. The problem comes from the fact that the first post
of each new member has to be moderated (approved by a manager).
Sometimes that's fast, but it may take several hours.

Also, sometimes Google decides that a message from an existing
member might be spam. Such messages also have to be moderated.

Unfortunately such moderation is required to avoid spam. I'm
sending this to the list as a periodic reminder.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Another SRT questions

2014-04-14 Thread John Beckett
Jeri Raye wrote:
 For example:
 I want to tell you this. and also this.

 How to change this into:
 I want to tell you this. And also this.

:%s/\.\_s*\zs\l/\u/gc

Perhaps sentences end with other characters, so you might try:

:%s/[.!?]\_s*\zs\l/\u/gc

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Select entire line based on tag, then export only those lines of text

2014-04-13 Thread John Beckett
Charles Campbell provided a good answer, but for a 1.5GB file
you must have a lot of RAM, and you must disable some features
before starting.

First, use your operating system to copy yourtabdelimitedfile to
ambulance-only-file.

Then do the following:

vim (or gvim)
:set eventignore=FileType noswapfile undolevels=-1
:e ambulance-only-file
:v/\c\ambulance\/d
:wq

However, that is really asking a lot, and it may take a long
time. Vim is for editing a file, not for filtering a 1.5GB
monstrosity.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: local hlsearch

2014-04-01 Thread John Beckett
meino wrote:
 I often use a search'n'replace on an area, which is limited by
 a previously selected visual block.
 Additional hlsearch is on by default.
 After the searech'n'replace has ended, the found places are
 marked all over the whole text.
 This is often irritating to me.
 Is there a way to limit the highlights set by hlsearch to
 those place of the visual block area?

As the other reply said, map a key to turn highlights off. See:
http://vim.wikia.com/wiki/Highlight_all_search_pattern_matches

However, while not really helpful for what you asked, it is
possible to limit highlights to the last visually selected
block. See:
http://vim.wikia.com/wiki/Search_and_replace_in_a_visual_selection

For example, consider these two searches:
/[abc]
/\%V[abc]

The first finds all a or b or c, everywhere.

The second finds the same, but only in the last visual
selection (what would be highlighted if gv were used).

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: how can I configure word highlighting in VIM ?

2014-03-29 Thread John Beckett
Arup Rakshit wrote:
 Subject: how can I configure word highlighting in VIM ?

If you mean by searching, I suggest starting here:

http://vim.wikia.com/wiki/Searching

See what it says (you know about *?), and scan down to the
Highlighting search matches link near the bottom. There are
also some search-without-moving ideas there somewhere.

To just highlight, see:

http://vim.wikia.com/wiki/Highlight_multiple_words

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: ^@

2014-03-22 Thread John Beckett
Ni Va wrote:
 I am launching windows cmd from GVim7.4.

 let cmd = 'myexecutablepath OneArg'
 exe !.cmd

To guard against strange characters, the command must be escaped:

let cmd = 'myexecutablepath OneArg'
exe !.shellescape(cmd, 1)

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: marry

2014-03-17 Thread John Beckett
caughe...@comcast.net wrote:
 [some random URL]

I do not know what the above is, and I would not recommend
clicking links to random websites, but I am replying to let
others know that I have adjusted this user's settings so that
future messages are moderated (they will not appear unless
approved by a manager).

I also deleted the message from the Google Groups web interface.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: matchstr() ^ and $ wrong for multi-line text?

2014-02-09 Thread John Beckett
David Barnett wrote:
 I noticed that matchstr() seems to always interpret ^ as
 start-of-string and $ as end-of-string, even when the string
 is multiple lines. :help pattern says they should be
 start-of-line and end-of-line, respectively.
 
 For example
   :echo matchstr(foo\nbar, '^foo$')
 matches nothing.

:help matchstr() says it's the same as match(), and the help for
that says to see ':help string-match', and that says that \n
can be matched with \n, but (by implication) not by $. 

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Vim Scripts Spam

2014-02-06 Thread John Beckett
ZyX wrote:
 Thanks, I deleted them (and the user) about six hours ago.

 Wondering why these scripts return 200 OK though page contents
 say they are not found.

That is probably reasonable as the user requests script 4854,
and vim.org responds with:

script: I couldn't find the script you requested
(script_id=4854), are you sure it exists?

A page not found response would not be quite right.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Vim Scripts Spam

2014-02-05 Thread John Beckett
Paul wrote:
 Subject: Vim Scripts Spam
 http://www.vim.org/scripts/script.php?script_id=4854
 http://www.vim.org/scripts/script.php?script_id=4855

Thanks, I deleted them (and the user) about six hours ago.

There has been remarkably little spam, the last I deleted
was on 9 January.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: XXD with Vim

2014-02-04 Thread John Beckett
Ven Tadipatri wrote:
 It's nice that you can go into hex mode with Vim through the
 use of XXD, but it's really hard trying to find out what hex
 codes correspond to a given character.

You know about ga and g8? In normal mode, put the cursor on a
character of interest then type ga or type g8 (:help ga).
g8 is good for UTF-8 as it shows the bytes used.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Vim Weekly

2014-01-29 Thread John Beckett
I'm adding a little to what Ben wrote.

It is a shame about adverts at vim.wikia.com (although I never
see them), but as Ben noted, the ads pay for a good server and a
fast internet connection, and support. Also, there is a
practically guaranteed continuity to the site because even if
Ben and I were hit by the same bus, the site would still exist
and others could take over. It's very unlikely that there will
ever be a problem of someone failing to renew the domain name,
or that the tips might be lost due to a server glitch.

It would be better if everyone concentrated on one site IMHO,
but people have given good reasons why they prefer something
else.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Do developers use vim exclusively or alternate with an IDE?

2014-01-13 Thread John Beckett
Marc Weber wrote:
 Nobody prevents you from remapping ctrl-v to do what you want.
 The block selection is not lost, you can still start
 selection by v then switch to block by ctrl-v - I just assume
 that you use block selections less often than pasting ..

You can also use Ctrl-Q to start block mode (assuming you are
not using a terminal with Xon/Xoff!), instead of Ctrl-V.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Macros in Vim

2013-12-26 Thread John Beckett
I put an example at
http://vim.wikia.com/wiki/Macros

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: meaning of c-_b

2013-11-22 Thread John Beckett
FlashBurn wrote:
 I'm using a tcomment plugin and need to comment out a block of
 code. There is a command for it abbreviated in the following
 way

 c-_b

 I'm interpreting it as holding the Ctrl button, press
 underscore button, and then b. But it doesn't work for me.
 What am I missing.

Hold down Ctrl, press _, release Ctrl, press b.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Advanced vimrc? question

2013-09-10 Thread John Beckett
Gabor Urban wrote:
 I use different indention depth with different types of
 sources. It is rather time consuming to set it manually.
 Is there a possibility to defined these values to file
 extensions?

See Different settings for different file types:
http://vim.wikia.com/wiki/Indenting_source_code

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Where does S-Insert mapping come from on Windows?

2013-09-09 Thread John Beckett
Christian Brabandt wrote:
 And where is this mapping actually defined? And why only on
 Windows?

 That is hardcoded in the Vim source.

It can't be true!

Yet...

gvim -u NONE -i NONE
:map
:imap

gives

v  C-X *d
v  C-Del   *d
v  S-Del   *d
v  C-Insert*y
v  S-Insert-d*P
n  S-Insert*P
!  S-InsertC-RC-O*

Search for Default mappings in src/getchar.c

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


RE: regex variable

2013-07-19 Thread John Beckett
shawn wilson wrote:
 libpcre would be fine, yes. Or the library that Ruby uses -
 either way.
 ...
 I guess this should be a feature request then?

Vim is strongly attached to compatibility, and is immensely
complex. I would not bother requesting a new regex syntax
because it won't happen.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: regex variable

2013-07-18 Thread John Beckett
shawn wilson wrote:
 This is probably a feature request but I really do hate the
 regex engine and would love to swap it out. Is there / can
 there be a compile time option to use a different engine?

No (I assume you want different regex syntax, probably PCRE).

Tony's post is talking about a new Vim regex engine intended to
be fully compatible with the old syntax, but faster.

Like Vim's scripting language, Vim's regex syntax makes a lot of
sense for editing text because they provide procedures that
often work in an optimum way.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Case insensitive search

2013-07-09 Thread John Beckett
Patterson, Joel wrote:
 I'll try the various suggestions.

You got a lot of good suggestions, but the best thing would be
to examine our tip:
http://vim.wikia.com/wiki/Searching

BTW you really should find a way to NOT post long signatures and
disclaimers to a mailing list.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: mappings time out bug?

2013-06-19 Thread John Beckett
Has this issue been sorted out? Let's not work out who-said-
what.

The OP was:

 nnoremap gp `[v`]

 since 'g' is not mapped, it shouldn't timeout no matter what
 the timeout length is right? As expected, the built in mapping
 for gp, gv, etc. both work no matter how long one waits
 between the g and the p.

My thoughts are that by default, and as per :help gp, there
is no gp mapping, so you can press g, then wait a minute, then
press p (no timeout).

However, once you have a mapping (the nnoremap above), the
situation is completely changed. The timeout does apply to the
mapping, and you would have to type gp quickly for the g to have
any effect.

John


-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Opening large files

2013-05-17 Thread John Beckett
Rajesh Kannan wrote:
 -
 Vim Online Error
 script:Can't connect to local MySQL server through socket
 '/var/lib/mysql/mysql.sock' (2)
 -

I just noticed that problem myself, and came here to see if
there was a discussion. I will investigate the situation in an
hour, if I get time, otherwise not until tomorrow. There was a
similar problem a couple of weeks ago.

Re the script, you can probably find it by searching for
LargeFile at the author's site:
http://www.drchip.org/astronaut/vim/

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Opening large files

2013-05-17 Thread John Beckett
 -
 Vim Online Error
 script:Can't connect to local MySQL server through socket
 '/var/lib/mysql/mysql.sock' (2)
 -

 I just noticed that problem myself, and came here to see if
 there was a discussion. I will investigate the situation in
 an hour, if I get time, otherwise not until tomorrow. There
 was a similar problem a couple of weeks ago.

The problem has been corrected, not by me, and vim.org works.

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Its about you - what about a github based wiki ? - demo ready

2013-05-06 Thread John Beckett
Christian Brabandt wrote:
 Well, there is wikipediafs¹, but this project seems dead and
 I couldn't convince it to either mount the wikipedia.org nor
 vim.wikia. So I would say, it doesn't seem to be working currently.

 ¹) http://wikipediafs.sourceforge.net/

I played with that a few years ago. I forget exactly what the
problems were, but it was not usable. I think the main issue was
that it was too easy to write to the wiki (if you do anything in
Vim which writes the file, it gets written to the wiki). You
really need to preview stuff because it is easy to mess up the
simplest markup system.

I also tried a couple of the edit with Vim schemes which
invoke Vim when a web browser opens an edit window. I found them
too klunky. Most of my wiki editing does occur in Vim, but I
prefer to just copy/paste between a running Vim and the browser
edit window.

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: \ze position

2013-03-22 Thread John Beckett
Axel Bender wrote:
 Sorry, I was too unspecific. I want to use the \z[es] from
 the last match() to prevent searching for the same -
 complicated - expression two times (once with match() the
 second time with matchend()...).

I forget the details, but I sweated blood working out how to
avoid getting stuck using match(), and came to the conclusion
that two calls are required. I believe this code is correct, and
it may be of interest.

http://vim.wikia.com/wiki/Copy_search_matches#GetMatches.28.29_alternative

BTW my overflowing todo list includes that I will fix that tip.
I have improved the code (which I use frequently), but even
better is that newer Vims are able to use :s///n with a
replacement expression to copy matches. The current tip has that
technique, but it is absurdly convoluted because older Vims
ignore the replacement expression if the n flag is used.

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: windows x64 binaries

2013-02-19 Thread John Beckett
Hugo Ahlenius wrote:
 Is there some good spot where one can get updated Windows
 64-bit binaries?

I haven't tried it, but there is another site mentioned at:
http://vim.wikia.com/wiki/Download

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: mapping a substitute for the Esc key?

2013-02-18 Thread John Beckett
Steve Litt wrote:
 Question for all of you: What's your favorite substitute for
 Esc, whether a keystroke, key combination, or key sequence?

Some ideas are at:
http://vim.wikia.com/wiki/Avoid_the_escape_key

I use the bizarre method on that page involving Enter (search
for ToggleEnterMapping). It's really weird and it took a while to
get used to it, but pressing Enter is so easy and natural when
one wants to terminate a command that it is now second nature.
I press Ctrl-Enter in gvim to insert a manual end line, or
switch off the mapping with its procedure for that.

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Copying text from wikipedia yields: lots of ???

2013-02-18 Thread John Beckett
Daniel M. Eldridge wrote:
 Pasting text from a wikipedia articles leaves me with lots of
 

I haven't looked at your images, but the problem is very likely
to be due to use of an incorrect encoding. The first two lines
in your vimrc should be:

set nocompatible
set encoding=utf-8

Saying should be is a bit of an over-generalisation, but it is
sufficiently accurate for most cases. Does the problem still
occur after restarting Vim with the above?

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Copying text from wikipedia yields: lots of ???

2013-02-18 Thread John Beckett
Daniel M. Eldridge wrote:
 Humm...I was missing the encoding=utf-8 line but now--so now
 problem has not been solved.

 Now, instead of  marks I get solid blocks--the size of a
 character.

You need a font which supports the characters you are looking at.

DejaVu Sans Mono is an example of a great and free font:
http://dejavu-fonts.org/wiki/Main_Page

There will still be lots of characters that are not supported by
a particular font.

Put the cursor on one of the solid-block characters and type ga
to see its hex (and decimal) code. You can also type g8 to see
the bytes used to represent that character in UTF-8. There will
be a page somewhere with a list of typical Unicode characters
and their hex codes, and you can copy/paste some into Vim to
confirm that you are getting the text, and that your problem is
therefore the font.

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Our posts are being flagged as spam.

2013-02-16 Thread John Beckett
Erik Christiansen wrote:
 While looking in the spam folder, I found:
 ...
 But 99% of posts are not similarly mis-flagged

I have previously noticed that Google sometimes flags good mail
as spam when large quotes from an earlier message have not been
removed. I have often seen that (although not recently) when
Google moves a message to the pending queue of messages which
need manager approval to be delivered to the list. That queue
is intended for new members (who are banned if their post is
spam), but it also holds messages from regular members if Google
thinks the message may be spam.

My preference would be for nearly all replies to have
unnecessary quotebacks removed, and that would solve the major
problem. There is no way we could influence Google's spam
detection features, so it's something to be fixed either by the
sender, or by a receiver somehow whitelisting the sender.

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Best practice on cleaning vimrc files

2013-02-12 Thread John Beckett
Malusi Gcakasi wrote:
 Secondly, what are the best practices for how a vimrc setup
 should be structured. Or are the details of this up to the
 individual user?

It would be good if that were documented somewhere in a simple
way. The following has some ideas.

http://vim.wikia.com/wiki/Keep_your_vimrc_file_clean

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: mapping a function with key

2013-02-08 Thread John Beckett
rudrab wrote:
 I am trying to put insrt_frame at the current cursor position
 when F12 is pressed what should i do?
 map F12: call insrt_frame()
 fun! insrt_frame()
   :put='\begin{frame}'
   :put='\frametitle{Motivation}'
   :put='\end{frame}'
 endf

Here is the complete code. In normal mode, press F12 to insert
the three lines after the current line.

nnoremap F12 :call Insert_frame()CR
function! Insert_frame()
  put='\begin{frame}'
  put='\frametitle{Motivation}'
  put='\end{frame}'
endfunction

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Visual Mode Selection in Windows 7

2013-02-08 Thread John Beckett
Roy Fulbright wrote:
 I tried hjkl, but they lose the selection the same as
 the arrow keys.

Please delete excessive text when replying. Don't quote a chain
of previous messages, and make sure to delete email addresses.

David Fishburn mentioned the two alternatives:
(1) Press v then move cursor for character selection.
(2) Press Ctrl-V (or Ctrl-Q if Ctrl-V used for paste)
then move cursor for block selection.

A third alternative is to press V for line selection.

Like most regulars here I fixed up my vimrc file years ago and
have forgotten exactly what a default Windows install does. The
problem of the selection being lost when moving the cursor is
probably due to settings in vimrc that make Vim's selection work
like Notepad (and other Windows apps). In Notepad, moving the
cursor without holding down Shift removes the selection.

These are the problem lines:

source $VIMRUNTIME/mswin.vim
behave mswin

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Script to send selected text from Vim to R in Ubuntu

2013-02-05 Thread John Beckett
Josef Montag wrote:
 I have started using Ubuntu and try to figure out ways and
 tools for a simple script. I use Vim to write code for R and
 need a script that takes a selection in Vim and sends it to R
 and have this script attached to a key combination. I'm not
 sure whether this could all be done in Vimscript or I should
 look elsewhere.

An example using Python is here:
http://vim.wikia.com/wiki/Use_filter_commands_to_process_text

To make a mapping of the command in the example, you could do:

:vnoremap F8 !python sortwords.pyCR

John

-- 
-- 
You received this message from the vim_use 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_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




RE: Yank part of line?

2013-01-12 Thread John Beckett
stosss wrote:
 This appears to be the only thing in help that seems to imply
 you can yank part of a line. But I can't figure out how to
 make that work. Am I wrong about this? Is the only way to
 yank part of a line in visual mode only or search and replace
 if one gets technical?

 (text from :help y)

An example of what is wanted would help make sense of this.
Do you mean in a script?
Yank which part of a line (how defined)?

In normal mode, you can of course move the cursor to somewhere
within the line and type y$ to yank to the end, or y0 to yank to
the beginning, and lots more things.

John

-- 
You received this message from the vim_use 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


RE: vim_use in evolution(gnome)

2013-01-09 Thread John Beckett
Mats Bertil Tegner wrote:
 I generally read newsgroups in evolution. The server I use is
 eternal-september.org, that claims to provides free read and
 write access to all text newsgroups.. I can read others in
 google groups like in comp.lang.*. But vim_use is not there.
 Can anyone managed to subscribe vim_use in
 evolution/thunderbird? (I am not interested in RSS)

 Sending an email to vim-subscr...@vim.org should do the trick.

No, only an individual can subscribe (and if someone managed to
subscribe an external service that allowed anyone to post, I
imagine that a manager would unsubscribe the sevice when the
inevitable abuse occurred).

The OP provided a quote about text newsgroups. However, this
mailing list is a Google Group, and while Google pretended they
were similar at one stage, in fact they are totally different
because, among other things, most newsgroups are unmoderated.

John

-- 
You received this message from the vim_use 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


RE: Command history

2013-01-06 Thread John Beckett
Laskhara Singh wrote:
 How do I recall the keystrokes history?

In Vim, a command history is a log of the Ex commands entered
(those commands that with :, like :tabe or :help :tabe.

As stated, you can see that history by typing q:
See
http://vim.wikia.com/wiki/Using_command-line_history

I suspect you may have meant the weird keys you can type in
normal mode that can sometimes do interesting things. There is
no log of those keys.

You could kludge a log by recording a macro, see
http://vim.wikia.com/wiki/Macros

Or you could use a command line argument when starting Vim,
for example:

gvim -w keylog.txt file.txt

In the above, you are editing file.txt, and keys typed will be
written to keylog.txt.

I don't think either of these techniques would be helpful as
what you really want to know is what were the last few keys I
typed?, and that's not particularly easy to answer in a helpful
manner.

John

-- 
You received this message from the vim_use 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


RE: spam

2012-12-27 Thread John Beckett
The message (no subject) that I am replying to consisted of a
single line which was a link to some website. It was almost
certainly spam, and possibly malware, and almost certainly was
spoofed (that is, the sender was NOT Tony).

I have deleted the message from the Google Groups archive (but
it will be archived in many other places), and am replying
simply to alert people that we know it's spam, and all we can do
is wait until Google adjusts their system to reject future
attacks. Google has been MUCH better at rejecting spam in the
last couple of months (managers see a greatly reduced level of
spam attempts reaching the queue of messages needing approval to
be posted, and we haven't had any spoofed spam for a long time).

John

-- 
You received this message from the vim_use 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


RE: Spam from ad...@139.com

2012-12-20 Thread John Beckett
I have no idea why, but it appears that the spam from
ad...@139.com to anyone who posts to vim_use has stopped. As I
mentioned, I have emailed everyone who receives vim_use asking
about the problem (in batches of 60 at a time). Thanks to those
who responded. I unsubscribed 60 members since some of them were
obvious spammers but had not been banned, while others had
permanent mail errors (for example, quite a lot were from
yahoo.com which replied that the account did not exist). I am
not aware of doing anything that might have fixed the spam
problem, but perhaps all the noise caused someone to notice.

Please let me know if anyone receives a new spam from now on.

John

-- 
You received this message from the vim_use 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


RE: regexp

2012-12-18 Thread John Beckett
Cesar Romani wrote:
 If I have the following line:
 a href=http://www.whatever.com;SomeTitle/a

 How to create the file SomeTitle.txt with the content (without the
 dashes):
 
 [InternetShortcut]
 URL=http://www.whatever.com
 

With the cursor on the line, enter:
:s#a href=\(.\{-}\).\{-}/a#[InternetShortcut]\rURL=\1#

John

-- 
You received this message from the vim_use 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


RE: new spam-script uploaded to vim.org

2012-12-17 Thread John Beckett
jeroen wrote:
 This certainly looks like another script which can be
 classified as 'spam':
 http://www.vim.org/scripts/script.php?script_id=4362

Thanks. All related material deleted.

John

-- 
You received this message from the vim_use 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


RE: copy and replace with a slight modification a line several times

2012-12-14 Thread John Beckett
A Loumiotis wrote:
 function! Conva_d(linenr)
   let line = getline(a:linenr)
   let result = []
   for i in [a,b,c,d]
 call add(result, substitute(line, 'x\(\w\)\@!','_' . i, 'g'))
   endfor
   call setline(a:linenr, result[0])
   execute a:linenr . 'put =result[1:]'
 endfunction

From something Ben mentioned, the line:
  execute a:linenr . 'put =result[1:]'

is more cleanly written as:
  call append(a:linenr, result[1:])

John

-- 
You received this message from the vim_use 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


RE: copy and replace with a slight modification a line several times

2012-12-11 Thread John Beckett
A Loumiotis wrote:
 Starting with a file with two lines:

 var1_$x; var2$x-1
 var3x; var4x==1

 I would like to end up with the following seven line file:

 var1_1; var21-1
 var1_2; var22-1
 var1_3; var23-1
 var3_a; var4_a==1
 var3_b; var4_b==1
 var3_c; var4_c==1
 var3_d; var4_d==1

 How could I automate this procedure?

Here is a start which converts the first line of input to the
first three lines of output:

function! Convert(linenr)
  let line = getline(a:linenr)
  let result = []
  for i in range(1, 3)
call add(result, substitute(line, '\$x', i, 'g'))
  endfor
  call setline(a:linenr, result[0])
  execute a:linenr . 'put =result[1:]'
endfunction

With the cursor on the first line of input, following converts
the first line:
  :call Convert('.')

Or, if the first line to be converted is line 12, this works:
  :call Convert(12)

I suspect a complex :s/// with replacement \=... could do the
job, but the script is more maintainable and useful for related
work.

For the second change required, see:
  :help function-list
  :help nr2char()

John

-- 
You received this message from the vim_use 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


RE: copy and replace with a slight modification a line several times

2012-12-11 Thread John Beckett
Ben Fritz wrote:
 ...
 call setline(.,[line,repl1,repl2,repl3])

There is a problem with that because four lines will be inserted
into the buffer, and those lines will OVERWRITE existing lines.
That's why my script used 'setline()' to replace the first line,
and 'put' to insert the extra lines.

John

-- 
You received this message from the vim_use 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


RE: vim insert mode injection

2012-12-10 Thread John Beckett
ping wrote:
 I'm looking at a handy way to insert curr timestamp when
 writing, right in insert mode

The tip for that is:
http://vim.wikia.com/wiki/Insert_current_date_or_time

 E15: Invalid expression: strftime('%c')^\eSNR113_WrapCmdLine()

Don't know about that, but enter the following to find script
113 (too many scripts!):

:scriptnames

John

-- 
You received this message from the vim_use 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


RE: Spam from ad...@139.com

2012-12-02 Thread John Beckett
This is an updated outline of the vim_use spam problem.
Following some email exchanges, I am trying a few things to see
if I can find a solution and may have more updates.

The following uses -at- instead of @ so the Google Groups
web interface will not hide the email addresses.

It appears that every user who emails a message to the vim_use
mailing list receives a junk mail from admin-at-139.com a few hours
later. Each individual can defeat that by flagging the mail as
spam so it is not seen in the future. However, the problem
should be fixed because it is confusing and irritating for each
new poster.

It looks like the following happened:
1. Someone subscribed to vim_use.
2. They set their email to forward messages to
   number-at-139.com (where 'number' is a valid mobile phone
   number in China).
3. They stopped using the mobile number (around July 2012?).
4. Another person was issued the number but (fortunately for
   them), they have not activated the number to receive email.

When a user emails a message to vim_use, Google Groups delivers
that message to each member with the following in the header:
From: Username user-at-example.com
Reply-To: vim_use-at-googlegroups.com

The 139.com mail system should use the Reply-To address,
however they reply to the From: address to alert the sender
that the recipient has not activated their email.

This problem started around 9 July 2012.

John

-- 
You received this message from the vim_use 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


Spam from ad...@139.com

2012-11-29 Thread John Beckett
Does anyone have an archive of mail which includes the spam that
we receive from ad...@139.com? I need to know when that spam
started. I kept a few messages, and the earliest I have is
2012-07-09. Does anyone know of an earlier date? Or, can you say
when it did NOT occur (that is, you posted to vim_use and did
not receive the spam)?

Knowing roughly when it started would allow me to guess which
member needs to be unsubscribed to fix the problem (I would
try emailing them first).

As discussed recently [1], it appears that whenever someone
posts a message to vim_use, the sender receives a junk mail from
ad...@139.com a few hours later. It's easy to defeat that by
flagging the mail as spam so it is not seen in the future.
However, I would like to fix the problem because it is confusing
and irritating for each new poster to have to deal with the
problem.

It looks like the following happened:
1. Someone subscribed to vim_use (say m...@example.com).
2. They set m...@example.com to forward to num...@139.com
   (NUMBER is a valid mobile phone number in China).
3. They stopped using NUMBER.
4. Another person recently was issued NUMBER and they
   know nothing about vim_use.

A very helpful member of vim_use whom I emailed has sent a text
message to NUMBER, which replied with point 4 above.

If anyone has information about when this might have started,
please reply here or email me.

[1] http://groups.google.com/group/vim_use/msg/df4c6a23839627fa

John

-- 
You received this message from the vim_use 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


RE: Email backscatter problem [was: Re: Is Vundle dead?]

2012-11-25 Thread John Beckett
Benjamin R. Haskell wrote:
 Yes, the emails come from ad...@139.com, but they're on 
 behalf of the 13657...@139.com subscriber (so `admin@` is 
 akin to `postmaster@`).

I just had another attempt at working out how the spam
from ad...@139.com is being sent to each person who posts.
As a manager of vim_use I have exported the current subscriber
list which shows
  email address, nickname, time joined, delivery method

The only entry matching the pattern \139\ shows an email
address of the form (the j.smith is made up):
j.smith.139 -at- gmail.com

Three other entries match pattern 139:
1. long user name, mostly digits -at- n5.nabble.com
2. user name of digits -at- qq.com
3. A gmail.com user with 139 in nickname.

No entries match pattern 1365 (my mail has a couple of
mailto links with target 13657854020 -at- 139.com).

Google translate shows this for a spam message:
  When you send mail, the mailbox has not been activated.
  We have to send the SMS notification Ta activation
  mailbox, check your e-mail.

  As of when you receive this message, you activate and
  read the letter sent to the following email as follows:
  ...

Perhaps it is a subscriber using a system that forwards mail
to a 139.com address, or a broken attempt to mirror the vim_use
mailing list inside China, or some scam.

If anyone has some ideas for how to remove this irritation,
or any further checking I might do, please post here or
direct to me.

John

-- 
You received this message from the vim_use 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


RE: UP_CASE_VARIABLE to UpCaseVariable

2012-11-19 Thread John Beckett
Waters, Bill wrote:
 Does anyone have a plugin or clever substitution that will
 convert from an all upper case variable (UP_CASE_VARIABLE) to
 a camel-case variable (UpCaseVariable), and vice versa?

Some suggestions are at:
http://vim.wikia.com/wiki/Converting_variables_to_or_from_camel_case

John

-- 
You received this message from the vim_use 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


RE: UP_CASE_VARIABLE to UpCaseVariable

2012-11-19 Thread John Beckett
David Fishburn wrote:
 Some suggestions are at:
 http://vim.wikia.com/wiki/Converting_variables_to_or_from_camel_case

 I am surprised that didnt reference the keepcase.vim script
 which I think is great.
 http://www.vim.org/scripts/script.php?script_id=6

That script is mentioned at:
http://vim.wikia.com/wiki/Search_and_replace#Special_cases

If someone could describe how it helps with regard to converting
variables to/from camel case, that could be added to the first
tip above. Example commands with a brief statement of what they
do is best.

John

-- 
You received this message from the vim_use 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


RE: shiftround option

2012-11-17 Thread John Beckett
rail shafigulin wrote:
 I'm still no quite clear. So when I set shiftround it moves
 the code by the length of shiftwidth-1 when I use the  or  ?

The way to think of it is this:

If you have :set noshiftround, after adjusting an indent you
may find that the indents are NOT aligned at the standard
positions. The standard positions are those you would get
after indenting text that originally had no indent.

If you have :set shiftround, after adjusting an indent, the
indent will be aligned at a standard position (the indent is
rounded to a multiple of the 'shiftwidth' option).

John

-- 
You received this message from the vim_use 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


RE: capture to file output of :set all?

2012-11-17 Thread John Beckett
Erik wrote:
 Thanks, but:
  :help :redir
  E433: No tags file
  E149: Sorry, no help for :redir

If your help was working, you could use:
:help :helptags
to see:
To rebuild the help tags in the runtime directory
(requires write permission there):
:helptags $VIMRUNTIME/doc

 Found help here:
 http://vim.wikia.com/wiki/Capture_ex_command_output

 Then got:
  E475: Invalid argument: @a

If the following (from the tip) fails, I guess your Vim is
broken:
:redir @a
:set all
:redir END

What does :version show (just the version number and patches
would be a start)?

John

-- 
You received this message from the vim_use 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


RE: Mappings, no idea how to use.

2012-11-17 Thread John Beckett
stosss wrote:
 I did not create this. I have no idea how this works or what
 key strokes trigger it. Can someone help me understand how to
 use it? It looks like there are two or three mappings below.
 Does it go in the .vimrc or somewhere else?

The first extract you posted comes from:
http://vim.wikia.com/wiki/Search_for_visually_selected_text

which was mentioned along with your second extract here:
http://groups.google.com/group/vim_use/browse_thread/thread/6f7b894aa05c5bb7

In the latter, I mentioned that the code is from my vimrc, and
included some usage examples.

John

-- 
You received this message from the vim_use 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


RE: floating problem of eval()

2012-11-12 Thread John Beckett
oversky wrote:
 :echo eval('1/2')
 0

As Danny mentioned, that is not strange as Vim follows the same
concepts as used in the C language (and others) where 1 is an
integer, but 1.0 (both without quotes) is a floating point
number.

You get the same in Python 2.7, where 1/2 also evaluates as 0.

You don't need eval:
:echo 1.0/2
gives
0.5

If you have numbers as strings in variables, you could convert
them to floats like this:
:let n = 1
:let d = 2
:echo str2float(n)/str2float(d)
which gives 0.5.

John

-- 
You received this message from the vim_use 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


RE: Contacting Vim Tips Wiki Admin JohnBeckett

2012-11-09 Thread John Beckett
Suresh Govindachar wrote:
 Hello JohnBeckett,

 Regarding your comments to
 http://vim.wikia.com/wiki/Mappings_to_facilitate_the_creation_of_text
 please see the recent (within past 22 hours) emails in the
 thread Commands from insert mode.

 See also http://vim.wikia.com/wiki/Quick_command_in_insert_mode

The vim_use discussion is:
http://groups.google.com/group/vim_use/browse_thread/thread/ab736b5a399312de

Sorry to have been dismissive in my comment last April at the
wiki. It looks like there are two strong points of view on the
topic, with some wanting to reconfigure Vim so as to avoid
normal mode, with others not seeing the point of that.

I cannot imagine a group of lawyers using Vim (unless they
happen to be familiar with Vim). The fundamental problem is that
if someone has trouble going to normal mode to navigate or
massage text, they will get into trouble when they accidentally
trigger some feature of Vim that confuses them.

At any rate, I would like the tip fixed so the concerns raised
by Fritzophrenic (who added the dodgy tag) are addressed. Then
we could add a note saying that some people like avoiding normal
mode, and some don't, and we could remove the comments and other
old stuff from the page.

John

-- 
You received this message from the vim_use 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


RE: Contacting Vim Tips Wiki Admin JohnBeckett

2012-11-09 Thread John Beckett
 You have misunderstood the issue.  No one is attempting to
 reconfigure vim in any way.  No one is attempting to avoid
 the normal mode.  It is just that while in insert mode, there
 is often a need to do something quick in normal mode and get
 back to insert mode -- the creator of Vim himself recognized
 this need and provided the feature of i_ctrl-o (:help
 i_ctrl-o).  The mappings merely enhance Vim's built in
 feature of i_ctrl-o.

Good, but the tip needs to have a few explanations for people
such as myself who misunderstand it.

Also, a brief outline of the internals would be good. I'm
thinking of the following:

The fundamental mapping that makes full-screen editing possible
imap A-o C-o
imap A-; C-o:

 I do not see the name Fritzophrenic on the wiki page in question.
 By the concerns raised by Fritzophrenic (who added the dodgy
 tag) do you mean the following?:

  Not enough explanation. What is the purpose of each set of
   mappings, and what do they accomplish? What problem is being
   solved?

Yes. After clicking history at the top of the page at
http://vim.wikia.com/wiki/Mappings_to_facilitate_the_creation_of_text

it is possible to work out that Fritzophrenic added that tag in
August 2009 (Fritzophrenic has a user page telling people he is
Ben Fritz, a frequent contributor here).

John

-- 
You received this message from the vim_use 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


RE: Question regarding 'diffput' 'diffget'

2012-10-20 Thread John Beckett
meino.cramer wrote:
 at my work and at home I often I use vimdiff -- its simply great!

 If there is a change in one of the files, which is missing in
 the other file and you want to add the difference to the
 other file, you can diffput the stuff while the cursor is in
 the according lines.

 On the other side there is also a diffget which should work
 from the other files' side.

 But how can I move the cursor on the non-existing lines?

Put the cursor on the line just after the non-existing lines,
then type (in normal mode) do (diff obtain = :diffget).

Or, in the other window, put the cursor on the existing lines,
then type dp (dp = :diffput).

John

-- 
You received this message from the vim_use 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


RE: Replacing current line with last-yanked register

2012-10-16 Thread John Beckett
Ben Fritz wrote:
 The best example that comes to mind:
 http://vim.wikia.com/wiki/Short_mappings_for_common_tasks

 There's also this, which I've never really liked but seems to
 get a lot of traffic:
 http://vim.wikia.com/wiki/Best_Vim_Tips

Best_Vim_Tips is an older version of Zapper's tips mentioned in
another post (with edits at the wiki).

I added the idea here:
http://vim.wikia.com/wiki/Repeat_last_change

although I was also thinking of putting it in the following
(and making it more generic than just replacing a word):
http://vim.wikia.com/wiki/Replace_a_word_with_yanked_text

John

-- 
You received this message from the vim_use 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


RE: Vim + debugger for Python?

2012-10-11 Thread John Beckett
Shay wrote:
 After 39 years of doing things the hard way, I'm committed to
 trying the easy way. For Python, I've been experimenting with
 WingIDE, but am having a hard time getting used to the loss
 of editor functionality. I'm using the WingIDE vim
 personality, but WingIDE is not a dedicated text editor and
 cannot approach vim in that respect.

I am not a serious Python programmer, but I do enough to make a
purchase of the personal WingIDE worthwhile. I find it is
easiest to just edit in Vim, then if things go bad, run Wing to
find a bug. I switch back to Vim (Alt-Tab), edit, then switch
back to Wing, which reloads the source with no fuss, and carry
on. Not very clever, but it works. I also use 'ctags *.py' to
make a tags file every now and then.

John

-- 
You received this message from the vim_use 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


RE: OT: The so called steep learning curve of vim...

2012-10-02 Thread John Beckett
Marc Weber wrote:
 Try Win + R - regedit click on any folder - File export
 - save as .reg file. Then you have a binary format which you
 can open in Vim but which is unreadable for humans. Notepad
 decodes it.

On Windows (or most systems for that matter), your vimrc should
probably start with the following two lines:

set nocompatible
set encoding=utf-8

And, there should be nothing which sets fenc or fencs
(the 'fileencoding' and 'fileencodings' options).

You might have something to set fencs, but the defaults have
been sufficient for my modest needs.

With the above, Vim can correctly read a .reg file. After the
file is open, the following command shows that the .reg file
has file encoding utf-16le:

:set fenc?

John

-- 
You received this message from the vim_use 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


RE: colorschemer release upload failure

2012-09-30 Thread John Beckett
richard emberson wrote:
 I am trying to upload the first release of what I call
 colorschemer
 http://www.vim.org/scripts/add_script_version.php?script_id=4240
 ...
 Now, the colorschemer.zip file is a rather big file: 3.5M.
 Would that prevent me from uploading it?

I don't know about any technical limitations, but is a 3.5M
zip file really a Vim script? There are people who routinely
download new scripts and have a look at them from interest.
They will get a surprise when they find themselves looking
at an unzipped file of several megabytes.

If I understand the situation, your zip is a collection of all
colorscheme scripts from vim.org, with some tool for viewing
them? Similar ideas have been tried in the past, but I think
there are far too many colorschemes for anyone to evaluate.
That's particularly the case when many of them are merely a
minor variation on another scheme, and many are somewhat broken.

It might be more helpful for someone to do an evaluation for
what is good on a system of a certain type, and provide a
preview of, say, fifty of the best schemes. See the links at
the following for how that has been attempted:
http://vim.wikia.com/wiki/Switch_color_schemes

John

-- 
You received this message from the vim_use 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


RE: spam scripts on vim.org

2012-09-25 Thread John Beckett
Bram Moolenaar wrote:
 I think some spamscript were posted to vim.org yesterday:
 http://www.vim.org/scripts/script.php?script_id=4236
 http://www.vim.org/scripts/script.php?script_id=4235
 http://www.vim.org/scripts/script.php?script_id=4234
 http://www.vim.org/scripts/script.php?script_id=4233
 ...

 Thanks for reporting.  I deleted the user, the created
 scripts and the uploaded files.  Let me know if you spot more.

Amazing. I have been checking vim.org twice a day for months and
nothing bad has happened for a long time (the last spam I
deleted was scripts 4107, 4108 in June).

Now I goofed off for 24 hours and this happens!

John

-- 
You received this message from the vim_use 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


RE: spam scripts on vim.org

2012-09-25 Thread John Beckett
Charles Campbell [I think!] wrote:
 I admit that I don't know how to do this, but perhaps the
 anti-spam scheme for the mail-list (all new posters need to
 be approved by our elite, hardworking, and underpaid group of
 moderators, and, after approval, posters would have ready
 access) could be usefully applied to vim.org's list.

I have pondered about a system of moderating stuff at vim.org
(I was thinking of a system that tells a new user they can't
create more than two scripts or two uploads for two days, or
until approved ... and some other complications).

But in reality, there is not enough spam to warrant any messing
around. The last spam I deleted was script 4108 last June, and
Bram just deleted 4233, so that's pretty infrequent, and in both
cases the spam did not last long.

John

-- 
You received this message from the vim_use 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


RE: Create a 1,000,000 byte file with VIM.

2012-09-11 Thread John Beckett
Dotan Cohen wrote:
 I am trying to create a 1,000,000 byte file with VIM. The
 following has VIM using 100% of _both_ my CPUs (Intel
 DuoCore) for almost two hours before I killed  it:
 iaesc100.

Vim is for editing text, not performing arbitrary operations.
One problem with the above (on a normal Vim, if no special
commands have been entered first), is that Vim will try to
maintain an undo list.

Nevertheless, it is possible to have Vim quickly write a file
consisting of a single line of one million 'a' characters:

:call writefile([repeat('a', 100)], 'a.tmp', 'b')

The 'b' option (binary) means there is no newline at the end.
Omit , 'b' if a newline is wanted.

John

-- 
You received this message from the vim_use 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


RE: problems with gf

2012-08-26 Thread John Beckett
David H. Lynch Jr. wrote:
 I use gf heavily to edit the file under the cursor.

 I am working on some projects with filenames that contain
 characters like [ and ] that are not handled by the gf
 command.

As well as tweaking 'isfname' as Tim mentioned, you might
experiment with visually selecting the file name, then
typing gf. Possibly in your application you could devise a
convenient way to do that.

John

-- 
You received this message from the vim_use 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


RE: moving tab pages using maps

2012-08-10 Thread John Beckett
Marcin Szamotulski wrote:
 It is possible and quite easy:

 map A-S-j :tabm +1CR
 map A-S-k :tabm -1CR

I don't think that would work. A mapping to move the current tab
is included here:

http://vim.wikia.com/wiki/Using_tab_pages

John

-- 
You received this message from the vim_use 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


  1   2   3   4   5   6   7   8   >