Gvim in windows not autocompleting tabf arguements
Hi, I have installed Gvim 7.3 on my windows XP and openSUSE 11.3. While in suse doing "tabf $MY" and then tab gives "tabf $MYVIMRC", but in windows "tabf $MY" and then tab is not auto completing. The feature is working fine with "e" command, e.g. "e $MY" and then tab gives "e $MYVIMRC". Does anyone have any idea why could this be happening... Thanks, Vivek Bhat www.vivekbhat.in -- 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: How to open the latest modified file
Hi eliweiq001! On Do, 19 Aug 2010, eliweiq001 wrote: > On 8月19日, 下午7时11分, Christian Brabandt wrote: > > fun! OpenLastModified(...) > > let path=(a:1 ? a:1 : getcwd() ) > > let files=split(glob(path . '/*', 1), '\n') > > call filter(files, '!isdirectory(v:val)') > > call sort(files, "CompareLastModified") > > return files[-1] > > endfun > > > > func! CompareLastModified(a,b) > > return getftime(a:a) == getftime(a:b) ? 0 : getftime(a:a) > getftime > > (a:b) ? 1 : -1 > > endfunc > > > > com! -complete=dir -nargs=? EditLastModified :exe ':tabe ' . > > OpenLastModified() > > #v- > > > > Use :OpenLastModified to open the last modified file in your current > > working directory or optionally use tab completion to use any other > > directory. > > > > Thanks very much! > And exactly I want to open the lastest modified *.c file. > How to put this .c into your function? Search for the * and replace it by *.c > And besides, when I > :call OpenLastModified(1) > > there is an error: > > Error detected while processing function OpenLastModified: > Line 5: > E684: list index out of range: -1 > E15: Invalid expression: files[-1] > What make you think, you were supposed to call it with the parameter 1? The optionally parameter to that function is supposed to be a path. Therefore the command :OpenLastModified was provided, that allows for tabcompleting a directory optionally. regards, Christian -- 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: vimdiff-like highlighting within the same file?
Am 30.06.2010 11:59, schrieb Andrei Popescu: On Mi, 30 iun 10, 11:12:03, Christian Brabandt wrote: On Wed, June 30, 2010 10:52 am, Andrei Popescu wrote: I'm trying to add new features to vim's handling of .po files. How could I highlight the differences between the current msgid and the previous one? I don't understand your question. Can you elaborate, on what the file looks like and where the previous message id comes from? Please show a sample file, with which we can see your problem. What I posted was an excerpt of a .po file. Here is a full "string" with comments: [blank line] #. Type: select #. Description #. :sl5: #: ../s390-dasd.templates:1002 ^^ other stuff, not interesting in this case #, fuzzy fuzzy flag, indicates the original (usually English) msgid (string) has changed #| msgid "" #| "The following disk access storage devices (DASD) are available. Please " #| "select each device you want to use one at a time." ^^ old English msgid msgid "" "The following direct access storage devices (DASD) are available. Please" "select each device you want to use one at a time." ^^^ new English msgid msgstr "" "Următoarele Dispozitive de stocare cu acces la disc (DASD) sunt disponibile." "Vă rugăm să alegeți pe rând fiecare dispozitiv pe care doriți să-l folosiți." ^^^ translation [blank line] "strings" are always separated by (at least) one blank line and a .po file usually contains a lot of them (hundreds or more), which is why I won't post a complete file. A translator must not, ever, touch the "other stuff" and the current msgid. After editing the translation the fuzzy flag must be removed to indicate the translation is ok (handled by po.vim) and the previous msgid becomes useless and is removed as well (I have a patch for po.vim). It would be of great help to the translator to have the differences between the previous and current msgid highlighted, especially in long strings with only small changes. Regards, Andrei Attached script defines a :DiffMsgId command, which attempts to overlay diff highlighting to the current section using matchadd(). E.g. it works on the following section: #| msgid "" #| "The following disk access storage devices (DASD) are available. Please " #| "select each device you want to use one at a time." msgid "" "The following direct access storage devices (DASD) are available. Please" "select each device you want to use one at a time." msgstr "" "Urmatoarele Dispozitive de stocare cu acces la disc (DASD) sunt disponibile." "Va rugam sa alege?i pe rând fiecare dispozitiv pe care dori?i sa-l folosi?i." Not yet tested with UTF-8 -- Andy -- 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 " File: diffmsgid.vim " Created: 2010 Aug 19 " Last Change: 2010 Aug 20 " Rev Days: 1 " Author: Andy Wokula " :DiffMsgId " " look back, find /^#| msgid/ (old English), find /^msgid ""/ (new " English) " " - get the lines " - strip off and remember prefixes, suffixes for each line (only the column " offsets are interesting) " - join the two blocks of lines each into one line " - diff the two joined lines " - go through the diff spec: attach diff attributes to each of the original " lines (may involve splitting of "a" or "c" or "d") " - for each line, turn diff spec into highlighting " TODO " - check with UTF-8 ! com! -bar DiffMsgId call s:DiffMsgId() func! s:DiffMsgId() "{{{ call DiffMsgIdClearMatches() if !executable('diff') echoerr 'DiffTwoLines: no diff program found' return endif let sav_cursor = getpos(".") " --- let oldmsgidlnum = search('^#| msgid ""', 'bW') if oldmsgidlnum == 0 return endif let oldlines = getline(oldmsgidlnum+1, line("'}")-1) if empty(oldlines) return endif let oldleftcolumn = 1 + matchend(oldlines[0], '"') call map(oldlines, 'substitute(v:val, ''^#| "\|"$'', "", "g")') let old = s:NewBlock(oldmsgidlnum+1, oldleftcolumn, oldlines) let newmsgidlnum = search('^msgid ""', "W") if newmsgidlnum == 0 return endif let newlines = getline(newmsgidlnum+1, line("'}")-1) if empty(newlines) return endif let newleftcolumn = 1 + matchend(newlines[0], '"') call map(newlines, 'substitute(v:val, ''^"\|"$'', "", "g")') let new = s:NewBlock(newmsgidlnum+1, newleftcolumn, newlines) let line1 = join(oldlines, '') let line2 = join(newlines, '') " --- let spL1 = split(line1, '\m') let spL2 = split(line2, '\m') let tmpfn1 = tempname() let tmpfn2 = tempname() call writefile(spL1, tmpfn1) call writefile(spL2, tmpfn
Windows version with Python, Ruby and Lua support?
Hi, this is my first post on this list so first I'd like to thank all the Vim contributors for your work on this awesome piece of software that is VIM. That being said, I have a question regarding python, ruby and lua support (or lack thereof) on the official Vim installer for windows. I am trying to use some vim scripts that require python or ruby support (such as command-t) but when I try to use them on a fresh install of Vim 7.3 on windows they do not work. I've searched on the vim webpage for links to the versions that include support for these external languages but I have not found them. I also wonder why the default windows installer does not ship with support for python and ruby. In my opinion the additional file size should not be a problem for most users. So if you could point me to where I could download the versions of vim and gvim that have this language support I would be very grateful. Thank you in advance, Angel -- 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: vimdiff-like highlighting within the same file?
Hi Adam! On Do, 19 Aug 2010, Adam Monsen wrote: > > 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 narrow-region window, type :diffthis […] > > But, IMHO, > * it is cumbersome (unless scripted/mapped, but see below) How would you like the plugin to handle that automatically. If you make good suggestions, I might implement that. regards, Christian -- 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: Windows version with Python, Ruby and Lua support?
On 2010/8/20 17:57, Didly Bom wrote: Hi, this is my first post on this list so first I'd like to thank all the Vim contributors for your work on this awesome piece of software that is VIM. That being said, I have a question regarding python, ruby and lua support (or lack thereof) on the official Vim installer for windows. I am trying to use some vim scripts that require python or ruby support (such as command-t) but when I try to use them on a fresh install of Vim 7.3 on windows they do not work. I've searched on the vim webpage for links to the versions that include support for these external languages but I have not found them. I also wonder why the default windows installer does not ship with support for python and ruby. In my opinion the additional file size should not be a problem for most users. So if you could point me to where I could download the versions of vim and gvim that have this language support I would be very grateful. Thank you in advance, Angel -- 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 Hello, You need to download python26.dll( or python27.dll, I don't remember) from python.org and put it in gvim's directory. Regards, Hong Xu 2010/8/20 -- 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: How to open the latest modified file
On 8月20日, 下午4时35分, Christian Brabandt wrote: > Hi eliweiq001! > > > > And besides, when I > > :call OpenLastModified(1) > > > there is an error: > > > Error detected while processing function OpenLastModified: > > Line 5: > > E684: list index out of range: -1 > > E15: Invalid expression: files[-1] > > What make you think, you were supposed to call it with the parameter 1? > The optionally parameter to that function is supposed to be a path. > Therefore the command :OpenLastModified was provided, that allows for > tabcompleting a directory optionally. > > regards, > Christian Because I don't understand the function, I just copy it and use it. When I type :call OpenL and press Tab, it will change to :call OpenLastModified( another Tab, it will change to:call OpenLastModified(1() one more Tab, it will be:call OpenLastModified(10() one more Tab, it will be:call OpenLastModified(100() one more Tab, it will be:call OpenLastModified(101( .. So I don't know what does it mean. If I :call OpenLastModified() it will say that Undefined variable: a:1 . If I put a directory to be the parameter, it will say Undefined variable too. Such as :call OpenLastModified(D:\) in windows, it will say E121: Undefined variable: D: E116: Invalid arguments for function OpenLastModified Then I try :call OpenLastModified(.\) , it will say E15: Invalid expression: .\) E116: Invalid arguments for function OpenLastModified -- 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: How to open the latest modified file
On 8月20日, 下午4时35分, Christian Brabandt wrote: > Hi eliweiq001! > > > And besides, when I > > :call OpenLastModified(1) > > > there is an error: > > > Error detected while processing function OpenLastModified: > > Line 5: > > E684: list index out of range: -1 > > E15: Invalid expression: files[-1] > > What make you think, you were supposed to call it with the parameter 1? > The optionally parameter to that function is supposed to be a path. > Therefore the command :OpenLastModified was provided, that allows for > tabcompleting a directory optionally. > > regards, > Christian Because I don't understand the function, I just copy it and use it. When I type :call OpenL and press Tab, it will change to :call OpenLastModified( another Tab, it will change to:call OpenLastModified(1() one more Tab, it will be:call OpenLastModified(10() one more Tab, it will be:call OpenLastModified(100() one more Tab, it will be:call OpenLastModified(101( .. So I don't know what does it mean. If I :call OpenLastModified() it will say that Undefined variable: a:1 . If I put a directory to be the parameter, it will say Undefined variable too. Such as :call OpenLastModified(D:\) in windows, it will say E121: Undefined variable: D: E116: Invalid arguments for function OpenLastModified Then I try :call OpenLastModified(.\) , it will say E15: Invalid expression: .\) E116: Invalid arguments for function OpenLastModified -- 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: How to open the latest modified file
By looking at message-id of your emails, it seems you actually sent this and also other posts several times. May I ask what was the reason? -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 -- 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
vim vjde installtion on windows/cygwin
Hi, Please help me out i have googled as much as possible but could not solution yet am getting mad. I want to use vjde in my windows version gvim and cygwin vim i have downloaded vjde from http://www.vim.org/scripts/script.php?script_id=1213 and extrated the vjde under install dir\vimfilesl\plugin in windows and /usr/share/vim/vim72 in cygwin when i start vim and try h vjde it doesnt work please help me out -- 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
Insert one word then exit insert mode
Hi, I'm transitioning to vim after 10+ years of emacs. Is there a way to enter insert mode and automatically leave insert mode after typing a complete word? I realize that this could be accomplished by defining a macro and mapping it to a key but I'd rather learn how to do it the "vi-way" so that my knowledge carries over to places where I haven't set up my own .vimrc oivvio -- http://pipedreams.polite.se/about/ -- 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: How to open the latest modified file
On 8月20日, 下午6时30分, bill lam wrote: > By looking at message-id of your emails, it seems you actually sent this > and also other posts several times. May I ask what was the reason? > > -- > regards, > > GPG key 1024D/4434BAB3 2008-08-24 > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 Yes, I am using google groups to post. I have two posts which has been posted repeatedly for several ones. The first post is because of the network problem, but later I delete them. (How can you see them?) The second time is because , what I have posted looks not so good, I want to compose it, but it seems that I can't edit it after posting. So I posted a new one and delete the older one. -- 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: Gvim in windows not autocompleting tabf arguements
Hi Vivek! On Fr, 20 Aug 2010, Vivek Bhat wrote: > I have installed Gvim 7.3 on my windows XP and openSUSE 11.3. While in suse > doing "tabf $MY" and then tab gives "tabf $MYVIMRC", but in windows "tabf > $MY" and then tab is not auto completing. The feature is working fine with > "e" command, e.g. "e $MY" and then tab gives "e $MYVIMRC". Does anyone have > any idea why could this be happening... I think this is fixed with patch 7.3.2 You can find precompiled binaries from Steve Hall's Cream project http://cream.sourceforge.net/download.html regards, Christian -- 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: How to open the latest modified file
Hi eliweiq001! On Fr, 20 Aug 2010, eliweiq001 wrote: > > > On 8月20日, 下午4时35分, Christian Brabandt wrote: > > Hi eliweiq001! > > > > > > > And besides, when I > > > :call OpenLastModified(1) > > > > > there is an error: > > > > > Error detected while processing function OpenLastModified: > > > Line 5: > > > E684: list index out of range: -1 > > > E15: Invalid expression: files[-1] > > > > What make you think, you were supposed to call it with the parameter 1? > > The optionally parameter to that function is supposed to be a path. > > Therefore the command :OpenLastModified was provided, that allows for > > tabcompleting a directory optionally. > > > > regards, > > Christian > > > Because I don't understand the function, I just copy it and use it. > > > When I type :call OpenL > and press Tab, it will change to :call OpenLastModified( > another Tab, it will change to:call OpenLastModified(1() > one more Tab, it will be:call > OpenLastModified(10() > one more Tab, it will be:call > OpenLastModified(100() > one more Tab, it will be:call > OpenLastModified(101( > .. > > > So I don't know what does it mean. > > If I :call OpenLastModified() > it will say that Undefined variable: a:1 . > > If I put a directory to be the parameter, it will say Undefined > variable too. > > Such as :call OpenLastModified(D:\) in windows, it will say > E121: Undefined variable: D: > E116: Invalid arguments for function OpenLastModified > > Then I try :call OpenLastModified(.\) , it will say > E15: Invalid expression: .\) > E116: Invalid arguments for function OpenLastModified I see. There was 1 small problem. Use this slightly changed version (which only selects C-files): fun! OpenLastModified(...) let path=(!empty(a:1) ? a:1 : getcwd() ) let files=split(glob(path . '/*.c', 1), '\n') call filter(files, '!isdirectory(v:val)') call sort(files, "CompareLastModified") if !empty(files) return ":tabe " . files[-1] else return ":echoerr 'No files found'" endif endfun func! CompareLastModified(a,b) return getftime(a:a) == getftime(a:b) ? 0 : getftime(a:a) > getftime (a:b) ? 1 : -1 endfunc com! -complete=dir -nargs=? EditLastModified :exe OpenLastModified() So please in the command prompt type :EditLastModified followed by Carriage Return. This will open the last modified file from the current working directory (basically the directory that :pwd returns). You can however optionally open the last modified file from a different directory. Therefore you type: :EditLastModified followed by a space followed by a directory, e.g. D:\ followed by a return, e.g: :EditLastModified D:\ When using the 2nd form, you can use your Tab key to complete a directory. Sorry for the confusion. regards, Christian -- 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: vim vjde installtion on windows/cygwin
Hi vicky! On Fr, 20 Aug 2010, vicky b wrote: > Please help me out i have googled as much as possible but could not > solution yet am getting mad. > I want to use vjde in my windows version gvim and cygwin vim i have > downloaded vjde from http://www.vim.org/scripts/script.php?script_id=1213 > and extrated the vjde under install dir\vimfilesl\plugin in windows and > /usr/share/vim/vim72 in cygwin when i start vim and try h vjde it doesnt > work > please help me out Did you run the helptags command? regards, Christian -- 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 one word then exit insert mode
Hi Oivvio! On Fr, 20 Aug 2010, Oivvio Polite wrote: > Is there a way to enter insert mode and automatically leave insert mode > after typing a complete word? > I realize that this could be accomplished by defining a macro and > mapping it to a key but I'd rather learn how to do it the "vi-way" so > that my knowledge carries over to places where I haven't set up my own > .vimrc How about: :inoremap This maps the Space key in insert mode to enter the space and afterwards pressing ESC for leaving insert mode. regards, Christian -- 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: How to open the latest modified file
Hi Christian ! On 8月20日, 下午7时19分, Christian Brabandt wrote: > Hi eliweiq001! > > > I see. There was 1 small problem. Use this slightly changed version > (which only selects C-files): > > fun! OpenLastModified(...) > let path=(!empty(a:1) ? a:1 : getcwd() ) > let files=split(glob(path . '/*.c', 1), '\n') > call filter(files, '!isdirectory(v:val)') > call sort(files, "CompareLastModified") > if !empty(files) > return ":tabe " . files[-1] > else > return ":echoerr 'No files found'" > endif > endfun > > func! CompareLastModified(a,b) > return getftime(a:a) == getftime(a:b) ? 0 : getftime(a:a) > getftime > (a:b) ? 1 : -1 > endfunc > > com! -complete=dir -nargs=? EditLastModified :exe OpenLastModified() > > So please in the command prompt type :EditLastModified followed by > Carriage Return. This will open the last modified file from the current > working directory (basically the directory that :pwd returns). You can > however optionally open the last modified file from a different > directory. Therefore you type: > :EditLastModified followed by a space followed by a directory, e.g. D:\ > followed by a return, e.g: > :EditLastModified D:\ > When using the 2nd form, you can use your Tab key to complete a > directory. > > Sorry for the confusion. > > regards, > Christian It work! I am so happy! Thank you so much!! -- 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: vim vjde installtion on windows/cygwin
Hi Christan, Nope i havent what are the arguments required can you please tell me in detail. On Fri, Aug 20, 2010 at 4:51 PM, Christian Brabandt wrote: > Hi vicky! > > On Fr, 20 Aug 2010, vicky b wrote: > > > Please help me out i have googled as much as possible but could not > > solution yet am getting mad. > > I want to use vjde in my windows version gvim and cygwin vim i have > > downloaded vjde from > http://www.vim.org/scripts/script.php?script_id=1213 > > and extrated the vjde under install dir\vimfilesl\plugin in windows and > > /usr/share/vim/vim72 in cygwin when i start vim and try h vjde it doesnt > > work > > please help me out > > Did you run the helptags command? > > regards, > Christian > > -- > 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 > -- 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: vim vjde installtion on windows/cygwin
Hi vicky! [Fixing quotation, please don't top poste] On Fr, 20 Aug 2010, vicky b wrote: > On Fri, Aug 20, 2010 at 4:51 PM, Christian Brabandt > wrote: > > Did you run the helptags command? > Nope i havent what are the arguments required can you please tell me in > detail. In cygwin, you run :helptags /usr/share/vim/vim72/doc and in Windows Gvim you run :helptags install_directory\vimfiles\doc In general, it is no good idea to extract something into the installation directory of vim. This can be overwritten as soon as you install new Runtime files or a new Vim Version. Therefore one uses the ~/.vim directory (on Unix and a like e.g. Cygwin) or the vimfiles directory (on Windows) regards, Christian -- Die Dicken leben zwar kürzer, aber sie essen länger. -- Stanislaw Jerzy Lec (eig. S. J. de Tusch-Letz) -- 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: vim vjde installtion on windows/cygwin
On Fri, Aug 20, 2010 at 5:19 PM, Christian Brabandt wrote: > Hi vicky! > > [Fixing quotation, please don't top poste] > > On Fr, 20 Aug 2010, vicky b wrote: > > On Fri, Aug 20, 2010 at 4:51 PM, Christian Brabandt > > wrote: > > > Did you run the helptags command? > > > Nope i havent what are the arguments required can you please tell me > in > > detail. > > In cygwin, you run :helptags /usr/share/vim/vim72/doc and in Windows > Gvim you run :helptags install_directory\vimfiles\doc > > In general, it is no good idea to extract something into the > installation directory of vim. This can be overwritten as soon as you > install new Runtime files or a new Vim Version. Therefore one uses the > ~/.vim directory (on Unix and a like e.g. Cygwin) or the vimfiles > directory (on Windows) > > regards, > Christian > Superb got that thanks! > -- > Die Dicken leben zwar kürzer, aber sie essen länger. >-- Stanislaw Jerzy Lec (eig. S. J. de Tusch-Letz) > > -- > 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 > -- 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
How to get a command that comes completely from a mapping into ": register
Hi, I wonder if there a way to access the last command even if it comes from mapping. Vim help says I can't: ": Contains the most recent executed command-line. Example: Use "@:" to repeat the previous command-line command. The command-line is only stored in this register when at least one character of it was typed. Thus it remains unchanged if the command was completely from a mapping. I have a mapping that enables the command mode and prints a command there, so I only need to press enter to execute it. The command doesn't get saved into ": register because I didn't type a single character, fair enough. However if I move the cursor with left or right arrow then it counts as typing and the command get saved. Eh? Any ideas how can I overcome that bug/limitation and access the last command no matter where it comes from? -- 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 http://www.vim.org/maillist.php
Re: How to get a command that comes completely from a mapping into ": register
Am 20.08.2010 15:16, schrieb Aarto Matti: Hi, I wonder if there a way to access the last command even if it comes from mapping. Vim help says I can't: ": Contains the most recent executed command-line. Example: Use "@:" to repeat the previous command-line command. The command-line is only stored in this register when at least one character of it was typed. Thus it remains unchanged if the command was completely from a mapping. I have a mapping that enables the command mode and prints a command there, so I only need to press enter to execute it. The command doesn't get saved into ": register because I didn't type a single character, fair enough. However if I move the cursor with left or right arrow then it counts as typing and the command get saved. Eh? Any ideas how can I overcome that bug/limitation and access the last command no matter where it comes from? :call histadd(":", "MyCmd") :h histadd() -- Andy -- 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: How to get a command that comes completely from a mapping into ": register
Am 20.08.2010 15:50, schrieb Andy Wokula: Am 20.08.2010 15:16, schrieb Aarto Matti: Hi, I wonder if there a way to access the last command even if it comes from mapping. Vim help says I can't: ": Contains the most recent executed command-line. Example: Use "@:" to repeat the previous command-line command. The command-line is only stored in this register when at least one character of it was typed. Thus it remains unchanged if the command was completely from a mapping. I have a mapping that enables the command mode and prints a command there, so I only need to press enter to execute it. The command doesn't get saved into ": register because I didn't type a single character, fair enough. However if I move the cursor with left or right arrow then it counts as typing and the command get saved. Eh? Any ideas how can I overcome that bug/limitation and access the last command no matter where it comes from? :call histadd(":", "MyCmd") :h histadd() ok, this was not a very good suggestion ... try this one: :call feedkeys(":MyCmd\r", "t") Now keys are fed as if typed -> the ":" register is changed. -- Andy -- 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
How to get ruby support for gvim73 on a windows XP machine.
Hi, I'm using gvim73 on windows xp. I tried to use the command-t plugin. This gives the message that vim needs to be compiled with ruby support. I'm a complete newbie on compiling gvim. I understand it's possible on a linux machine. But how to do that on windows XP? Or can you give a ruby.dll or something to get this supported without compiling it? If not, which (open source?) compiler do you need for that on a windows XP machine? Rgds, Jeri -- 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
Silly question maybe: What's the purpose of color schemes
Hi, I see many times people create color schemes for vim. With special names as well. To me personally I have only one scheme with my personal prefferences. And for all my filetypes it's all the same. Why do you use several different color schemes? What does it help you? Why for example do you prefer dark color schemes (black/grey brackground, soft letter colors). I have a white background with black letters, or hard blue, green, red, brown. Very readable (at least that's my opnion) and contrasting keywords, syntax words, strings, ect. Rgds, Jeri -- 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: how to move x inside a function?
Here is the whole script. Encode selected text as html entities. function Encode(str) let out = '' for i in range(strlen(a:str)) let c = a:str[i] let n = char2nr(c) let r = Urndm(0,9) if r > 6 && c != "@" && c != "." let e = c elseif r > 3 let e = printf("%x;",n) else let e = printf("%d;",n) endif let out = out . e endfor return out endfun function ReplaceWithEncoding() let save = @@ normal! gvy let @/ = @@ '<,'>s//\=Encode(@@)/ normal! `< let @@ = save endfun vmap :call ReplaceWithEncoding() -- 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: Silly question maybe: What's the purpose of color schemes
On 08/20/10 10:09, Jeri Raye wrote: To me personally I have only one scheme with my personal prefferences. And for all my filetypes it's all the same. I do the same thing too -- just my "timchase.vim" colorscheme. Very rarely, I'll define a syntax-coloring item on-the-fly for a particular file, but I can't say I do that more than 1-2x in the course of a year. And it doesn't get saved anywhere outside that particular editing session. Why for example do you prefer dark color schemes (black/grey brackground, soft letter colors). For me, I prefer light-on-dark instead of dark-on-light because I find it easier on my eyes -- fewer photons bombarding my optic nerves. It's been my choice ever since I had Turbo Pascal's IDE with the ability to set my color preferences (back in the late 80's or early 90's). My preference would be for my entire PC to use such a colorscheme (including Thunderbird and my browser's defaults), but enough programs break by assuming black text will appear visible, forcing their font-color but not background-color. I've had better success in Linux (than Win32 or Mac) with setting my system (GTK) scheme to be grey-on-black, but some apps still have enough issues with it to use dark-on-light for my defaults. At least Vim (and my xterm/rxvt) allows me to do as I please. -tim -- 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: Silly question maybe: What's the purpose of color schemes
From: Jeri Raye, Fri, August 20, 2010 11:09 am > > Why do you use several different color schemes? What does it help > you? Why for example do you prefer dark color schemes (black/grey > brackground, soft letter colors). Color schemes are helpful to accommodate different ambient light levels. By having an editor/screen brightness similar to the surrounding area, the eye is not forced to adjust when looking away from the screen (at the phone, keyboard, reference card, etc.) and then back again. So if I am in a low lit space, I use a low brightness scheme, and in a bright space, a light one. -- Steve Hall [ digitect dancingpaper com ] -- 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: Silly question maybe: What's the purpose of color schemes
On Fri, 20 Aug 2010, Jeri Raye wrote: > Hi, > > I see many times people create color schemes for vim. > With special names as well. > To me personally I have only one scheme with my personal prefferences. > And for all my filetypes it's all the same. > > Why do you use several different color schemes? I'd be surprised if many people used several different schemes. The point of having color schemes with names is that you can share them with others. Or just to know that you're loading the correct scheme when moving between systems. I would also be surprised if most people created their own schemes from scratch. It's much easier to start with a named scheme[1] and modify it, if you really want to. [1] Color scheme examples (w/ Perl code sample) http://vimcolorschemetest.googlecode.com/svn/html/index-pl.html > What does it help you? > Why for example do you prefer dark color schemes (black/grey > brackground, soft letter colors). > > I have a white background with black letters, or hard blue, green, red, brown. > Very readable (at least that's my opnion) and contrasting keywords, > syntax words, strings, ect. That's roughly my preference too, so I use the 'dual' scheme (actually a version modified to work w/ 256-color terminals, but same difference). When writing code, not much shows up as black, but when composing email, most text is black. -- Best, Ben -- 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: Silly question maybe: What's the purpose of color schemes
On 20/08/10 17:09, Jeri Raye wrote: Hi, I see many times people create color schemes for vim. With special names as well. To me personally I have only one scheme with my personal prefferences. And for all my filetypes it's all the same. Why do you use several different color schemes? What does it help you? Why for example do you prefer dark color schemes (black/grey brackground, soft letter colors). I have a white background with black letters, or hard blue, green, red, brown. Very readable (at least that's my opnion) and contrasting keywords, syntax words, strings, ect. Rgds, Jeri Color schemes in Vim serve the same purpose (and are essentially the same thing) as what may be named "themes" or "skins" in other kinds of software: allowing some variety in the look-and-feel with no change of functionality, so different people may each prefer a different look-and-feel while at the same time they all enjoy the same functionalities (including, in Vim, the ability to change functionality, either at run-time by setting options, or at compile-time by including or excluding features). Myself, I'm "almost" content with the default colors of [g]vim, but not completely, so I've created for my own use a scheme which I called "almost-default" for lack of a better name. I don't think it's worth being made part of the "official" distribution, especially since it includes settings for User1 and User2 (which are used in the 'tabline' function defined in my vimrc), so it is not really self-contained. Best regards, Tony. -- ARTHUR: CHARGE! [The mighty ARMY charges. Thundering noise of feet. Clatter of coconuts. Shouts etc. Suddenly there is a wail of a siren and a couple of police cars roar round in front of the charging ARMY and the POLICE leap out and stop them. TWO POLICEMAN and the HISTORIAN'S WIFE. Black Marias skid up behind them.] HISTORIAN'S WIFE: They're the ones, I'm sure. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD -- 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
if version >= 700 "?vim6.2 and for
I have a .vimrc that is used for vim6.2 thru vim7.3 on Mac Terminal This works to eliminate errror messages for the older vim6.2: if version >= 700 "?vim6.2 ... endif EXCEPT with a new script which has a FOR ... ENDFOR The ENDFOR seems to confused the IF. Is there a workaround? I suppose I could rewrite the script using WHILE -Bill -- 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: Silly question maybe: What's the purpose of color schemes
2010/8/20 Steve Hall : > From: Jeri Raye, Fri, August 20, 2010 11:09 am >> >> Why do you use several different color schemes? What does it help >> you? Why for example do you prefer dark color schemes (black/grey >> brackground, soft letter colors). > > Color schemes are helpful to accommodate different ambient light > levels. By having an editor/screen brightness similar to the > surrounding area, the eye is not forced to adjust when looking away I'm just going to say the same. But other answers in the thread are also true. Also, I can easily imagine som kind of scenario in which people could find useful to have more than one color scheme, for example, for different file types: It is not my case, at leas with vim, but for shell sometimes I change the color scheme of a given console (konsole in my case) to easily distinguish from (to many) others spread on my virtual desktops. For example to avoid closing some important process which must not be interrupted. In the case of vim, for example, you could want to emphatize some file which is periodically accessed by running process which is doing something and want to avoid writting broken/uncomplete version by mistake. Regards. -- Joan Miquel Torres__ Linux Registered User #164872 http://www.mallorcaweb.net/joanmiquel BULMA: http://bulma.net http://breu.bulma.net/?l2301 -- 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: if version >= 700 "?vim6.2 and for
Am 20.08.2010 20:33, schrieb Bee: I have a .vimrc that is used for vim6.2 thru vim7.3 on Mac Terminal This works to eliminate errror messages for the older vim6.2: if version>= 700 "?vim6.2 ... endif EXCEPT with a new script which has a FOR ... ENDFOR The ENDFOR seems to confused the IF. Is there a workaround? I suppose I could rewrite the script using WHILE -Bill Inside a function, Vim6 takes :endfor for :endfunction : " This works with Vim 6.4, but not with Vim 7.1: func! Foo() echo "endfor is endfunction" endfor call Foo() " (from vim_dev, 07.10.2008, Re: hilinks and potentially other script " bugs) Just checked with Vim6.4: outside a function I don't get an error: if v:version >= 700 for str in ['abc', 'def'] echo str endfor endif -- Andy -- 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: Silly question maybe: What's the purpose of color schemes
On Aug 20, 10:09 am, Jeri Raye wrote: > Hi, > > I see many times people create color schemes for vim. > With special names as well. > To me personally I have only one scheme with my personal prefferences. > And for all my filetypes it's all the same. > > Why do you use several different color schemes? > What does it help you? > Why for example do you prefer dark color schemes (black/grey > brackground, soft letter colors). > > I have a white background with black letters, or hard blue, green, red, > brown. Very readable (at least that's my opnion) and contrasting > keywords, syntax words, strings, ect. > I have several different colorschemes, all modifications of one scheme or another grabbed from the official distribution or off the 'net somewhere. I usually only use one at a time, but every month or three I get tired of it and switch to a new scheme. No real reason, just preference. I keep the old ones around for when I get bored again. I do have two practical reasons which I have from time-to-time that make me switch color schemes temporarily, in which case it is nice to have a variety of them installed: 1. When working on a laptop in a brightly-lit environment, I need to experiment with colorschemes for readability 2. My email client at work does not support background colors on text, but it does support foreground colors. When copy-pasting the output of :TOhtml into my mail client at work (for sharing code snippets and such), I need to switch to a scheme with a white background. -- 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: vimdiff-like highlighting within the same file?
> How would you like the plugin to handle that automatically. If you make > good suggestions, I might implement that. Do you mean the narrow region plugin? Actually, that plugin may not be involved at all. Here's a use case for what I'm envisioning. (1) one plain text file in unified diff format is opened in vim (2) vim auto-detects that this is a unified diff file (3) for lines that have changed, the *parts* of lines that have changed are specifically highlighted (similar to the highlighting provided when two files are opened with vimdiff) Here's a mockup: * http://yfrog.com/j1vimintrafilediffhighligp * http://imagebin.ca/view/LmlbQoR.html Bonus use case step: (4) provide keybindings that can (a) cycle through differences (b) cycle through intra-line differences Does that make sense? -- 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
map "if there are more than one tabpage" then :tabnext else w
Hi, I want to write this: map "if there are more than one tabpage" then :tabnext else w How to finish it? Thanks! Regards. -- 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: map "if there are more than one tabpage" then :tabnext else w
On 8月21日, 上午7时57分, eliweiq001 wrote: > Hi, I want to write this: > > map "if there are more than one tabpage" then :tabnext else > w > > How to finish it? > Thanks! > > Regards. Besides, can I fix the width of the labels of every tabpage in the tabpage line ? Regards. -- 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
how do is set wrap for _reading_ a file that was already edited before
opening an existing file that have lines longer than the screen width, how do i format the file for easy reading. i think that the options 'textwidth' and 'wrapmargin' are effective only while editing the file and adding _new_ lines...not for existing lines which will not change whatever value you assign to those options.Am I right? -- View this message in context: http://vim.1045645.n5.nabble.com/how-do-is-set-wrap-for-reading-a-file-that-was-already-edited-before-tp2642934p2642934.html Sent from the Vim - General mailing list archive at Nabble.com. -- 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: Use of buffer
On Thu, Aug 19, 2010 at 11:36:41AM +0200, Marc Weber wrote: > I map m-1 m-2 to tab 1,2 etc. This way I have O(1) access to 3 files or > more I'm currently focusing on. > > " m-X key jump to tab X > for i in range(1,8) > exec 'map '.i.'gt' > endfor I have similar bindings. However :b also works with partial buffer names. So if you have three buffers called "first", "second", "third" :b f is enough to go to the first. Combined with :ls (and some knowledge about opened buffers) this allows very quick access. If you often have to go to the next buffer, these mappings might come in handy as well (but if it's something to be done on all buffers better use a macro or :bufdo): nmap gb :bnext nmap gB :bprev > They may be helpful to you as well. > > Marc Weber Hope this helps, Simon -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9 pgpqf8UVunVJB.pgp Description: PGP signature
i think ive been through this so many times again. i am a user for at least a few months, posted a dozen of times even helped out here and there i already begged last week to be on the group whitelis
this is regarding the nabble webiste.. i think ive been through this so many times again. i am a user for at least a few months, posted a dozen of times even helped out here and there i already begged last week to be on the group whitelist...but still didnt get an answer... what's going on? is it an exclusive club? wish vim had a cool bunch of people like emacs instead of just letting me locked outside for ages.. its disgusing and condescending.. -- 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: how do is set wrap for _reading_ a file that was already edited before
On 08/20/10 19:17, aleCodd wrote: opening an existing file that have lines longer than the screen width, how do i format the file for easy reading. i think that the options 'textwidth' and 'wrapmargin' are effective only while editing the file and adding _new_ lines...not for existing lines which will not change whatever value you assign to those options.Am I right? It depends on whether you want re-wrapping that inserts newlines, or if you just want to visually wrap the lines without effecting their contents (by adding newlines) For the former, you can use :set tw=65 " whatever you want :g/^/norm gqq to reformat each line to the adjusted 'tw' setting. Note that this will not *join* lines as "gqip" would. You could adjust the :global command to something like :g/^\n\to get smart line-breaking that breaks at word-boundaries instead of at the column-boundary. Hope this helps, -tim -- 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: i think ive been through this so many times again. i am a user for at least a few months, posted a dozen of times even helped out here and there i already begged last week to be on the group white
Excerpts from ale's message of Sat Aug 21 02:30:51 +0200 2010: > this is regarding the nabble webiste.. nabble website / white list? What are you talking about exactly? Vim users communicate in different ways: (arbitrary order) a) www.vim.org b) wikia Vim wiki c) irc.freenode.net (channel #vim) d) the mailinglist e) private messages on github .. many more I don't know. I don't know about the nabble webiste. Can you post a link? > i think ive been through this so many times > > again. i am a user for at least a few months, posted a dozen of times > even helped out here and there > i already begged last week to be on the group whitelist... which whitelist? Are you talking about the mailinglist now, or still about nabble? > what's going on? No idea. But I'm sure someone will hear you and try to fix it. > is it an exclusive club? Of course not. > wish vim had a cool bunch of people like emacs instead of just letting > me locked outside for ages.. Get vimpulse - be happy *kidding*. If your serious about this community: Offer your help to fix the trouble to which you were exposed to. I'm sure you're welcome. Marc Weber -- 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: i think ive been through this so many times again. i am a user for at least a few months, posted a dozen of times even helped out here and there i already begged last week to be on the group whit
Птн, 20 Авг 2010, ale писал(а): > this is regarding the nabble webiste.. I think you should send your request directly to webmaster of nabble.com instead of here. Do you actually think that the guys in nabble.com will answer you here? BTW I still think you owed the moderators an apology. -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 -- 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: i think ive been through this so many times again. i am a user for at least a few months, posted a dozen of times even helped out here and there i already begged last week to be on the group whit
i reckon i was confused how this mailing list worked and thought it is the same moderator.. so is there a separate moderator for the nabble website specific to the vim group... or is it general... thanks.. -- View this message in context: http://vim.1045645.n5.nabble.com/i-think-ive-been-through-this-so-many-times-again-i-am-a-user-for-at-least-a-few-months-posted-a-dozo-tp2642941p2642981.html Sent from the Vim - General mailing list archive at Nabble.com. -- 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: i think ive been through this so many times again. i am a user for at least a few months, posted a dozen of times even helped out here and there i already begged last week to be on the group whit
Птн, 20 Авг 2010, aleCodd писал(а): > > i reckon i was confused how this mailing list worked and thought it is the > same moderator.. > so is there a separate moderator for the nabble website specific to the vim > group... > > or is it general... > > thanks.. > I hate to bore you but I still think should ask the webmaster of nabble.com directly. -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 -- 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: Silly question maybe: What's the purpose of color schemes
My 2c. On Aug 21, 3:09 am, Jeri Raye wrote: > Why do you use several different color schemes? > What does it help you? The main use of different colour schemes is for experimentation, trying out schemes till one finds the best. I find this very dependent on the monitor, and use different schemes on some computers. > Why for example do you prefer dark color schemes (black/grey > brackground, soft letter colors). I've always used dark schemes when I can. I find them much easier on the eyes. I think paper white schemes were the result of brainwashing (aka marketing), originally by Apple, that made people think dark screens were old, dinosaur stuff, and then most people prefer what they're used to, and they get used to what they're given. I often have to use light backgrounds to view some websites (black on black is hard to read) and I often wince. With a black background, the colour contrasts in syntax colouring are much stronger, considering light levels. For example, green on white in RGB is #00FF00 on #FF, that's roughly 33% on 100%, a factor of 3. Inverted, magenta on black, #FF00FF on #00, 66% on 0%, is a larger factor. I suppose I should calculate that as 66% on about 8%, the level at which I just fail to read. With a black or quite dark background, there are more usable colours for syntax highlighting. On a white background, colours near yellow or cyan are unreadable, but only blue on black has trouble. Regards, John -- 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