text substitution for all the files opened in vim

2011-02-23 Thread Peng Yu
:%s only perform substitution with a file. Is there a command that can perform substitution in all the files that are opened by a vim session? -- 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

indent and highlight files for BUGS language

2011-05-06 Thread Peng Yu
Hi, It seems that Emacs can handle BUGS language. Some syntax of BUGS language is similar to the syntax R (http://cran.r-project.org/). I'm wondering if there is any vim files that can help handle BUGS files. http://www.mrc-bsu.cam.ac.uk/bugs/weblinks/webresource.shtml ESS (Emacs Speaks

Indentation of perl scripts with the key word 'when' are not correct

2011-06-27 Thread Peng Yu
Hi, It seem that default perl indentation in vim is not correct with 'when' (see example at the end of email). Could anybody let me know how to fix the problem? $ vim --version VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 24 2011 07:07:34) Included patches: 1-35 Modified by

brace in code match brace in comment problem

2011-08-22 Thread Peng Yu
Hi, If you press % at the last '}' you will end up with the '{' in the comment, I'm wondering if there is any way vim can be instructed to treat comment and code separately, so a brace in comment only match one in comment and a brace in code only match one in code. #include stdlib.h #include

path completion after 'export PATH=/tmp' (C-X C-F)

2011-08-24 Thread Peng Yu
Hi, Path completion (C-X C-F) does not recognize /tmp as a path, rather it recognize PATH=/tmp as a path. I'm wondering if there is a way to change this feature of vim? Thanks! export PATH=/tmp Regards, Peng -- You received this message from the vim_use maillist. Do not top-post! Type your

Re: path completion after 'export PATH=/tmp' (C-X C-F)

2011-08-24 Thread Peng Yu
On Wed, Aug 24, 2011 at 8:52 AM, Benjamin R. Haskell v...@benizi.com wrote: On Wed, 24 Aug 2011, Peng  Yu wrote: Hi, Path completion (C-X C-F) does not recognize /tmp as a path, rather it recognize PATH=/tmp as a path. I'm wondering if there is a way to change this feature of vim? Thanks

json indentation

2011-09-05 Thread Peng Yu
Hi, vim doesn't indent json file correctly. I'm not able to find a json vim indent file. Does anybody know if there is one? Thanks, Peng -- 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

How to disable W12?

2011-09-05 Thread Peng Yu
Hi, I want to disable warning message W12. Does anybody know what command to use for disabling it? Thanks, Peng -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit

Re: json indentation

2011-09-06 Thread Peng Yu
On Tue, Sep 6, 2011 at 7:19 AM, Taylor Hedberg tmhedb...@gmail.com wrote: You may have already tried this, but since JSON is just a subset of JavaScript syntax, have you tried setting 'filetype' to javascript? That's the simplest solution that comes to mind, though I don't know whether you

How to disable automatically comment the next line in a cpp file?

2011-09-09 Thread Peng Yu
Hi, Suppose that I am pasting some c++ code in vim (with some comment starting with //). The lines after the comments are also automatically commented, which is very annoy. Is there a way to disable this? Regards, Peng -- You received this message from the vim_use maillist. Do not top-post!

Re: How to disable automatically comment the next line in a cpp file?

2011-09-09 Thread Peng Yu
On Sep 9, 11:16 pm, Gary Johnson garyj...@spocom.com wrote: On 2011-09-09, Peng Yu wrote: Hi, Suppose that I am pasting some c++ code in vim (with some comment starting with //). The lines after the comments are also automatically commented, which is very annoy. Is there a way

Shortcut for convertion between different naming conventions

2011-09-24 Thread Peng Yu
Hi, I'm wondering if there are existing shortcuts in vim for convertion between different name conventions (see example below). I feel that it will will be convenient if there are such shortcuts. OneFileName oneFileName one_file_name one.file.name ONE_FILE_NAME _one_file_name Regards, Peng --

Where is pdf version of Vim Reference Manual? And hyperlinks in PDF Vim User Manual.

2011-09-24 Thread Peng Yu
Hi, I only see a html reference manual for vim. Is there a pdf version available? http://vimdoc.sourceforge.net/htmldoc/help.html#reference_toc http://www.eandem.co.uk/mrw/vim/usr_doc/a4c_bm.zip The above user manual does not have hyperlink. Consider that the html version has hyperlinks, I'd

How to search on the output screen of :highlight?

2011-09-24 Thread Peng Yu
Hi, I'm not sure what mode the output screen of :highlight is in. But I'm not able to perform (I mean by '/'). Is there a way to search in the output? Regards, Peng -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For

Jump between the beginning and the end of a block of python code (such as function, class)?

2011-10-14 Thread Peng Yu
Hi, I language use {} to denote function, class, etc. I can use % to jump between the beginning and end of a block of code. But python doesn't use {}. I'm wondering if there is a way to do so in python? -- Regards, Peng -- You received this message from the vim_use maillist. Do not top-post!

:bd makes syntax highlight of the next window unavailable

2011-10-20 Thread Peng Yu
Hi, Suppose that I open 3 .R files with gvim -o. All the three .R files are correctly syntax highlighted. However, if I use :bd to close one window, the next window's syntax highlight will be gone. If the closed window is the bottom one, then the new bottom window will lose the syntax highlight.

Re: :bd makes syntax highlight of the next window unavailable

2011-10-25 Thread Peng Yu
On Fri, Oct 21, 2011 at 6:21 AM, Thilo Six t@gmx.de wrote: Peng Yu wrote the following on 21.10.2011 03:00 Hello, Suppose that I open 3 .R files with gvim -o. All the three .R files are correctly syntax highlighted. However, if I use :bd to close one window, the next window's syntax

Re: :bd makes syntax highlight of the next window unavailable

2011-10-25 Thread Peng Yu
On Tue, Oct 25, 2011 at 1:06 PM, Thilo Six t@gmx.de wrote: Thilo Six wrote the following on 25.10.2011 19:37 Hello -- snip -- I'm glad it works, but something is wrong here. Syntax highlight is local to a buffer. If you have 3 separate buffers opened in 3 separate Windows, deleting

Shortcut to indent xml

2011-10-27 Thread Peng Yu
Hi, full file indent fun BenIndent() let oldLine=line('.') normal gg=G execute ':' . oldLine endfun map -- :call BenIndent()Barnormal zzCR map -- :call BenIndent()CR I use the above code to indent other file format. I see xml can be indented in the following URL. However, I want to be able

Re: Shortcut to indent xml

2011-10-27 Thread Peng Yu
On Thu, Oct 27, 2011 at 1:45 PM, Gary Johnson garyj...@spocom.com wrote: On 2011-10-27, Ivan Sichmann Freitas wrote: full file indent fun BenIndent()   let oldLine=line('.')   normal gg=G   execute ':' . oldLine endfun map -- :call BenIndent()Barnormal zzCR map -- :call

Re: Shortcut to indent xml

2011-10-27 Thread Peng Yu
On Thu, Oct 27, 2011 at 5:28 PM, Benjamin R. Haskell v...@benizi.com wrote: On Thu, 27 Oct 2011, Peng Yu wrote: On Thu, Oct 27, 2011 at 1:45 PM, Gary Johnson garyj...@spocom.com wrote: On 2011-10-27, Ivan Sichmann Freitas wrote: full file indent fun BenIndent()   let oldLine=line

latest awk indentation file

2011-11-04 Thread Peng Yu
Hi, I only find some a few year old vim indentation file online. I'm not which one is the best. Could anybody let me the latest awk indentation file? Thanks! -- Regards, Peng -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are

How to change word boundary?

2011-11-07 Thread Peng Yu
Hi, * currently doesn't recognize the following as a single word. I think that I need to change iskeyword. But I don't want to explicitly specify iskeyword, rather I want to append -,:,#,/ to iskeyword and toggle it back once I'm done. Could you anybody let me know what is the best way to do so?

Re: How to change word boundary?

2011-11-08 Thread Peng Yu
On Tue, Nov 8, 2011 at 8:24 AM, Andy Wokula anw...@yahoo.de wrote: Am 07.11.2011 16:52, schrieb Peng Yu: Hi, * currently doesn't recognize the following as a single word. I think that I need to change iskeyword. But I don't want to explicitly specify iskeyword, rather I want to append

Re: How to complete bash shell command (or command in path)?

2011-11-09 Thread Peng Yu
On Tue, Nov 8, 2011 at 3:50 PM, Jean-Rene David jrda...@magma.ca wrote: * Peng Yu [2011.11.08 12:20]: I'm editing a bash script. It will be convenient if I can complete command that find in PATH. I'm sure that there is a way to do so. Could any expert let me know how to do it? Thanks! One

Re: How to complete bash shell command (or command in path)?

2011-11-10 Thread Peng Yu
On Wed, Nov 9, 2011 at 9:52 PM, Jean-Rene David jrda...@magma.ca wrote: * Peng Yu [2011.11.09 22:30]: files like xxx.sh only shown as xxx after I press CTRL-X_CTRL-K. Is there a way to show xxx.sh instead of xxx? set isk+=. However beware that this will affect all word related commands

How to let syn keyword accept space?

2011-11-14 Thread Peng Yu
Hi, I have to use the ofllowing to define a match to a word with space in it. I'm wondering how to do the something with syn keyword. Also is 'syn match' slower than 'syn keyword'? syn match jagsCommand 'data in' -- Regards, Peng -- You received this message from the vim_use maillist. Do not

syntax file for BUGS language (for MCMC simulation)?

2011-11-14 Thread Peng Yu
Hi, http://mcmc-jags.sourceforge.net/ http://www.openbugs.info/w/ I only find the following syntax highlight file for the BUGS language (see the above websites). Because the keywords are bugs or bug, it is extremely hard to search whether there are any other existing vim files for it. Has

How to figure out what file cause a file to be indented?

2011-11-14 Thread Peng Yu
Hi, I have a .jags file. I am able to indent it (although incorrectly). I don't find jags.vim in my ~/.vim/indent directory. I'm wondering how to figure out what cause the .jags file be indentable. -- Regards, Peng -- You received this message from the vim_use maillist. Do not top-post! Type

What does '* in 'exists(*GetAwkIndent)' mean?

2011-11-14 Thread Peng Yu
Hi, I don't know how to search for the usage of * in the following vim code. Could anybody which keyword I should search in vim help for its usage? exists(*GetAwkIndent) -- Regards, Peng -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text

Where to put vim files while they are under development?

2011-11-14 Thread Peng Yu
Hi, I'm developing some indent and syntax files. Instead of putting them in ~/.vim. I'd like to put them in a different directory. In order to load them automatically, I think that I just need to append the directory to runtimepath. Is it going to cause some problems if the files are not in

Why opening file with ctrl_W will result in different indentation from opening file from command line directly?

2011-11-15 Thread Peng Yu
Hi, If I open a file X from command line, the file can be indented correctly. But if I first open a file of different type, which include a string to X, then open X with ctrl_W, then the indentation is not correct. Does anybody know what I should check to fix this bug? -- Regards, Peng -- You

How to syntax highlight code that is block commented /**/?

2011-11-18 Thread Peng Yu
Hi, I modified some example from the man page to highlight the /* */ block. But I'm not sure if this is the best way (It seems that there could be multiple ways, although I'm not sure.) Could anybody let me know what is the best to highlight a /* */ block? syntax region Comment start=/\*hs=e-1

How to customize CTRL-W CTRL-F?

2011-11-27 Thread Peng Yu
Hi, I want to customize the behavior of CTRL-W CTRL-F. For example, it is of the pattern #include header.h, I will search for C and C++ header file directories. If it is of the pattern import os, I'll search for python library directories for file os.py. More generally, it a line match for some

indention of html with jQuery code incorrect

2011-12-24 Thread Peng Yu
Hi, The following code can't be correctly indented in vim. Does anybody know what plugin can help correctly indent this file? html head script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function(){ $(#test).click(function(){

pasting html to vim resulted in additional tags

2011-12-25 Thread Peng Yu
Hi, html body/body /html If I paste the above code to vim (with command+p) on my mac, I get an extra line on the bottom. It seems that vim tries to matches the tags html and body without recognizing that they are already matched. /body/html However, the gvim doesn't have the problem and it

Re: pasting html to vim resulted in additional tags

2011-12-26 Thread Peng Yu
Pasting within Vim (via some internal register, probably the default register) or pasting from outside (via the clipboard)? I use command+v in mac to paste. I assume this means the second way. N.B. Compiled with +clipboard -X11 -xterm_clipboard What does N.B. stands for? -- Regards, Peng

import library automatically in python, perl, etc.

2012-01-03 Thread Peng Yu
Hi, The following video shows that the once a class is used the module where the class is defined will be automatically used. (Note, the example is in AcitonScript, but the concept can be generalized in many other languages that has some automatic mapping between the class name and the

% doesn't jump between pairs of parenthesis in html

2012-01-07 Thread Peng Yu
Hi, https://github.com/othree/html5.vim I have the above plugin installed. The key % can not help me jump between () pair and {} pair. I'm wondering whether there is any fix to this problem? -- Regards, Peng -- You received this message from the vim_use maillist. Do not top-post! Type your

Re: % doesn't jump between pairs of parenthesis in html

2012-01-07 Thread Peng Yu
What is the output from this command?    :verbose set matchpairs? Here is the output. :verbose set match matchpairs matchtime matchpairs=(:),{:},[:],: Last set from ~/.vimrc -- Regards, Peng -- You received this message from the vim_use maillist. Do not top-post! Type your

Re: % doesn't jump between pairs of parenthesis in html

2012-01-07 Thread Peng Yu
On Sat, Jan 7, 2012 at 2:17 PM, Gary Johnson garyj...@spocom.com wrote: On 2012-01-07, Peng Yu wrote: What is the output from this command?    :verbose set matchpairs? Here is the output. :verbose set match matchpairs  matchtime   matchpairs=(:),{:},[:],:         Last set from

Can vim create table like this?

2012-01-08 Thread Peng Yu
Hi, I see that emacs can create table like this. Does vim have a plugin that offers similar capability? http://www.youtube.com/watch?v=EQAd41VAXWofeature=related -- Regards, Peng -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are

R indentation

2009-07-24 Thread Peng Yu
Hi, gvim 7.2 does not come with a R indentation file. I tried the indentation file the following. http://biostat.mc.vanderbilt.edu/wiki/Main/RVim But it still doesn't indent R files correctly. See an indented result below. Can somebody fix the bug in the indentation file for R and add it in

Automatically formatting (adding spaces)

2009-08-09 Thread Peng Yu
Hi, Vim's indentation option is very helpful. But I want to format f (a,b) to f(a, b), where a space is added before b, because I want to add spaces between the arguments of a function call automatically. There are many other cases where I also want to add spaces. I'm wondering if Vim has such a

Re: Automatically formatting (adding spaces)

2009-08-10 Thread Peng Yu
On Aug 10, 12:30 pm, visiondude visiond...@gmail.com wrote: Well, my solution doesn't use a plugin for that purpose. Code formatting is done by an external tool named astyle. Install and configue astyle, then add a line set equalprg=astyle to your .vimrc file. Now you can code formatting

Re: Automatically formatting (adding spaces)

2009-08-11 Thread Peng Yu
On Aug 10, 12:30 pm, visiondude visiond...@gmail.com wrote: Well, my solution doesn't use a plugin for that purpose. Code formatting is done by an external tool named astyle. Install and configue astyle, then add a line set equalprg=astyle to your .vimrc file. Now you can code formatting

Strange gvim message

2009-08-11 Thread Peng Yu
Hi, I got the message on the output, when I start gvim. After I rename the .vim directory, I still get the same message. My system administrator had tried gvim on his account, but he didn't see the message. Can some help get rid of such message? Regards, Peng 1 ToolBar 10 Open n*

Re: R indentation

2009-08-20 Thread Peng Yu
On Aug 20, 4:51 pm, Ben Fritz fritzophre...@gmail.com wrote: On Aug 20, 3:36 pm, Peng Yu pengyu...@gmail.com wrote: I put the above code in my ~/.vim/indent/r.vimfile. Butvimstill can not correctly indent, for example, the following file. Can somebody take a look what the problem

Re: R indentation

2009-08-21 Thread Peng Yu
On Aug 21, 12:15 am, Tom micat...@gmail.com wrote: The indented result of the 'whatcdf.R' is like the following, which is obviously not correct. 'for' statement should be aligned with 'library'; 'print' should be aligned with 'pname' in the 3rd line. library(makecdfenv)   for (f in

Re: R indentation

2009-08-23 Thread Peng Yu
On Aug 22, 8:37 am, Ben Fritz fritzophre...@gmail.com wrote: On Aug 22, 12:17 am, Tom micat...@gmail.com wrote: I don't specify any options except that I copy your vim code into '~/.vim/indent/r.vim'. Do you know how I may find what is causing the problem? Is the filetype actually

Unwanted default behaviour of converting '_' to '-' in Vim-R-plugin2

2009-09-04 Thread Peng Yu
Hi, I am using the vim-r-plugin2-090828.tar.gz. However, it always convert '_' to '-', which is not what I want. I want '_' be '_'. Can somebody let me know how to change the default be behavior? http://www.vim.org/scripts/script.php?script_id=2628 Regards, Peng

Speed up gvim startup

2009-09-12 Thread Peng Yu
Hi, My 'gvim' command takes about 4 seconds to start, and my 'vim' command takes about 2 seconds to start. I am wondering how to speed up 'gvim' and 'vim'? Regards, Peng --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more

Re: Speed up gvim startup

2009-09-12 Thread Peng Yu
On Sep 12, 5:08 pm, sc tooth...@swbell.net wrote: On Saturday 12 September 2009, Peng Yu wrote: My 'gvim' command takes about 4 seconds to start, and my 'vim' command takes about 2 seconds to start. I am wondering how to speed up 'gvim' and 'vim'? two things i can suggest: * load

How to not scan large files when I type ctrl+P? (about LargeFile.vim)

2009-09-23 Thread Peng Yu
Hi, I installed ./plugin/LargeFile.vim so that I can open large files faster. But when open multiple files (some are large files), it will scan the large files if I type ctrl+P. I am wondering if LargeFile plugin can be modified so that vim would not scan the large files. Regards, Peng

how to view table separated file?

2009-09-23 Thread Peng Yu
Hi, I have a file, which is basically a table. Each row is a line in the file. The columns are separated by tabs. I'm wondering if vim can help view this kind of file with columns aligned and without wrapping lines. Regards, Peng --~--~-~--~~~---~--~~ You

Auto filename completion with wildcard character?

2009-09-26 Thread Peng Yu
Hi, Ctrl-X Ctrl-F can auto search file and complete filenames. However, if I have typed something like '*.txt', vim does not interpret '*' as a shell wildcard. Therefore, vim would not show me all the files end with .txt. I am wondering if somebody could add this capability. Regards, Peng

Re: jump to the error line of a python file

2009-09-27 Thread Peng Yu
On Sep 20, 7:33 pm, Hari Krishna Dara hari@gmail.com wrote: On Sat, Sep 19, 2009 at 9:15 PM, Peng  Yu pengyu...@gmail.com wrote: Hi, Suppose I am editing a python file (which is executable), I then type :!python_file_name.py to run it. I would like vim help me position

Re: jump to the error line of a python file

2009-09-27 Thread Peng Yu
-lgdk-x11-2.0 -latk-1.0 -lgio-2.0 - lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 - lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lXt - lm -lncurses -lselinux -lacl -lgpm On Sep 27, 8:54 pm, bill lam cbill@gmail.com wrote: On Sun, 27 Sep 2009, Peng Yu

How to figure out which vim sesion keep a tempfile?

2009-09-28 Thread Peng Yu
Hi, When an vim session open a file, it usally create a temp file like the following. Would you please let me know how to figure out which vim session (I want to know process id so that I can kill it) open such a temp file? rm: cannot remove `/tmp/.nfs001b6b6013ee': Device or

Re: How to figure out which vim sesion keep a tempfile?

2009-09-28 Thread Peng Yu
On Sep 28, 3:08 pm, Christian Brabandt cbli...@256bit.org wrote: Hi Peng! On Mo, 28 Sep 2009, Peng Yu wrote: When an vim session open a file, it usally create a temp file like the following. Would you please let me know how to figure out which vim session (I want to know process id so

Re: How to figure out which vim sesion keep a tempfile?

2009-09-29 Thread Peng Yu
On Sep 28, 4:06 pm, Christian Brabandt cbli...@256bit.org wrote: Hi Peng! On Mo, 28 Sep 2009, Peng Yu wrote: On Sep 28, 3:08 pm, Christian Brabandt cbli...@256bit.org wrote: lsofcan probably help. I don't have this command on my system. Also, I don't have root permission and my

python auto indentation problem of indent/python.vim

2009-09-30 Thread Peng Yu
Hi, I have the following lines in my .vimrc and I installed indent/ python.vim from http://www.vim.org/scripts/script.php?script_id=974 fun BenIndent() let oldLine=line('.') normal gg=G execute ':' . oldLine endfun map -- :call BenIndent()CR However, it will not correctly indent my code.

Re: python auto indentation problem of indent/python.vim

2009-10-01 Thread Peng Yu
On Sep 30, 9:39 pm, sc tooth...@swbell.net wrote: On Wednesday 30 September 2009, Peng Yu wrote: If I have def fun(x,y): if x y:   print x else   print y After vim indentation, I have def fun(x,y):   if x y:     print x   else   print y i don't believe

Some bugs that I don't know what causes it

2009-10-02 Thread Peng Yu
Hi, Recently, I compile vim with python support. Then I frequently get the following errors when I :w .R files (I'm not sure if I will get such errors when I :w other type of files, as I am not editing them). Recently, I also modified my .vimrc and installed indent/python.vim Can somebody help

Some bugs that I don't know what causes it

2009-10-02 Thread Peng Yu
Hi, Recently, I compile vim with python support. Then I frequently get the following errors when I :w .R files (I'm not sure if I will get such errors when I :w other type of files, as I am not editing them). Recently, I also modified my .vimrc and installed indent/python.vim Can somebody help

Is there a way to open an URL transparently in the read only mode?

2009-10-09 Thread Peng Yu
Hi, Suppose that there is a file available online (http://website.com/ path.txt), I could download the file and open it by vim locally. But I'm wondering if it is possible to let vim download the file automatically, so that when I type something like 'vim http://website.com/path.txt', it will

Re: Some bugs that I don't know what causes it

2009-10-09 Thread Peng Yu
On Oct 3, 2:16 pm, Matt Wozniski m...@drexel.edu wrote: On Sat, Oct 3, 2009 at 3:07 PM, Ben Fritz fritzophre...@gmail.com wrote: On Oct 2, 1:51 pm, Peng  Yu pengyu...@gmail.com wrote: Can somebody help me figure out what the bug is? E323: line count wrong in block 1 E316: ml_get

E665: Cannot start GUI, no valid font found

2009-10-10 Thread Peng Yu
Hi, I see the following message, when I run gvim on CentOS. E665: Cannot start GUI, no valid font found Can somebody let me know how to fix it? Regards, Peng --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit

How to confine search to highlighted text?

2009-11-03 Thread Peng Yu
I can copy highlighted text. I'm wondering if there is a way to search only in highlighted text. --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

Re: How to confine search to highlighted text?

2009-11-05 Thread Peng Yu
On Nov 4, 8:26 am, Stahlman Family brettstahl...@comcast.net wrote: Peng Yu wrote: I can copy highlighted text. I'm wondering if there is a way to search only in highlighted text. Use the \%V regex assertion :help /\%V If there are multiple matches in the highlighted region, when I

How to change all the capital letters to small cases?

2009-11-09 Thread Peng Yu
I'm wondering what is the simplest way to change all capital letters to small cases. Could somebody let me know? --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

How to search old message in this newsgroup?

2009-11-09 Thread Peng Yu
I seems that I can only search recent messages on google groups. Could somebody let me know how to search old messages. --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

filename completion too slow

2009-11-15 Thread Peng Yu
I have a directory (say its name is 'test_dir') that has 2 files. If I type ctrl-X ctrl-F after 'test_dir/', it will take vim too long to respond. Could somebody let me know how to configure the function mapped to ctrl-X ctrl-F so that vim will stop search for a filename when it takes too

How to get the screen of the previous command that was executed?

2009-11-15 Thread Peng Yu
Suppose I execute a shell command in ':' mode. I'm wondering how to retrieve the output later on. --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

Re: How to get the screen of the previous command that was executed?

2009-11-15 Thread Peng Yu
On Nov 15, 9:37 pm, bill lam cbill@gmail.com wrote: On Mon, 16 Nov 2009, pansz wrote: bill lam 写道: On Sun, 15 Nov 2009, Peng Yu wrote: Suppose I execute a shell command in ':' mode. I'm wondering how to retrieve the output later on. If you use gnu screen, may be hitting 'c

replace from backward?

2009-11-17 Thread Peng Yu
:%s/a/b The above command replace the first appearance of 'a' to 'b' in all lines. I'm wondering how to replace the last 'a' instead? --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit

How to go a file at a specific line number using the output from grep?

2009-11-17 Thread Peng Yu
$ grep -H -n if /etc/profile/tmp/grep_output.txt $ cat /tmp/grep_output.txt /etc/profile:4:if [ -d /etc/profile.d ]; then /etc/profile:6:if [ -r $i ]; then /etc/profile:13:if [ $PS1 ]; then /etc/profile:14: if [ $BASH ]; then /etc/profile:16:if [ -f /etc/bash.bashrc ]; then

Re: How to go a file at a specific line number using the output from grep?

2009-11-17 Thread Peng Yu
John Beckett wrote: Peng Yu wrote: $ grep -H -n if /etc/profile/tmp/grep_output.txt $ cat /tmp/grep_output.txt /etc/profile:4:if [ -d /etc/profile.d ]; then /etc/profile:6:if [ -r $i ]; then /etc/profile:13:if [ $PS1 ]; then /etc/profile:14: if [ $BASH ]; then /etc/profile:16

Re: How to go a file at a specific line number using the output from grep?

2009-11-18 Thread Peng Yu
On Nov 18, 1:55 am, Gary Johnson garyj...@spocom.com wrote: On 2009-11-17, Peng Yu wrote: $grep-H -n if /etc/profile/tmp/grep_output.txt $ cat /tmp/grep_output.txt /etc/profile:4:if [ -d /etc/profile.d ]; then /etc/profile:6:    if [ -r $i ]; then /etc/profile:13:if [ $PS1

Re: How to get the screen of the previous command that was executed?

2009-11-21 Thread Peng Yu
On Nov 16, 7:19 am, Joan Miquel Torres Rigo joanmiq...@mallorcaweb.net wrote: 2009/11/16 Peng Yu pengyu...@gmail.com [...] I think he is talking about: when the command returns and he's back in vim, how to see the command output Yes. This is what I mean. I have a similar problem

ctrl+J without adding a space

2009-11-30 Thread Peng Yu
I use ctrl+J to join two lines. However, there will always be a space added between the two lines that are joined. I'm wondering how to configure gvim not to add this extra space? -- You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

How to switch two strings?

2009-12-01 Thread Peng Yu
I frequently need to switch two strings. For example, if I want to switch 'a' and 'b', I shall use the following three commands. I'm wondering if there is a more convenient way to do so. :%s/b/c/g :%s/a/b/g :%s/c/a/g -- You received this message from the vim_use maillist. For more information,

Re: ctrl+J without adding a space

2009-12-01 Thread Peng Yu
On Nov 30, 6:55 pm, Dave Land l...@aol.com wrote: On Nov 30, 2009, at 2:17 PM, Dominique Pellé wrote: Peng  Yu wrote: I use ctrl+J to join two lines. However, there will always be a space added between the two lines that are joined. I'm wondering how to configure gvim not to add

Re: How to switch two strings?

2009-12-01 Thread Peng Yu
On Dec 1, 11:12 am, Christian Brabandt cbli...@256bit.org wrote: Hi Peng! On Di, 01 Dez 2009, Peng Yu wrote: I frequently need to switch two strings. For example, if I want to switch 'a' and 'b', I shall use the following three commands. I'm wondering if there is a more convenient way

How to change the mode for a new file automatically?

2009-12-01 Thread Peng Yu
When I edit a new .sh file, I always want to 'chmod +x'. I'm wondering if there is a way to make this process automated in vim? -- You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

What's the command to delete a word?

2009-12-01 Thread Peng Yu
dd is the command to delete a line. I'm wondering what the command to delete a word (including the spaces immediately afterward) is? -- You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

How show the file open by :new in a new tab?

2009-12-15 Thread Peng Yu
Suppose that I open a file by new. And later on, I want to move it in a new tab. Could somebody let me know what command I can use? -- You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

Re: How show the file open by :new in a new tab?

2009-12-15 Thread Peng Yu
On Dec 16, 1:27 pm, Matt Wozniski m...@drexel.edu wrote: On Tue, Dec 15, 2009 at 1:06 PM, Peng Yu wrote: Suppose that I open a file by new. And later on, I want to move it in a new tab. Could somebody let me know what command I can use? C-wT That closes the current window

indentation flex files

2009-12-20 Thread Peng Yu
I have the following vim installed, which seems not indent flex (http://flex.sourceforge.net/) files correctly. Are there any files that I should install for vim to indent flex files? VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Aug 16 2009 01:15:17) MacOS X (unix) version Included patches: 1-245

Is there a tool that can compute how many keystrokes are need to modify a file to another?

2009-12-22 Thread Peng Yu
I'm wondering if there is a tool that can roughly estimate how many keystrokes (in vim) are needed to modify a file to another. -- You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

Re: Is there a tool that can compute how many keystrokes are need to modify a file to another?

2009-12-23 Thread Peng Yu
On Dec 23, 6:34 pm, Christophe-Marie Duquesne chm.duque...@gmail.com wrote: On 12/23/2009 12:23 AM, Peng Yu wrote: I'm wondering if there is a tool that can roughly estimate how many keystrokes (in vim) are needed to modify a file to another. Well, with diff and wc, depending on what you

Re: indentation flex files

2009-12-29 Thread Peng Yu
On Dec 20, 12:25 pm, Vim dfishburn@gmail.com wrote: Sorry, can't bottom post. I will an entire suite forFlexdevelpment. Syntax, indent, compiler,   filetype, documentation. I just haven't posted it anywhere yet. I will try to do that this week and post it to vim.org so people can  

How to insert a line without moving the cursor?

2009-12-30 Thread Peng Yu
o or O will move the cursor. Is there a command that don't move the cursor? -- You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

Re: indentation flex files

2009-12-31 Thread Peng Yu
On Dec 30, 9:57 pm, David Fishburn dfishburn@gmail.com wrote: I will an entire suite for Flex develpment. Syntax, indent, compiler, filetype, documentation. I just haven't posted it anywhere yet. I will try to do that this week and post it to vim.org so people can try it out and

How to delete everything before the cursor until the beginning of the line?

2010-01-01 Thread Peng Yu
'D' deletes everything after the cursor until the end of the line. Is there a command that delete everything before the cursor until the beginning of the line? -- You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php

How powerful is language build in vim compare with the language build in emacs?

2010-01-24 Thread Peng Yu
I have learned neither the language for vim scripting nor the language for emacs scripting (which is lisp, right?). (I know mit-scheme, but I have never used emacs) May I ask the following questions? I know Lisp is very powerful. Is the language in vim as powerful? For what type of tasks, it is

using files in ~/.vim/ from command line

2010-02-12 Thread Peng Yu
I use the following command to indent a file. But it always showing up something in the screen. vim -n -X -c set shiftwidth=2 -c set expandtab -c set sts=2 -c set ts=2 -c normal gg=G -c x file.txt Then I use the following command to silent the screen. But the indentation becomes incorrect. I

Open a new file if the file doesn't exist when using ctrl+W_ctrl+F?

2010-02-21 Thread Peng Yu
If I type ctrl+W_ctrl+F over a string and there is not a file whose name is the string, vim will show E447: Can't file file 'the string' in path. However, sometimes I do want to open a new file with the string with some short cut. Is there a way to do so? -- You received this message from the

Re: Open a new file if the file doesn't exist when using ctrl+W_ctrl+F?

2010-02-24 Thread Peng Yu
On Feb 21, 10:07 pm, Benjamin R. Haskell v...@benizi.com wrote: On Sun, 21 Feb 2010, Peng  Yu wrote: If I type ctrl+W_ctrl+F over a string and there is not a file whose name is the string, vim will show E447: Can't file file 'the string' in path. However, sometimes I do want to open a new

Re: Open a new file if the file doesn't exist when using ctrl+W_ctrl+F?

2010-02-24 Thread Peng Yu
On Feb 24, 11:13 am, Christian Brabandt cbli...@256bit.org wrote: Hi Peng! On Mi, 24 Feb 2010, Peng Yu wrote: When the cursor is on file.xyz, I actually want to open file.abc. Would you please show me how to do it? More generally, give a 1-1 mapping form a suffix set (S1) to another

  1   2   3   >