Re: how to move x inside a function?

2010-08-19 Thread Bee
On Aug 19, 8:06 pm, Bee <200...@calcentral.com> wrote: > Bee wrote: > > How can the x be moved into the ReplaceWithEncoding() function? > > > This will replace the selected text with the encoded text and restore > > the " register. > > > function ReplaceWithEncoding() > >   let save = @0 > >   let

Re: how to move x inside a function?

2010-08-19 Thread Bee
Bee wrote: > How can the x be moved into the ReplaceWithEncoding() function? > > This will replace the selected text with the encoded text and restore > the " register. > > function ReplaceWithEncoding() > let save = @0 > let @" = Encode(@") > normal P > let @" = save > endfun > > vmap x:c

how to move x inside a function?

2010-08-19 Thread Bee
How can the x be moved into the ReplaceWithEncoding() function? This will replace the selected text with the encoded text and restore the " register. function ReplaceWithEncoding() let save = @0 let @" = Encode(@") normal P let @" = save endfun vmap x:call ReplaceWithEncoding() -Bill

Re: How to open the latest modified file

2010-08-19 Thread eliweiq001
On 8月19日, 下午7时11分, Christian Brabandt wrote: > Hi eliweiq001! > > On Do, 19 Aug 2010, eliweiq001 wrote: > > > I am using a portable edition of gVim in windows. > > I have to open gVim and then open a .c file every time,( for learning > > programing ), so I want a function and map a key to it, t

Re: How to open the latest modified file

2010-08-19 Thread eliweiq001
On 8月19日, 下午10时13分, bill lam wrote: > Чтв, 19 Авг 2010, eliweiq001 писал(а): > > If you want to open the latest modified file by vim, you the use the > RecentFiles.vim plugin (there are some others, but I cannot recall their > names), which can display a list of most recently used files. > > --

Re: How to open the latest modified file

2010-08-19 Thread eliweiq001
On 8月19日, 下午10时13分, bill lam wrote: > Чтв, 19 Авг 2010, eliweiq001 писал(а): > > If you want to open the latest modified file by vim, you the use the > RecentFiles.vim plugin (there are some others, but I cannot recall their > names), which can display a list of most recently used files. > > --

Re: How to open the latest modified file

2010-08-19 Thread eliweiq001
On 8月19日, 下午10时13分, bill lam wrote: > Чтв, 19 Авг 2010, eliweiq001 писал(а): > > If you want to open the latest modified file by vim, you the use the > RecentFiles.vim plugin (there are some others, but I cannot recall their > names), which can display a list of most recently used files. > > --

Re: vimdiff-like highlighting within the same file?

2010-08-19 Thread Adam Monsen
> May I suggest that you look into Christian Brabandt's NarrowRegion plugin. > A procedure, after having installed NarrowRegion: > > * edit buffer > * select lines with V > * :NR(this will make a "narrow region" buffer holding just those lines) > * select other lines with V > * :NR > * in each

Re: Gvim + Win7 + dual monitors

2010-08-19 Thread Bram Moolenaar
Eric Tetz wrote: > Turns out the problem (for me) is not changing buffers, it's changing > fonts (my Vim setup uses custom fonts for certain file types). > > To reproduce: > > gvim -u NONE > :set guifont= It's most likely anything that changes the size of the window. Also adding/removing a sc

Re: vimdiff-like highlighting within the same file?

2010-08-19 Thread Charles Campbell
Adam Monsen wrote: FYI, I also asked this question on stackoverflow.com: http://tinyurl.com/363f8he Someone posted a response to that question. Apparently there's another editor that does highlight intra-line differences in a unified diff file. It's interesting, it works... I tried it out

Re: vimdiff-like highlighting within the same file?

2010-08-19 Thread Adam Monsen
> FYI, I also asked this question on stackoverflow.com: > > http://tinyurl.com/363f8he Someone posted a response to that question. Apparently there's another editor that does highlight intra-line differences in a unified diff file. It's interesting, it works... I tried it out. Having used Vim for

Re: Gvim + Win7 + dual monitors

2010-08-19 Thread Eric Tetz
Turns out the problem (for me) is not changing buffers, it's changing fonts (my Vim setup uses custom fonts for certain file types). To reproduce: gvim -u NONE :set guifont= -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replyin

Re: How to open the latest modified file

2010-08-19 Thread bill lam
Чтв, 19 Авг 2010, eliweiq001 писал(а): > > > On 8月19日, 下午7时11分, Christian Brabandt wrote: > [---=| Quote block shrunk by t-prot: 27 lines snipped |=---] > > > > com! -complete=dir -nargs=? EditLastModified :exe ':tabe ' . > > OpenLastModified() > > #v- > > > > Use :OpenLastModified to open the

Re: What is the function of a 'greater-then' character in an expression

2010-08-19 Thread Tim Chase
On 08/19/10 08:14, Jeri Raye wrote: I'm trying to understand certain expressions in a script. But I can't find out what the function/meaning is of a 'greater-then' character in an expression. So in the expression below, what does the> char do/mean? In other words : What happens when I leaf it o

Re: How to open the latest modified file

2010-08-19 Thread eliweiq001
On 8月19日, 下午7时11分, Christian Brabandt wrote: > Hi eliweiq001! > > On Do, 19 Aug 2010, eliweiq001 wrote: > > > I am using a portable edition of gVim in windows. > > I have to open gVim and then open a .c file every time,( for learning > > programing ), so I want a function and map a key to it, t

Re: ^M character

2010-08-19 Thread dimonomid
Mostafa, i have ^M character when i in Linux editing file in that was created in MS Windows. ^M is just \r symbols. I have removed it by :%s/ \r//g On Aug 19, 10:59 am, "Mostafa S.Ari" wrote: > I have removed all the ^M characters from file but vim still say there > is som ^M characters. I check

Re: How to merge two mappings into one

2010-08-19 Thread Andy Wokula
Am 19.08.2010 14:27, schrieb Jeri Raye: Hi, I have certain scripts in my plugin directory. And for them I have several mappings. Nothing special. But now I want to merge two mappings into one. In script 1 I have a mapping f "{{{ mappings and default options if !hasmapto("SimpleFold_Foldsearch"

Re: netrw autologin

2010-08-19 Thread Charles Campbell
epanda wrote: Hi, I really like using netrw but don't understand how I can set my ftp password in order to gain time. Hello, Please look at :help netrw-start ; it has directions on how to build a .netrc file which your ftp can read and bypass the need to constantly enter the userid+

Re: ^M character -> / CTRL-V CTRL-M

2010-08-19 Thread Mostafa S.Ari
On Thu, Aug 19, 2010 at 4:37 PM, Sven Guckes wrote: > * Mostafa S.Ari [2010-08-19 11:24]: > > this is a vim script file and the message is > > E15 Invalid Expression ""^M > > I search it with /^M but I cant find any pattern. > > searching like this will look for > a capital M right after the beg

What is the function of a 'greater-then' character in an expression

2010-08-19 Thread Jeri Raye
Hi, I'm trying to understand certain expressions in a script. But I can't find out what the function/meaning is of a 'greater-then' character in an expression. So in the expression below, what does the > char do/mean? In other words : What happens when I leaf it out? let g:ruby_simplefold_

Re: ^M character

2010-08-19 Thread Mostafa S.Ari
On Thu, Aug 19, 2010 at 4:52 PM, Reid Thompson wrote: > On Thu, 2010-08-19 at 11:29 +0430, Mostafa S.Ari wrote: > > I have removed all the ^M characters from file but vim still say there > > is som ^M characters. I check the file with cat, more and I couldn't > > see anything. > > Is realy there

How to merge two mappings into one

2010-08-19 Thread Jeri Raye
Hi, I have certain scripts in my plugin directory. And for them I have several mappings. Nothing special. But now I want to merge two mappings into one. In script 1 I have a mapping f "{{{ mappings and default options if !hasmapto("SimpleFold_Foldsearch") map f SimpleFold_Foldsearch en

Re: ^M character

2010-08-19 Thread Reid Thompson
On Thu, 2010-08-19 at 11:29 +0430, Mostafa S.Ari wrote: > I have removed all the ^M characters from file but vim still say there > is som ^M characters. I check the file with cat, more and I couldn't > see anything. > Is realy there some ^M that I can't see them. I use vim 72 under > fedora with en

Re: ^M character -> / CTRL-V CTRL-M

2010-08-19 Thread Sven Guckes
* Mostafa S.Ari [2010-08-19 11:24]: > this is a vim script file and the message is > E15 Invalid Expression ""^M > I search it with /^M but I cant find any pattern. searching like this will look for a capital M right after the beginning of the line. because the '^' stand for the beginning of a li

Re: clippy/vigor warning

2010-08-19 Thread Sven Guckes
* Tim Chase [2010-08-19 13:43]: > On 08/19/10 02:51, Sven Guckes wrote: >> what exactly does it say? >> and why would it say that? >> is it the response to >> a command you had given? >> please tel us about it. > > [Clippy pops up]: > It looks like you're opening a file with > ^M characters in it.

Re: ^M character -> / CTRL-V CTRL-M

2010-08-19 Thread Christian Brabandt
Hi Tim! On Do, 19 Aug 2010, Tim Chase wrote: > [Clippy pops up]: > It looks like you're opening a file with ^M characters in it. Would you > like help? > > (_) Get help removing ^M characters > > (_) Just open the file without help. > > [_] Do not show this message again. Who is the first to pr

Re: ^M character -> / CTRL-V CTRL-M

2010-08-19 Thread Tim Chase
On 08/19/10 02:51, Sven Guckes wrote: what exactly does it say? and why would it say that? is it the response to a command you had given? please tel us about it. [Clippy pops up]: It looks like you're opening a file with ^M characters in it. Would you like help? (_) Get help removing ^M char

Re: How to open the latest modified file

2010-08-19 Thread Christian Brabandt
Hi eliweiq001! On Do, 19 Aug 2010, eliweiq001 wrote: > I am using a portable edition of gVim in windows. > I have to open gVim and then open a .c file every time,( for learning > programing ), so I want a function and map a key to it, then I can > open the file very quickly. > Maybe It would be

Re: netrw autologin

2010-08-19 Thread Christian Brabandt
Hi epanda! On Do, 19 Aug 2010, epanda wrote: > I really like using netrw but don't understand how I can set my ftp > password in order to gain time. Though, I really really don't know netrw, I believe it can make use of a .netrc file. See :h netrw-netrc regards, Christian -- You received thi

Re: ^M character -> / CTRL-V CTRL-M

2010-08-19 Thread Christian Brabandt
Hi Mostafa! On Do, 19 Aug 2010, Mostafa S.Ari wrote: > this is a vim script file and the message is > E15 Invalid Expression ""^M > I search it with /^M but I cant find any pattern. > I source it in another file that when vim start it load and vim at start > time give this errors > I have attache

netrw autologin

2010-08-19 Thread epanda
Hi, I really like using netrw but don't understand how I can set my ftp password in order to gain time. Thank you -- 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

Re: Use of buffer

2010-08-19 Thread Marc Weber
Excerpts from Yoshi's message of Thu Aug 19 00:47:20 +0200 2010: > (I'm not sure if this is a valid question, but let me ask) > > I'm using vim to edit several source files using buffer switch like: > :b [tab] > > But it requires saving the current buffer, and I don't want to save. > Is there any

Re: If I always use mouse under GTK to browse text file in gvim, sometimes gvim stops working.

2010-08-19 Thread H Xu
No, ctrl-c takes no effect. On Wed, Aug 18, 2010 at 4:02 AM, Matt Wozniski wrote: > On Tue, Aug 17, 2010 at 10:11 AM, H Xu wrote: > > > > > > On Tue, Aug 10, 2010 at 12:32 PM, H Xu wrote: > >> > >> On 2010/8/9 16:10, Tony Mechelynck wrote: > >>> > >>> On 08/08/10 18:38, H Xu wrote: > > >

RE: ^M character

2010-08-19 Thread John Beckett
Mostafa S.Ari wrote: > I have removed all the ^M characters from file but vim still > say there is som ^M characters. I check the file with cat, > more and I couldn't see anything. > Is realy there some ^M that I can't see them. I use vim 72 > under fedora with enhanced comiplation mode. See http:

Re: ^M character -> / CTRL-V CTRL-M

2010-08-19 Thread John Little
>  RslToolsConfigure.vim That's a dos file, and I presume you're trying to source it a non-dos vim. Vim on *nix can edit files with dos line endings, but it can't source them. To fix open the file in vim, :set ff=unix and save it. The fixed file will work back in windows, too. Regards, John

Re: ^M character -> / CTRL-V CTRL-M

2010-08-19 Thread bill lam
Чтв, 19 Авг 2010, Mostafa S.Ari писал(а): > Thank you Sven > > this is a vim script file and the message is > E15 Invalid Expression ""^M > I search it with /^M but I cant find any pattern. > I source it in another file that when vim start it load and vim at start > time give this errors > I have

Re: ^M character -> / CTRL-V CTRL-M

2010-08-19 Thread Mostafa S.Ari
Thank you Sven this is a vim script file and the message is E15 Invalid Expression ""^M I search it with /^M but I cant find any pattern. I source it in another file that when vim start it load and vim at start time give this errors I have attached the file On Thu, Aug 19, 2010 at 12:21 PM, Sven

Re: How to open the latest modified file

2010-08-19 Thread eliweiq001
I am using a portable edition of gVim in windows. I have to open gVim and then open a .c file every time,( for learning programing ), so I want a function and map a key to it, then I can open the file very quickly. Maybe It would be better that the function can both run in windows and linux. On

Re: How to open the latest modified file

2010-08-19 Thread Sven Guckes
* eliweiq001 [2010-08-19 09:51]: > I want to write a function in vimrc that can open > the lastest modified file in the current directory, > Is it easy to do it? How to write it? what is your goal? does it have to be a function within vim? is this a test for programming in vim? because most goo

Re: ^M character -> / CTRL-V CTRL-M

2010-08-19 Thread Sven Guckes
* Mostafa S.Ari [2010-08-19 09:08]: > I use vim 72 under fedora with enhanced comiplation mode. > I have removed all the ^M characters from file which file? and how? > but vim still say there is som ^M characters. what exactly does it say? and why would it say that? is it the response to a com

How to find a lastest moified file and open it ?

2010-08-19 Thread eliweiq001
I want to write a function in vimrc that can open the lastest modified file in the current directory, Is it easy to do it ? How to write it ? Thanks. -- 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 informatio