question about variable in autoload

2011-01-12 Thread winterTTr
I have a script such a.vim in autoload directory, and the file content is as below: begin--- let a#foo = 1 function! a#FooFunc() echo a#foo endfunction -end- But when i call this function with command :call a#FooFunc() I always get the

Re: question about variable in autoload

2011-01-12 Thread winterTTr
= 1 and your fuction must be: function! a#FooFunc() echo g:a#foo echo s:a#foo endfunction read help: :h g:var :h l:var :h s:var 2011-01-13 Thanks for all your answer. :-) ifys0325 发件人: winterTTr 发送时间: 2011-01

clear buffer content via py3

2010-11-09 Thread winterTTr
I recently use py3 in vim and try to accomplish some function. I remember that in py( which means python2 ), we can clear the current buffer by : :py vim.current.buffer[:] = [] OR: :py del vim.current.buffer[:] But in py3 now, the former code return a error message, and i can't find other way to

python3 and unicode problem

2010-11-04 Thread winterTTr
I don't know if this is a problem already solved, my vim version on windows is Vi IMproved 7.3 Included patches: 1-29 I found a problem like this, when i use python3 interface to set the buffer content to a sepecific chinese character, some kind of error occured. the code is like below: :py3

Re: make python os.chdir follow vim autochdir?

2010-08-25 Thread winterTTr
On 25 August 2010 21:19, Reckoner recko...@gmail.com wrote: Hi, I use the autochdir option in VIM and I also utilize VIM's built-in Python interface. Is it possible to have the current directory for the built-in Python interpreter follow VIM's autochdir. For example, when I am editing  a

Re: Do any people use gVim with C.vim in windows?

2010-08-13 Thread winterTTr
On 13 August 2010 18:57, eliweiq001 eliweiq...@gmail.com wrote: I use gvim in windows. C.VIM has a folder named c-support. This folder can only be put in $VIM\vimfiles\  in my compter. If I put this folder in $HOME\vimfiles\ or $HOME\.vim\ , when start gvim it will pop-up a messagebox says

Is there any internal mechanism that convert the accessing key of dictionary to a specific function?

2010-08-12 Thread winterTTr
I mean if there is such mechanism in the vim script itself. OK, maybe the title of this mail is not very clear for you to understand, i just give an example. let foo = {} let foo.var = 100 we can access the value 100 by : echo foo.var echo foo['var'] i just want to know if there is a mechanism

Re: Limiting the range of a search

2010-08-12 Thread winterTTr
On 12 August 2010 17:37, Jürgen Krämer jottka...@googlemail.com wrote: Hi, James Kanze wrote: I'm currently editing some files which contain several more or less independent sets of data.  At any one time, I'm generally working on one, and only one set, delimited as a contiguous range of

Re: Is there any internal mechanism that convert the accessing key of dictionary to a specific function?

2010-08-12 Thread winterTTr
On 13 August 2010 00:55, Tom Link micat...@gmail.com wrote: Or is there an alternate method to accessing dictionary  when the key is not found , instead of showing error directly? You can use get() -- see :help get() I have once created a simple prototype-like library that provides for

Re: Can I rely on purging locks by deepcopy function?

2010-08-09 Thread winterTTr
On Mon, Aug 9, 2010 at 7:01 PM, ZyX zyx@gmail.com wrote: Ответ на сообщение Re: Can I rely on purging locks by deepcopy function?, присланное в 05:16:45 09 августа 2010, Понедельник, отправитель winterTTr: We have different point of views: I consider lock being an attribute of an object

Re: Can I rely on purging locks by deepcopy function?

2010-08-08 Thread winterTTr
On Mon, Aug 9, 2010 at 12:37 AM, ZyX zyx@gmail.com wrote: Consider the following code: let l=[[[]]] lockvar! l call add(l[0][0], l) Results in E741: Value is locked let l2=deepcopy(l) call add(l2[0][0], l) Succeeds Here you can see that deepcopy has purged all locks,

Re: VIM shell command on Windows XP

2010-08-05 Thread winterTTr
On Thu, Aug 5, 2010 at 4:37 PM, EdwardXu edwardxuhui19...@gmail.com wrote: HI, all I'm using gVim on Windows XP. When i type :!xxx.bat , after cmd's running, the black cmd windows left and let me hit any key to close it, this is very annoying, is there any way to avoid this? You can use:

Provide latest gvim.exe of mine

2010-08-02 Thread winterTTr
I compile the vim from the latest source of Mercurial Repository with version 2474. I provide the gvim.exe file download address if anyone want it. Compile by mingw gcc (GCC) 3.4.5 on WindowsXP platform: Support python2.X Support Lua5.1 Support Perl5.6 Download Address: Support Py26:

Is read-only text possible in vim?

2010-07-27 Thread winterTTr
I know that we can use the set nomodifiable to make a buffer read-only, which makes all the text in it not modifiable. But is it possible to make some text in a buffer read-only but not for the whole buffer? I mean maybe we can bind a property to the string ( or text, or character ) , which can

About the lua interface feature

2010-07-19 Thread winterTTr
Lua is really a embedded language with a good efficiency, and the lua running environment is small enough to be embedded in vim executive file.So i am a litter curious about that the lua interface will embed the whole lua virtual machine ( i am not very if i can call it with this words ) into

Re: Limitations of vim-python interface with respect to character encodings

2010-07-18 Thread winterTTr
variable as i know. If you not set that, gvim maybe use the utf8 as default, but i am very sure about this. And if you set the encoding to utf16, the vim should use the utf16 as internal encoding when it read in a file, as i understand. Cheers -Ted On Jul 16, 1:36 am, winterTTr winterttr

Re: Limitations of vim-python interface with respect to character encodings

2010-07-18 Thread winterTTr
On Mon, Jul 19, 2010 at 10:04 AM, Tony Mechelynck antoine.mechelynck@ gmail.com wrote: On 19/07/10 03:20, winterTTr wrote: On Sun, Jul 18, 2010 at 10:02 PM, Tony Mechelynck antoine.mechely...@gmail.com http://gmail.com wrote: On 18/07/10 12:25, winterTTr wrote: On Sun, Jul

Re: Limitations of vim-python interface with respect to character encodings

2010-07-15 Thread winterTTr
On Fri, Jul 16, 2010 at 11:45 AM, Ted cecinemapasdera...@gmail.com wrote: I've recently discovered that there are some limitations with respect to using the python interface to bring non-ascii characters back into vim. For example, this command works as expected: :py vim.command(u'echo

Re: Can vimscript be multithreaded?

2010-07-09 Thread winterTTr
On Fri, Jul 9, 2010 at 8:26 PM, H Xu xusu...@gmail.com wrote: hello everybody, could somebody tell me that vimscript can be multithreaded? thank you! I think, it can not if you just using vimscript. But maybe you can do this with python script internal the vim, i don't try this ever. Xu

Re: Get current word from Python script

2010-05-18 Thread winterTTr
On Wed, May 19, 2010 at 10:15 AM, Yang Zhang yanghates...@gmail.com wrote: How do I get the current word from a Python script? I can get vim.current.window.cursor which is row,col, and I can get vim.current.line, but which character we're in is a computation that considers the tabstop and all

Re: Doing Unix on Windows

2010-04-21 Thread winterTTr
On Thu, Apr 22, 2010 at 10:52 AM, meino.cra...@gmx.de wrote: Hi, at home I am using Vim on Linux. at work I am using Vim on Windows. I am a Unixxer... At work I am not allowed all that nice gimmicks like grep, find, sed etc. which were ported to windows also due to security

Is there a way to check whether a specific autocmd group is empty?

2010-03-04 Thread winterTTr
I just want to check whether a autocmd group is empty and i want to remove it when it is empty. But I don't find the method or a way to do this. Is there a way to check whether a specific autocmd group is empty? Any suggestion is OK. Thanks. -- You received this message from the vim_use

Re: Any limitation of autocmd when the bufdo is processing ?

2010-02-28 Thread winterTTr
On Fri, Feb 26, 2010 at 3:41 PM, winterTTr winterttr@gmail.com wrote: Actually, i meet a problem like below. I tried to update a specific unlisted buffer every time the BufEnter event happens. the Code like below( just an example, not the real code ): I am trying to use the set

Any limitation of autocmd when the bufdo is processing ?

2010-02-25 Thread winterTTr
Actually, i meet a problem like below. I tried to update a specific unlisted buffer every time the BufEnter event happens. the Code like below( just an example, not the real code ): I am trying to use the set eventignore+=BufEnter and set eventignore-=BufEnter to prevent the process from running

Re: screen does not scrolling when moving cursor in function

2010-01-08 Thread winterTTr
On Fri, Jan 8, 2010 at 9:49 PM, Christian Brabandt cbli...@256bit.orgwrote: Hi winterTTr! On Fr, 08 Jan 2010, winterTTr wrote: I am not very sure whether this is a bug of screen update. OR some kind of rule for the vim, sorry i can't find this kind of rule mentioned in the help doc

Re: How to toggle the zoom on a specific window?

2010-01-07 Thread winterTTr
On Fri, Jan 8, 2010 at 1:07 PM, yixiaodaf...@gmail.com yixiaodaf...@gmail.com wrote: Hi, I opened 4 windows with different size on the screen. Sometime, I want to zoom one of them to maximum size and then switch it back to original size by press a key. After searching on the internet, I

About the internal function iconv

2009-11-22 Thread winterTTr
I use vim to read the file which is the attachment of this mail. This file can be read in with the encoding cp936, and thing goes well. When i read the file via “:e ++enc=sjis” ( with a wrong encoding ) , the vim shows conversion error, and the characters get messed. So , the conversion failed by

Re: How to show the wrapped lines like this

2009-11-20 Thread winterTTr
2009/11/20 François Ingelrest francois.ingelr...@gmail.com Hi, On Fri, Nov 20, 2009 at 09:36, winterTTr wrote: and i just want vim not try to show the whole word, it would be better even cut the word Give a try to :set nolinebreak, it should be what you're looking for. Yes , that's

Re: How to translate utf-8 hex to unicode hex?

2009-11-10 Thread winterTTr
On Wed, Nov 11, 2009 at 12:15 PM, Sean maxiangji...@gmail.com wrote: Hi Tony, You are real genius! It simply worked without modification! I added it as part of VimIM plugin online: http://maxiangjiang.googlepages.com/vimim.vim.html }}} VimIM

Re: coding file ANSIUNICODE and reverse

2009-11-06 Thread winterTTr
On Fri, Nov 6, 2009 at 4:31 PM, Paolo Baruffa win...@people.it wrote: to winterTTr: What's the value for the option encoding ? querying :set, encoding doesn't appear - maybe because I don't setted it in .vimrc... querying set encoding, answer is latin1 (which is correct) refreshing

Re: coding file ANSIUNICODE and reverse

2009-11-05 Thread winterTTr
On Thu, Nov 5, 2009 at 9:02 PM, Paolo Baruffa win...@people.it wrote: Hi! I need to perform ANSI/UNICODE commands in my GVIM. I read many docs on the web about and I did set these: -- .vimrc includes -- :set

Re: ctags

2009-11-04 Thread winterTTr
On Wed, Nov 4, 2009 at 5:21 PM, Efraim Yawitz efraim.yaw...@gmail.comwrote: On Wed, Nov 4, 2009 at 9:51 AM, epanda callingel...@hotmail.fr wrote: Hi, I use exhuberant ctags to analyse my project. I encounter the following problem : sometimes, a local var name is repeated in several

Re: ctags

2009-11-04 Thread winterTTr
, winterTTr winterttr@gmail.com wrote: maybe the need is if it is possible to give a better selection filter to the tag command ? I've always wondered how to get a specific class member, i.e., MyClass::myvar or MyClass::myfunc

Re: how to find relationship of function in C code using vim

2009-11-02 Thread winterTTr
On Tue, Nov 3, 2009 at 2:06 PM, frank wang yixiaodaf...@gmail.com wrote: Hi, I used vim for long time and recently I found a usefule software called source insight. It has one feature it is very useful. That is the relation window. If you have a function name, you can click it and select

Problem about the browse command

2009-10-29 Thread winterTTr
There is a problem about the browse command for my gvim now. However, i can not find the reason for it. I remember that , when i run the command :browse w filename to a new buffer, there should be a dialog shown to let me select the file position for saving , but now the dialog does not show any

Re: E16:Incalid

2009-10-28 Thread winterTTr
2009/10/28 anna klein annaklein...@gmail.com: On Wed, Oct 28, 2009 at 1:20 PM, winterTTr winterttr@gmail.com wrote: 2009/10/28 anna annaklein...@gmail.com: Hi, I found error E16:Invalid range. This is how to reproduce it. :function! Foo() :echo foo :endfunction :nmap x

Re: E16:Incalid

2009-10-27 Thread winterTTr
2009/10/28 anna annaklein...@gmail.com: Hi, I found error E16:Invalid range. This is how to reproduce it. :function! Foo() :echo foo :endfunction :nmap x :call Foo()CR If I input x or 2x in  normal mode, it behaves as expected, echoing foo. However, if input 3x or greater range, then

Re: Is it possible to modify the buffer option directly ?

2009-10-26 Thread winterTTr
2009/10/26 Hari Krishna Dara hari@gmail.com: On Sun, Oct 25, 2009 at 7:23 PM, winterTTr winterttr@gmail.com wrote: Hi , I have a question about how to modify the buffer option directly without focus to that buffer or even showing that buffer. OK , i explain my need via a specific

A bug or a misuse with the vim function setbufvar?

2009-10-26 Thread winterTTr
I think you can reproduce the case like this open a new vim : source the code below : ---code 1- call bufnr( PV_LISTBUF_8680477943 ,1 ) call setbufvar( 2 , modifiable , 0 ) call setbufvar( 2 , swapfile , 0 ) call setbufvar( 2 , buftype ,

Is it possible to modify the buffer option directly ?

2009-10-25 Thread winterTTr
Hi , I have a question about how to modify the buffer option directly without focus to that buffer or even showing that buffer. OK , i explain my need via a specific case. For example , the window show as below | | | | win1 |

Re: vimgrep for different file types

2009-10-25 Thread winterTTr
2009/10/26 Steven Woody narkewo...@gmail.com: HI, If I want to do :vimgrep on *.c and *.python but not any other file types, what do I do?  The problem here is I cannot use something like *.[ch] because of the not same length of the extensions. Just split the file pattern into several

Re: Open a file on the current buffer

2009-10-20 Thread winterTTr
2009/10/20 Roald de Vries downa...@gmail.com: On Oct 20, 2009, at 6:51 AM, winterTTr wrote: when we use :e filename , vim always create a new buffer and load the file. But the :r filename just read the content to the current buffer , without associating the file information to the current

Re: Open a file on the current buffer

2009-10-20 Thread winterTTr
2009/10/21 pansz panshi...@routon.com: winterTTr 写道: PS: simply speaking , I would like to open ( not  just read ) a file on the current buffer , without creating a new buffer . I'm wondering what is the difference? why do you want to open without creating a new buffer? you can simply

Open a file on the current buffer

2009-10-19 Thread winterTTr
when we use :e filename , vim always create a new buffer and load the file. But the :r filename just read the content to the current buffer , without associating the file information to the current buffer . Now , I use the bufnr('foo' , 1 ) to create a buffer , and then , i want to load a file (

Is there a vim function to check if a function is allready defined?

2009-10-14 Thread winterTTr
Hi , I have known about the exists() , and it used to check if a variable is defined. So , is there a vim function to check if a function is defined as exists() do to the variable ? --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For

Re: Toggling quickfix window

2009-10-11 Thread winterTTr
There is a autocmd Event of QuickFix They are QuickFixCmdPre” and QuickFixCmdPost I think you could do something at there event . However , maybe there is not a simple way to do what you want , and , you may have to write some vim function for this. 2009/10/12 David Chanters

Re: ctags with correct options from all plugins

2009-10-11 Thread winterTTr
read the doc for there plugin or try to read the code of them and hack it. And , maybe is a better way to set the tag by yourself than to generate the tags with specific plugin itself. 2009/10/12 Nathan Huesken v...@lonely-star.org: Hi, For omnicppcompletion to work correctly, ctags has to

Re: Paste text end of all lines

2009-10-11 Thread winterTTr
try to %s/$/balaba/ 2009/10/12 PSN prakash...@gmail.com: Hi All, My apologies if the same question is asked before. However, i have tried searching but could not find anything. Does any of you know how can i paste some text at the end of each line in a file. Note that the lines need not

a question about map command

2009-10-09 Thread winterTTr
I map a vim key like this nnoremap F1 :call foo()CR and , foo() is a function written by myself. Is there a way to enter the insert-mode after this map is executed , without modifying the map-command itself. i mean , if i can just add some function call in the foo() to do this ?

Re: a question about map command

2009-10-09 Thread winterTTr
:-) 2009/10/10 Charles E Campbell Jr drc...@campbellfamily.biz: winterTTr wrote: I map a vim key like this nnoremap F1 :call foo()CR and , foo() is a function written by myself. Is there a way  to enter the insert-mode after this map is executed , without modifying the map-command itself. i mean

Re: Using EchoFunc while in parameter list

2009-10-08 Thread winterTTr
It seems that , the echofunc try to find the function name with a specific Regular Express(RE) , with which can just match the type , likesSomeFunc( So , it may be possible for you to modify the RE to match a incomplete function type , as SomeFunc(int a, However , i think i you may have

Re: .vimrc Co. on Windows XP

2009-09-29 Thread winterTTr
use $HOME will change something like cygwin and is not good enough i think. So , just define $VIM and $VIMRUNTIME environment variables , it will works For me , as an example VIM== D:\Tools\VIM_72 VIMRUNTIME == D:\Tools\VIM_72\runtime 2009/9/29 meino.cra...@gmx.de: Hi,

to let buffers just open on a specific window

2009-09-29 Thread winterTTr
Is there a way to let the buffer just open on a specific windows ? OK , maybe i should use a example to explain my need. for example , i use vim open 3 file which will cause vim to own three buffers in the buffer list . : ls buffer 1 buffer 2 buffer 3 # just for show , not the output of and

Re: .vimrc Co. on Windows XP

2009-09-29 Thread winterTTr
yes , sometimes it is indeed a good way to make them the same but if you want to separate them , define VIM is another way to do so. :-) 2009/9/30 pansz panshi...@routon.com: winterTTr 写道: use $HOME will change something like cygwin and is not good enough i think. So , just define $VIM