Re: How to avoid number to string auto conversion?

2009-01-10 Thread Sean
On Jan 10, 11:07 pm, "John Beckett" wrote: > Sean wrote: > > let myvariable = 0010 > > printf('%04d',myvariable)='0008' > > printf('%04o',myvariable)='0010' > > > The last is what I really want! > > > The data are from a data file like: > > > > AAAB > > 0010 > > > The number

Re: How to avoid number to string auto conversion?

2009-01-10 Thread Tony Mechelynck
On 11/01/09 02:30, Sean wrote: > Hello, > > Long story short: > > let readonly_list = [' ', '0010 '] > let readonly_pat = "^" . 0010 > > let my_match_index = match(readonly_list, readonly_pat) > > The above result is -1. > But what I want is 1 (the 2nd item on the list) > > It looks th

Re: How to imap a that behaves defferent according conditions?

2009-01-10 Thread StarWing
sorry for my lazy, i use chinese to explain it... 好吧,你应该可以这么做: function! Space() if getline('.')[col('.')-2] !~ '\a' " 加入下面这一行,防止变成继续补全,见:h ctrl-x_ctrl-n \ || pumvisible() return ' ' else let g:old_col = col('.') return "\\" endif en

Re: How to imap a that behaves defferent according conditions?

2009-01-10 Thread StarWing
sorry for my lazy, i use chinese to explain it... 好吧,你应该可以这么做: function! Space() if getline('.')[col('.')-2] !~ '\a' " 加入下面这一行,防止变成继续补全,见:h ctrl-x_ctrl-n \ || pumvisible() return ' ' else let g:old_col = col('.') return "\\" endif en

Re: Font antialiasing on Windows

2009-01-10 Thread Eugene Kirpichov
Please disregard this question: it turned out that enabling ClearType globally is sufficient for me: for some reason, I thought that I don't like ClearType in general, but I was mistaken :) 2009/1/11 Eugene Kirpichov : > Hello! > > Is it possible to enable font antialiasing in gvim on Windows XP?

Font antialiasing on Windows

2009-01-10 Thread Eugene Kirpichov
Hello! Is it possible to enable font antialiasing in gvim on Windows XP? Googling and :helpgrep'ing gave me only antialiasing for MacOS, and also the :a setting for guifont, which, regretfully, also isn't supported under Windows. -- Eugene Kirpichov --~--~-~--~~~---~

RE: How to avoid number to string auto conversion?

2009-01-10 Thread John Beckett
Sean wrote: > let myvariable = 0010 > printf('%04d',myvariable)='0008' > printf('%04o',myvariable)='0010' > > The last is what I really want! > > The data are from a data file like: > > AAAB > 0010 > > The number is , the is multi-byte, and it is one > to many mapping. I d

Re: fuzzyfinder plugin displays very lengthy absolute paths to matching files

2009-01-10 Thread Tony Mechelynck
On 11/01/09 01:26, Jonathan Hartley wrote: > On Sat Jan 10 09:38:51 CST 2009, jonathan hartley wrote: > > I really like the fuzzyfinder plugin, but when my project is located > > within a mediumly deep directory structure, the matched pathnames that > > it displays in its dropdown are abs

Re: how to display devanagari in vim

2009-01-10 Thread Yue Wu
On Sun, 11 Jan 2009 13:34:15 +0800, bill lam wrote: > On Sun, 11 Jan 2009, Tony Mechelynck wrote: >> If you have KDE installed, try and see if konsole displays it correctly? >> Then if it does, you're in business. > > No, I didn't use KDE, I even un-installed the whole gnome desktop > including t

Re: how to display devanagari in vim

2009-01-10 Thread bill lam
On Sun, 11 Jan 2009, Tony Mechelynck wrote: > If you have KDE installed, try and see if konsole displays it correctly? > Then if it does, you're in business. No, I didn't use KDE, I even un-installed the whole gnome desktop including the gnome-terminal. I am going to use gvim instead. Again, tha

Re: how to display devanagari in vim

2009-01-10 Thread bill lam
I finally managed to display devanagari using FreeSans, but all characters occupy double width. I will just use gvim instead, I suppose it is the gtk or pango backend that do the substitution magic. Thanks to everyone's help. -- regards, GPG

Re: how to display devanagari in vim

2009-01-10 Thread Tony Mechelynck
On 10/01/09 16:10, bill lam wrote: > On Sat, 10 Jan 2009, Tony Mechelynck wrote: >> 6. In your xterm, at the shell prompt, type >> >> cat ~/devanagari.txt >> >> This works for me (I see the devanagari glyphs). In the same terminal >> (konsole, actually, in my case), Console Vim correctly disp

Re: Automatically make multiple folds for all text NOT containing search text

2009-01-10 Thread Tony Mechelynck
On 10/01/09 17:09, Tim Chase wrote: [...] > :cnoremap > (getcmdtype()=~'[/?]')?"\r:setlocal fdm=expr > fde=(getline(v:lnum)=~@/)?0:1 fdl=0\r":"\r" > > As always, Tony, thanks for elucidating a new corner of Vim. > > -tim Note that (expression)?0:1 can always be simplified to !(expression)

Re: How to avoid number to string auto conversion?

2009-01-10 Thread Sean
On Jan 10, 6:44 pm, "John Beckett" wrote: > Sean wrote: > > let readonly_list = [' ', '0010 '] > > let readonly_pat = "^" . 0010 > > But the 0010 is parsed as a NUMBER and the result is appended to "^". > > In Vim, the following will display 8: >   :echo 010 > > because (according t

RE: How to avoid number to string auto conversion?

2009-01-10 Thread John Beckett
Sean wrote: > let readonly_list = [' ', '0010 '] > let readonly_pat = "^" . 0010 But the 0010 is parsed as a NUMBER and the result is appended to "^". In Vim, the following will display 8: :echo 010 because (according to the infallible law of the C language), a number beginning wi

Re: how to display devanagari in vim

2009-01-10 Thread bill lam
On Sat, 10 Jan 2009, Christian Ebert wrote: > I believe that's a font limitation. With fixed in xterm I get the > same as you. With dejavu sans mono the characters display just > fine. I also use dejavu sans mono in xterm but it cannot display. Do you mean you get it done in xterm or other newer

How to avoid number to string auto conversion?

2009-01-10 Thread Sean
Hello, Long story short: let readonly_list = [' ', '0010 '] let readonly_pat = "^" . 0010 let my_match_index = match(readonly_list, readonly_pat) The above result is -1. But what I want is 1 (the 2nd item on the list) It looks that the readonly_pat is "transferred" automatically t

Re: How to imap a that behaves defferent according conditions?

2009-01-10 Thread Yue Wu
On Sun, 11 Jan 2009 09:10:12 +0800, StarWing wrote: > > just a problem, in your words, > app| > "|" places the location of cursor, now you press , and it spead > to , but can't find match.then you will find, you can't > input space in this place. > you can have a try. > Yes, that's the correct

Re: How to imap a that behaves defferent according conditions?

2009-01-10 Thread StarWing
just a problem, in your words, app| "|" places the location of cursor, now you press , and it spead to , but can't find match.then you will find, you can't input space in this place. you can have a try. On 1月11日, 上午8时35分, "Yue Wu" wrote: > On Sun, 11 Jan 2009 08:32:08 +0800, StarWing wrote: > >

Re: How to imap a that behaves defferent according conditions?

2009-01-10 Thread Yue Wu
On Sun, 11 Jan 2009 08:32:08 +0800, StarWing wrote: > > you can try supertab.vim > http://www.vim.org/scripts/script.php?script_id=1643 Thanks for advice, but a simple solution like a function with several lines is better, and supertab is just for tab, right? > > On 1月11日, 上午7时24分, "Yue Wu"

Re: How to imap a that behaves defferent according conditions?

2009-01-10 Thread StarWing
you can try supertab.vim http://www.vim.org/scripts/script.php?script_id=1643 On 1月11日, 上午7时24分, "Yue Wu" wrote: > Why I want is, say: > > If the col('.')-1 is a printable ascii charactor, then does the > mapping > in insert mode, if not, then will just insert a > normal > space, is it po

Re: NERDTree converts local filename to absolute

2009-01-10 Thread scrooloose
James, > Following a recent mention of NERDTree here, I've been > experimenting with it.  One problem I have: if I enter the > command ":NERDTree someDir", where "someDir" is a directory in > the current directory, NERDTree opens "/someDir" (which > typically doesn't exist, and isn't what I want,

Re: Question for NERDTree users

2009-01-10 Thread scrooloose
Phil > Next question: when I used the vsplit, the NERDTree window ended up > between the two editing windows. I frequently use a vertical split to > compare two files - it would be more convenient if they were side by > side and the NERDTree window was still on the far left . . Dohhh! I fail.

How to imap a that behaves defferent according conditions?

2009-01-10 Thread Yue Wu
Why I want is, say: If the col('.')-1 is a printable ascii charactor, then does the mapping in insert mode, if not, then will just insert a normal space, is it possible? -- Regards, Van. --~--~-~--~~~---~--~~ You received this message from the "vim_use" m

RE: Easiest way to insert a blank line?

2009-01-10 Thread John Beckett
Chris Bannister wrote: > I did not write that. Sorry, but I don't think I misrepresented anyone, if my understanding of quoting is accepted. Suppose I am replying to JCitizen and my message is: JCitizen wrote: >> > That means that JCitizen wrote "" in reply to someone

Re: dbext oracle connection under windows xp

2009-01-10 Thread David Fishburn
On Sat, Jan 10, 2009 at 5:06 PM, krzysztof cierpisz wrote: > > Just pulled the new version and it rocks. Excellent. > One question to the completion feature. > After pulling all column names into vim dictionary with slc > is it possible to use them in SELECT (or other) part for columns > comple

Re: dbext oracle connection under windows xp

2009-01-10 Thread krzysztof cierpisz
> Chris, I was just about to release version 9.00 of dbext, so good timing. > > I have incorporate Anton's patch in the 9.00 release available now. > > Thanks for reporting the problem. > > Dave Many thanks to both of you. Just pulled the new version and it rocks. One question to the completion

Re: Question for NERDTree users

2009-01-10 Thread Philip Rhoades
To answer my own question . . Philip Rhoades wrote: > scrooloose, > > > scrooloose wrote: >>> In the normal environment, for horizontal or vertical splits the command >>> is ^Ws or ^Wv, so it seems the NERDTree commands should be: >>> >>> s (or gs) >>> >>> and: >>> >>> v (or gv

Re: Question for NERDTree users

2009-01-10 Thread Philip Rhoades
scrooloose, scrooloose wrote: >> In the normal environment, for horizontal or vertical splits the command >> is ^Ws or ^Wv, so it seems the NERDTree commands should be: >> >> s (or gs) >> >> and: >> >> v (or gv) >> >> ? > > Phil, > > You are right that ideally s and v would be

fuzzyfinder plugin displays very lengthy absolute paths to matching files

2009-01-10 Thread jonathan hartley
Hi. I really like the fuzzyfinder plugin, but when my project is located within a mediumly deep directory structure, the matched pathnames that it displays in its dropdown are absolute, and hence too long to see what I'm doing: (see attached fuzzyfind.png, also linked here in case the mailing l

Re: how to display devanagari in vim

2009-01-10 Thread Christian Ebert
* bill lam on Saturday, January 10, 2009 at 18:57:43 +0800 > I had no problem in displaying Devanagari using gvim, but inside vim > they just become hollow rectangles, seems missing the glyphs. Does > anyone know how to display them in vim (or xterm for that matter). > > Devanagari sample: > > C

Re: Feature request: IMPORTANT and SIMPLE feature to improve Vim!

2009-01-10 Thread StarWing
i think it's good to make recvfrom has sync/async option, and others all async. because the system() function make the sync calls. we can discuss the interface of functions, and make the patch to Vim, anyone want to join me? if you are in china, you can find me with my QQ number:253727351, or yo

Re: Feature request: IMPORTANT and SIMPLE feature to improve Vim!

2009-01-10 Thread Teemu Likonen
StarWing (2009-01-10 11:22 -0800) wrote: > 1. interaction with other application > executable({expr}) > isconnect({expr}) > connect({expr}) > kill({expr}[, {sid}]) > sendto({expr}, {data}) > recvfrom({expr}, {var}[, {async}]) > [...] so if nobody want to implement it, i want to try, just hope >

Feature request: IMPORTANT and SIMPLE feature to improve Vim!

2009-01-10 Thread StarWing
i have thinked for a long time, and make it more confortable. just save it in a file, and open with Vim. something changed in this version. okay, i used Vim for years, and I really really love her. i'm a script-writer, so i want to create everything with vim-script, it's wonderful, i know, but ne

Re: Feature request: IMPORTANT and SIMPLE feature to improve Vim!

2009-01-10 Thread StarWing
just another time, for baddly format :( okay, i used Vim for years, and I really really love her. i'm a script-writer, so i want to create everything with vim-script, it's wonderful, i know, but need improved. i think add these feature are very simple(i will give the reason), and these can make a

Feature request: IMPORTANT and SIMPLE feature to improve Vim!

2009-01-10 Thread StarWing
just post to vim_dev, but need auditing now, so i send a copy here. okay, i used Vim for years, and I really really love her. i'm a script- writer, so i want to create everything with vim-script, it's wonderful, i know, but need improved. i think add these feature are very simple(i will give the

Re: Automatically make multiple folds for all text NOT containing search text

2009-01-10 Thread Tim Chase
Tony Mechelynck wrote: > On 09/01/09 18:22, Tim Chase wrote: >> There's also not a distinction for command-line mappings to >> discern a "search" command-line from a "colon" command-line, so I >> can't use a mapping to do something like (assuming "scnoremap" >> was a search-command-line >> >>

Re: how to display devanagari in vim

2009-01-10 Thread bill lam
On Sat, 10 Jan 2009, Tony Mechelynck wrote: > 6. In your xterm, at the shell prompt, type > > cat ~/devanagari.txt > > This works for me (I see the devanagari glyphs). In the same terminal > (konsole, actually, in my case), Console Vim correctly displays all > glyphs too. (The font I'm us

Re: NERDTree converts local filename to absolute

2009-01-10 Thread Marvin Renich
* James Kanze [090109 20:10]: > > On Jan 10, 12:46 am, Tony Mechelynck wrote: > > You could e.g. use ":set columns+=50" when calling whatever > > opens the vertically split window, in order to set the GUI > > screen to 50 columns more than before or to the full width of > > your monitor, whichev

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Yue Wu
On Sat, 10 Jan 2009 22:42:09 +0800, Andy Wokula wrote: > func! FuncExec(cmd) > exec a:cmd > return "" > endfunc Wow, I didn't know it can be used in this way, thank you! -- Regards, Van. --~--~-~--~~~---~--~~ You received this message from the "vim_use"

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Andy Wokula
Yue Wu schrieb: > On Sat, 10 Jan 2009 22:03:02 +0800, Andy Wokula wrote: > >> Yue Wu schrieb: >>> As title. >>> >> :h i_ctrl-r_= >> > > No, it isn't what I want, for example, how do you avoid triggering > insertLeav/Enter to save current file via :w? you wanted to call a function iirc ... a f

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Yue Wu
On Sat, 10 Jan 2009 22:10:13 +0800, Tony Mechelynck wrote: > > On 10/01/09 14:20, Yue Wu wrote: >> On Sat, 10 Jan 2009 21:14:15 +0800, Tony Mechelynck wrote: >> >>> Wait, I've remembered something: >>> >>> see >>> :help autocmd-disable >>> :help :noautocmd >>> :help 'eventignore' >>>

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Yue Wu
On Sat, 10 Jan 2009 22:03:02 +0800, Andy Wokula wrote: > > Yue Wu schrieb: >> As title. >> > > :h i_ctrl-r_= > No, it isn't what I want, for example, how do you avoid triggering insertLeav/Enter to save current file via :w? -- Regards, Van. --~--~-~--~~~---~--~--

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Tony Mechelynck
On 10/01/09 14:20, Yue Wu wrote: > On Sat, 10 Jan 2009 21:14:15 +0800, Tony Mechelynck wrote: > >> Wait, I've remembered something: >> >> see >> :help autocmd-disable >> :help :noautocmd >> :help 'eventignore' >> > > Still not so useful, because set them when in insert mode still ne

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Andy Wokula
Yue Wu schrieb: > As title. > :h i_ctrl-r_= -- Andy --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Yue Wu
On Sat, 10 Jan 2009 21:14:15 +0800, Tony Mechelynck wrote: > > Wait, I've remembered something: > > see > :help autocmd-disable > :help :noautocmd > :help 'eventignore' > Still not so useful, because set them when in insert mode still need to use which will trigger event anywa

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Tony Mechelynck
On 10/01/09 13:52, Yue Wu wrote: > On Sat, 10 Jan 2009 20:18:15 +0800, Tony Mechelynck wrote: > >> On 10/01/09 10:08, Yue Wu wrote: >>> As title. >>> >> Hitting Ctrl-C in Insert mode goes back to Normal mode without >> triggering InsertLeave. You can then call your function. I don't think >> it's

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Yue Wu
On Sat, 10 Jan 2009 20:18:15 +0800, Tony Mechelynck wrote: > > On 10/01/09 10:08, Yue Wu wrote: >> As title. >> > > Hitting Ctrl-C in Insert mode goes back to Normal mode without > triggering InsertLeave. You can then call your function. I don't think > it's possible to go back into Insert mode a

Re: Cannot map ' to ` in latex-suite

2009-01-10 Thread Ben Schmidt
> ' * =11_LookupCharacter("'") > Last set from ~/.vim/plugin/imaps.vim > > It seems there would be major repercussions to editing that file. Is > there any autocmd I can put in my vimrc that will execute after > latex-suite sets '? It doesn't look like it's set by som

Re: Rules for replying to posts on this list (Was: Easiest way to insert a blank line?)

2009-01-10 Thread BC
On Wed, Jan 7, 2009 at 5:09 AM, John Beckett wrote: > Rather than optimising how people post, I > would be happy simply to stop the recent flood of lazy top posting. > Me too. I don't know how other mail clients behave when it comes to hiding various elements of messages, but for what it's

Re: How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Tony Mechelynck
On 10/01/09 10:08, Yue Wu wrote: > As title. > Hitting Ctrl-C in Insert mode goes back to Normal mode without triggering InsertLeave. You can then call your function. I don't think it's possible to go back into Insert mode afterwards without triggering InsertEnter. Except, of course, in a Vim

Re: how to display devanagari in vim

2009-01-10 Thread Tony Mechelynck
On 10/01/09 11:57, bill lam wrote: > I had no problem in displaying Devanagari using gvim, but inside vim > they just become hollow rectangles, seems missing the glyphs. Does > anyone know how to display them in vim (or xterm for that matter). > > Devanagari sample: > > Character Decimal Chara

how to display devanagari in vim

2009-01-10 Thread bill lam
I had no problem in displaying Devanagari using gvim, but inside vim they just become hollow rectangles, seems missing the glyphs. Does anyone know how to display them in vim (or xterm for that matter). Devanagari sample: Character Decimal Character Hex Name (

Re: Easiest way to insert a blank line?

2009-01-10 Thread Chris Bannister
On Wed, Jan 07, 2009 at 05:42:42PM +1100, John Beckett wrote: > > Chris Bannister wrote: > >> * Remove any email addresses (do not quote the email address of > >> the person to whom you are replying). I did not write that. > > I don't understand this. If you can scan the body, you can > > scan

Re: Rules for replying to posts on this list (Was: Easiest way to insert a blank line?)

2009-01-10 Thread Chris Bannister
On Wed, Jan 07, 2009 at 10:00:51AM -0500, Marvin Renich wrote: > Inter-posting (or interleaved posting) *is* bottom posting[0]. Bottom [..] > [0] http://mailformat.dan.info/quoting/bottom-posting.html No! Bottom posting is just jumping to the end of the message and typing your reply. Proper quot

How to call a function in insertmode without trigger insertLeave/Enter?

2009-01-10 Thread Yue Wu
As title. -- Regards, Van. --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---

Re: Cannot map ' to ` in latex-suite

2009-01-10 Thread Tony Mechelynck
On 10/01/09 00:45, David Karapetyan wrote: > Yes, I'd like to map ' to `, just because it is more conveniently > located on my keyboard. Latex uses ` by default, and it is quite useful; > for example, you can type in `a, and it will expand to \alpha, `b will > expand to \beta, and so on. Here is r