RE: paste via "shift+insert" in gnome-terminal sucks when set fo+=cro

2010-03-19 Thread John Beckett
Ryan J M wrote: > when I paste C code from another vim (located at > another gnome-terminal tab) to my working vim, "shift+insert" > auto commented and aligned the code, which is not what I > want. After a quick search using google, I found a > workaround, ":set paste" before I press > shift+insert

Re: Background task under windows fails

2010-03-19 Thread epanda
I have modified the commands like that in order to take the good targetfile " Test Two let cmd1 = '!start cmd /c "cppCheck ' . a:dir . ' -a -- enable=all --template gcc 1> c:/infos.txt 2> cppcheck.out' let cmd2 = '!start cmd /c "vim --servername ' . v:servername . ' --remote

Re: +/- clientserver

2010-03-19 Thread Tony Mechelynck
On 19/03/10 02:19, MK wrote: On Thu, 18 Mar 2010 21:00:03 -0400 MK wrote: What determines whether clientserver is compiled in? There is nothing about it under "configure --help". apt-get build-dep resolved this (thanks again John) but I am still curious which package would be required, if a

Insert line breaks

2010-03-19 Thread J.Hofmann
Hello, I have a file with one long line. How can I insert a line break every n columns? Thank You Joachim -- 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: Insert line breaks

2010-03-19 Thread Vlad Dogaru
On 03/19/2010 11:25 AM, j.hofm...@e-punkt.eu wrote: > Hello, > > I have a file with one long line. > How can I insert a line break every n columns? You can set 'textwidth' at n columns: :set tw=n Then you can use gqgq to format the current line to obey the textwidth. A side-effect is that (usu

Re: Insert line breaks

2010-03-19 Thread Christian Brabandt
On Fri, March 19, 2010 10:25 am, j.hofm...@e-punkt.eu wrote: > Hello, > > I have a file with one long line. > How can I insert a line break every n columns? To insert a linebreak every 10th column, you could use this substitute expression: :%s/.\{10\}/&\r/g Adjust width according to your need. r

Re: Background task under windows fails

2010-03-19 Thread bill lam
ven, 19 Mar 2010, epanda skribis: > I have modified the commands like that in order to take the good > targetfile > " Test Two > let cmd1 = '!start cmd /c "cppCheck ' . a:dir . ' -a -- > enable=all --template gcc 1> c:/infos.txt 2> cppcheck.out' > let cmd2 = '!start cmd /c "

Re: Background task under windows fails

2010-03-19 Thread epanda
I'am open to some other synchronization scheme ideas -- 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 To unsubscribe from this group, send email to vim_use+u

Re: Background task under windows fails

2010-03-19 Thread bill lam
ven, 19 Mar 2010, epanda skribis: > I'am open to some other synchronization scheme ideas > You could use window wait semaphore api. However a more portable way is running an infinite loop to check for the presence or absence of a particular file, if it fails, sleep for 1 second and then check aga

Using vim as Telnet Client ?

2010-03-19 Thread epanda
Hi, I wonder if it is possible to use Vim as Telnet Client. 1. Connect to a telnet server 2. Analysis some data 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

Sum a colonn of numbers

2010-03-19 Thread epanda
Hi, I have some lines like that foo0.5 foobar 1 bar 1 -- 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 To unsubscribe f

Sum a colonn of numbers

2010-03-19 Thread epanda
Hi, I have some lines like that foo0.5 foobar 1 bar 1 -- 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 To unsubscribe f

Sum a colonn number

2010-03-19 Thread epanda
Hi, I have some lines like that foo0.5 foobar 1 bar0.5 Is it possible to sum which result as 2 by using regexp and writing the result line below all lines checked ? foo0.5 foobar 1 bar0.5 total 2

Re: Sum a colonn number

2010-03-19 Thread Stahlman Family
epanda wrote: Hi, I have some lines like that foo0.5 foobar 1 bar0.5 Is it possible to sum which result as 2 by using regexp and writing the result line below all lines checked ? foo0.5 foobar 1 bar0.5 t

issues with codde completion

2010-03-19 Thread Jagpreet
Hi Vimmers, I'm using code_complete.vim plugin for code completion. I have written my won snippets file but that's not getting executed with the plugin command exec "silent! runtime ".g:user_defined_snippets I suspect this is the only problem, co'z the output of command :scriptnames doesn't sh

Re: Sum a colonn number

2010-03-19 Thread Christian Brabandt
Hi On Fr, 19 Mär 2010, Stahlman Family wrote: > epanda wrote: >> Hi, >> >> I have some lines like that >> >> >> foo0.5 >> foobar 1 >> bar0.5 >> >> >> Is it possible to sum which result as 2 by using regexp and writing >> the result line below all lines ch

Re: Sum a colonn number

2010-03-19 Thread epanda
I am under Windows -- 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 To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or repl

Re: Sum a colonn number

2010-03-19 Thread Stahlman Family
epanda wrote: I am under Windows So am I when I'm at work. That shouldn't prevent you from using Unix tools. In my opinion, if you want to harness the full power of Vim, you should have Cygwin or some other sort of Unix emulation installed, and should have 'shell' pointing to a unix-style

Re: Using vim as Telnet Client ?

2010-03-19 Thread Christian Brabandt
Hi epanda! On Fr, 19 Mär 2010, epanda wrote: > I wonder if it is possible to use Vim as Telnet Client. > 1. Connect to a telnet server > 2. Analysis some data Well you can probably do something like this: :call append('.',system('echo -e "GET /\n" | nc webserver 80')) (I used netcat here, cause

Avoid printing space with cabbrev

2010-03-19 Thread Aarto Matti
Hi, I understand that cabbrev is activated after I press a space bar, but how to avoid printing a space character to command line? -- Aarto -- 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

Re: Using vim as Telnet Client ?

2010-03-19 Thread epanda
On 19 mar, 13:33, Christian Brabandt wrote: > Hi epanda! > > On Fr, 19 M r 2010, epanda wrote: > > > I wonder if it is possible to use Vim as Telnet Client. > > 1. Connect to a telnet server > > 2. Analysis some data > > Well you can probably do something like this: > :call append('.',system('ec

Re: Avoid printing space with cabbrev

2010-03-19 Thread Tim Chase
I understand that cabbrev is activated after I press a space bar, but how to avoid printing a space character to command line? Many characters (I believe anything not in 'iskeyword') can be used to trigger the expansion of an abbreviation. However, if you want it to trigger without inserting

Re: Sum a colonn number

2010-03-19 Thread epanda
Christian, In my lines format I always need the last column that has the number >> let lines=getline(a:firstline, a:lastline) >> map(lines, 'split(v:val)[a:colnr-1]') How can I replace a:colnr by the last fields number in the item of List lines passed into map func ? -- You received this messa

Re: Avoid printing space with cabbrev

2010-03-19 Thread Aarto Matti
On Fri, Mar 19, 2010 at 3:06 PM, Tim Chase wrote: > I understand that cabbrev is activated after I press a space bar, but how >> to >> avoid printing a space character to command line? >> > > Many characters (I believe anything not in 'iskeyword') can be used to > trigger the expansion of an abb

Re: Sum a colonn number

2010-03-19 Thread Tim Chase
epanda wrote: foo0.5 foobar 1 bar0.5 Is it possible to sum which result as 2 by using regexp and writing the result line below all lines checked ? Well, you can sum them in pure vim with either of the following (depending on whether your vim was buil

Re: Cursor column on line 1 not remembered

2010-03-19 Thread Jean Johner
Thank you, Brian and Benjamin. Now things look clear to me (for vim7.2.394) In the Unix distribution, the standard .vimrc (in runtime/ vimrc_example.vim) contains the following code: " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invali

Re: Sum a colonn number

2010-03-19 Thread Christian Brabandt
Hi epanda! On Fr, 19 Mär 2010, epanda wrote: > Christian, > > In my lines format I always need the last column that has the number > > >> let lines=getline(a:firstline, a:lastline) > >> map(lines, 'split(v:val)[a:colnr-1]') > > How can I replace a:colnr by the last fields number in the item of

Re: Sum a colonn number

2010-03-19 Thread epanda
> > >> let lines=getline(a:firstline, a:lastline) > > >> map(lines, 'split(v:val)[a:colnr-1]') > > > How can I replace a:colnr by the last fields number in the item of > > List lines passed into map func ? > > use -1 Works fine out of error 805 use of a float number as a number at this line : cal

Re: issues with codde completion

2010-03-19 Thread Gary Johnson
On 2010-03-19, Jagpreet wrote: > Hi Vimmers, > > I'm using code_complete.vim plugin for code completion. > I have written my won snippets file but that's not getting executed > with the plugin command > > exec "silent! runtime ".g:user_defined_snippets > > I suspect this is the only problem, co'

How to filter a getline(start,end)

2010-03-19 Thread epanda
Hi, I am using a getling to return a List from a range of lines but I would like to filter the List only for lines that contain a number or float number at the end of line. \d\(\.\d\+\)\?$ How can I do this filter ? Thank you -- You received this message from the "vim_use" maillist. Do not t

Re: Cursor column on line 1 not remembered

2010-03-19 Thread Brett Stahlman
On Mar 19, 8:29 am, Jean Johner wrote: > Thank you, Brian and Benjamin. > Now things look clear to me (for vim7.2.394) > In the Unix distribution, the standard .vimrc (in runtime/ > vimrc_example.vim) contains the following code: > >   " When editing a file, always jump to the last known cursor

Filter a list

2010-03-19 Thread epanda
Hi, I am calling filter func on List that contains those lines foo bar foobar 8.0 I would like to keep only lines that contains float or integer numbers just before end character. Thank you -- You received this message from the "vim_use" maillist. Do not top-post! Typ

Re: Filter a list

2010-03-19 Thread Paul
On Fri, Mar 19, 2010 at 09:36:47AM -0700, epanda wrote: I would like to keep only lines that contains float or integer numbers just before end character. :v/\d\+\(\.\d\+\)\?$/d -- . -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you

Re: Popularity of vi/vim

2010-03-19 Thread Tony Mechelynck
On 14/01/10 18:52, Dave Land wrote: [...] Funny how people get so personally invested in what text editor, browser or operating system they use. Dis carpenters snipe at each other for their choice to use Riyobi-vs-Dewalt-vs-Milwaukee power tools? Or before that, SK-vs-Wright-vs-Cooper? Or before

Re: Filter a list

2010-03-19 Thread epanda
On 19 mar, 17:40, Paul wrote: > On Fri, Mar 19, 2010 at 09:36:47AM -0700, epanda wrote: > >I would like to keep only lines that contains float or integer numbers > >just before end character. > > :v/\d\+\(\.\d\+\)\?$/d > > -- > > . And with filter func dedicated for a List ? -- You received t

Re: set keymap to none/default

2010-03-19 Thread Kenneth Reid Beesley
On 18Mar2010, at 22:30, Tony Mechelynck wrote: >> >> I had already tried >> >> :set keymap= >> and >> :set keymap="" >> without success. But your >> >> :let&keymap="" >> >> (adding a second double quote) worked. >> >> Many thanks, >> >> Ken [Tony responds] > > The results of > > :

Re: Sum a colonn number

2010-03-19 Thread Christian Brabandt
Hi epanda! On Fr, 19 Mär 2010, epanda wrote: > Works fine out of error 805 use of a float number as a number at this > line : > call append(a:lastline, printf("total\t%02d", eval(join(lines,'+' Try to use %.2f instead of %02d regards, Christian -- So geht es oft mit einer Unterhaltung: Nac

Re: How to filter a getline(start,end)

2010-03-19 Thread Christian Brabandt
Hi epanda! On Fr, 19 Mär 2010, epanda wrote: > I am using a getling to return a List from a range of lines but I > would like to filter the List only for lines that contain > a number or float number at the end of line. > > \d\(\.\d\+\)\?$ > > > How can I do this filter ? :h filter() regards

Re: Filter a list

2010-03-19 Thread Christian Brabandt
Hi epanda! On Fr, 19 Mär 2010, epanda wrote: > I am calling filter func on List that contains those lines > > foo > > bar > > foobar 8.0 > > > I would like to keep only lines that contains float or integer numbers > just before end character. call filter(list, 'v:val =~

Re: Using vim as Telnet Client ?

2010-03-19 Thread Marc Weber
Excerpts from epanda's message of Fri Mar 19 12:39:52 +0100 2010: > Hi, > > I wonder if it is possible to use Vim as Telnet Client. > 1. Connect to a telnet server > 2. Analysis some data Hi Ependa, There is vimproc and vimshell. You can use both to get minimal terminal like features within Vim.

Re: Sum a colonn number

2010-03-19 Thread epanda
Ok Christian, it works very well. I obtain this result by marking a and then moving my cursor to enlarge the range I want to sum up from mark 'a. But meanwhile, calling directly :'a,.SumLastCol by clicking a menu icon, I would like that first click put mark a then second click do the call as it i

Re: Sum a colonn number

2010-03-19 Thread epanda
In order to define the range by 2 icon's click with the same icon's menu, I have added a called func MarkAndSumLastCol " Fonctions mathématiques utiles {{{1 fu! Sum() range " let beginMessage = "total:" " let lines=getline(a:firstline, a:lastline) call fil

pylint.vim Question

2010-03-19 Thread packet
How does this tool work on gvim? -- 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 To unsubscribe from this group, send email to vim_use+unsubscribegooglegroup

Re: Background task under windows fails

2010-03-19 Thread epanda
I would like to open the second file infos.txt into Gvim without using external api or something else. -- 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 To uns

Re: how to open the file in a specified window when hit enter in quickfix window?

2010-03-19 Thread Tony Mechelynck
On 14/01/10 22:50, Ben Fritz wrote: On Jan 14, 12:41 pm, "yixiaodaf...@gmail.com" wrote: Hi, In my working environment, I have multiple windows opened. Right now, when I find the search and open the quickfix window and type return in quickfix window, it will open the file in the window I do n

Re: Parse file in background

2010-03-19 Thread Tony Mechelynck
On 19/01/10 02:53, KKde wrote: completion-config.file word path.txt word2 path2.txt You want to have a look at :h complete-functions :h readfile (how to read a file and get a list of lines) :h filter( (remove the lines not matching your word by regex) :h matchstr (match the file path ...)