Automatically change encoding when opening file

2012-11-15 Thread BPJ
I regularly get files encoded in UTF16LE sent to me and want them to be automatically converted to UTF8 when opening them. I'm not sure what command to use/put in .vimrc for that though, so I wonder if anybody is already doing this, and how? /bpj -- You received this message from the "vim_use"

答复: how fold all comment line?

2012-11-15 Thread 王军
Hi If do you said, only fold "//" which are at the front of line So I modify ,and like " set fde=getline(v:lnum)=~'\s*\/\/\\\|^\s*$'?1:0" Now it will fold "//" which at back of line. Like this " a = b; //comment -邮件原件- 发件人: vim_use@googlegro

Re: 答复: how fold all comment line?

2012-11-15 Thread Christian Brabandt
(please don't top poste) On Thu, November 15, 2012 10:33, 王军 wrote: > Hi > If do you said, only fold "//" which are at the front of line > > So I modify ,and like " set fde=getline(v:lnum)=~'\s*\/\/\\\|^\s*$'?1:0" you could leave out the first \s*, it doesn't matter here. > Now

Re: _vimrc

2012-11-15 Thread Marcin Szamotulski
On 22:05 Thu 19 Apr , hilal Adam wrote: > I an not sure if this an acceptable request or not. My apologies if not. > Would experts like Ben Fritz, Marcin, Jurgen share their vimrc files with > this forum? > > HA > > -- > You received this message from the "vim_use" maillist. > Do not top-

Re: Automatically change encoding when opening file

2012-11-15 Thread Tony Mechelynck
On 15/11/12 09:18, BPJ wrote: I regularly get files encoded in UTF16LE sent to me and want them to be automatically converted to UTF8 when opening them. I'm not sure what command to use/put in .vimrc for that though, so I wonder if anybody is already doing this, and how? /bpj If a file in UTF

Re: Syntax highlighting

2012-11-15 Thread hilal Adam
From: Charles E Campbell To: vim_use@googlegroups.com Sent: Wednesday, November 14, 2012 9:29 PM Subject: Re: Syntax highlighting Tony Mechelynck wrote: > On 15/11/12 02:03, hilal Adam wrote: >> >> >> Oh. Yes I do. Following lines are included: >> >> filet

vim: how to display a "cross through" line on the text?

2012-11-15 Thread ping
I know vim is an "pure text" editor, not word or rendering system. but currently I have it displaying the bold, italic, underline with an asciidoc syntax highlight file. https://github.com/dagwieers/asciidoc-vim it is surprisingly good in terms of displaying effect and asciidoc syntax complian

Sourcing a visual selection

2012-11-15 Thread Ed Kostas
I need to execute a visual selection of text. What I want is something similar to C-x C-e in Emacs. Then, there is no need to create a VIM source file for a short calculation. However, I don't know very well the machinery of VIM. Therefore, all I was able to do is something like this: function!

Re: Sourcing a visual selection

2012-11-15 Thread Ed Kostas
By the way, I also tried to use the :@ command. In few words, I performed a visual selection, and pressed y. Then I tried to evaluate the " register. Thus: :@" Of course, I did it at the command line. By command line I mean that entry field at the bottom of the page. The :@ operator works when

Re: Sourcing a visual selection

2012-11-15 Thread Ed Kostas
Here is a program that does not work: function! SourceRange() range let @r= join(map(getline(a:firstline, a:lastline),'v:val . "|"') ) @r endfunction command! -range Lop , call SourceRange() -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below

Re: Sourcing a visual selection

2012-11-15 Thread Salman Halim
On Friday, November 16, 2012, Ed Kostas wrote: > Here is a program that does not work: > > function! SourceRange() range > let @r= join(map(getline(a:firstline, a:lastline),'v:val . "|"') ) > @r > endfunction > > command! -range Lop , call SourceRange() > > >From what I understand, the proble

Re: vim: how to display a "cross through" line on the text?

2012-11-15 Thread Christian Brabandt
On Fri, November 16, 2012 04:02, ping wrote: > I know vim is an "pure text" editor, not word or rendering system. > but currently I have it displaying the bold, italic, underline with an > asciidoc syntax highlight file. > https://github.com/dagwieers/asciidoc-vim This syntax script has some nasty

Re: vim: how to display a "cross through" line on the text?

2012-11-15 Thread Tony Mechelynck
On 16/11/12 04:02, ping wrote: I know vim is an "pure text" editor, not word or rendering system. but currently I have it displaying the bold, italic, underline with an asciidoc syntax highlight file. https://github.com/dagwieers/asciidoc-vim it is surprisingly good in terms of displaying effect