Re: renaming unnamed buffer at creation

2006-08-21 Thread Charles E Campbell Jr
Yakov Lerner wrote: Now that my attempt to write unnamed buffer under name /tmp/N failed, I want to autoname empty buffer. My first attempt does not work. Autoevent is ot invoked. Hello! The autocmd system is always invoked based on the buffer name. Thus it appears none of the autocmds will

Re: using counter prefix in a map/command

2006-08-22 Thread Charles E Campbell Jr
Rodolfo Borges wrote: I did the following command to open man pages inside Vim: nmap K :Man C-RC-WCR command! -bar -nargs=1 DoMan %!/usr/bin/man -P cat args command! -bar -nargs=1 Man \ new \| DoMan args \| %s/.^H//g \| set filetype=man \| goto 1 \| set buftype=nofile It works nice,

Re: Search all text files in a directory for text

2006-08-22 Thread Charles E Campbell Jr
Bram Moolenaar wrote: Charles E Campbell wrote: Sigh -- I'm not sure what to do about this one. Turns out that: com! ... -complete=dir Explore ... causes the E77 with Too many file names. Simply removing the -complete=dir from the command fixes things. You have -nargs=?

Re: using counter prefix in a map/command

2006-08-22 Thread Charles E Campbell Jr
Yakov Lerner wrote: On 8/21/06, Rodolfo Borges [EMAIL PROTECTED] wrote: I did the following command to open man pages inside Vim: nmap K :Man C-RC-WCR command! -bar -nargs=1 DoMan %!/usr/bin/man -P cat args command! -bar -nargs=1 Man \ new \| DoMan args \| %s/.^H//g \| set filetype=man

Re: How to insert text via script/function call ?

2006-08-22 Thread Charles E Campbell Jr
Meino Christian Cramer wrote: No, sorry...I was simply searching for a function call like printf( This is my text! ) Hi Tony, this works so far...with an unwanted sideeffekt: Instead of This is my text! in my buffer I get This is my text!Esc

Re: regex replace with match

2006-08-23 Thread Charles E Campbell Jr
striker wrote: I have a large fixed width database file that I would like to delimit with commas. For example here are 2 lines of the file: 210044012123540759F181012004103C14 29847.3741091 4280 5070 42789 28529 2769 2449 3320 2948

Re: Search all text files in a directory for text

2006-08-24 Thread Charles E Campbell Jr
Gary Johnson wrote: On 2006-08-18, Charles E Campbell Jr [EMAIL PROTECTED] wrote: Gary Johnson wrote: Thanks. That removes the error and gives me a list of files, but included in that list are non-*.c names such as INSTALL Makefile README.txt :Explore **/*.c

Re: The Vim Outliner: \n does not work

2006-08-28 Thread Charles E Campbell Jr
Meino Christian Cramer wrote: Hi, I have downloaded The Vim Outliner (tvo) version 122 (1.22?) and I am using it with vim 7.066 on a Gentoo Linux (2.6.17.11 vanilla kernel). ...snip... My question: When using the \x (x := [1-9at]) commands from above, they do simply nothing. I check

Re: Running a Set of Commands from a File

2006-08-31 Thread Charles E Campbell Jr
Mike Blonder wrote: I have saved a file called 'commands.' This file has all of the commands (g /foobar/,/goobar/ d, etc) I need to edit some very large files. I want to 'run' this commands file from within each of the large files that I need to edit. 1) do I have to chmod 'commands' as

Re: Search and replace as per format

2006-09-05 Thread Charles E Campbell Jr
Srinivas Rao. M wrote: Hi Vimmers, I am tasked to replace the pattern log(module_name, LOG_LEVEL_DEBUG, The Value of status=%d message, status); to log(module_name, LOG_LEVEL_DEBUG, %s:The Value of status=%d message,__FUNCTION__, status); This pattern is appearing in hundreds of source

Re: Vim BOF session

2006-09-06 Thread Charles E Campbell Jr
I'd still like to see Vince Negri's ideas (ownsyntax, conceal) included. Regards, Chip Campbell

Re: Problem with 'lisp' and commented sexps

2006-09-06 Thread Charles E Campbell Jr
Yang wrote: There seems to be an 'undocumented feature' when editing Lisp files with the 'lisp' option set. I can no longer % between matching s-expressions []{}() if they are in comments and on newlines, e.g. in: ;; myfold {{{ (blah blah) ;; }}} ;; (blah ;; blah) I can't jump between the {}

Re: Syntax question regarding \%[

2006-09-06 Thread Charles E Campbell Jr
Yakov Lerner wrote: Even better would be use syn keyword: syn keyword Error int inte integ intege integer inter interv interva interval On the other hand, both of your 'syn match'es use same group, so why 2nd match taking over would be a problem anyway ? Probably syn keyword Error

Re: Modify flag

2006-09-06 Thread Charles E Campbell Jr
Yakov Lerner wrote: On 9/2/06, Shashi Kumar [EMAIL PROTECTED] wrote: How can I disable automatic setting of the modified flag or auto save option? I have set some option with which I think VIM is automatically saving the file thus changing the timestamp of the file. This poses a problem

Re: Specifying vim options in the files being edited

2006-09-08 Thread Charles E Campbell Jr
Russell Bateman wrote: You can put these modelines at the top of your file or the bottom. Also, they can go on other lines, but I think there's a limit there and yet another setting to change how tolerant Vim is in looking for them, but as this approach suits me, I haven't experimented a

Re: Counts for mapping

2006-09-10 Thread Charles E. Campbell, Jr.
Tom Carr wrote: Let's say I have the following mapping: nnoremap = 3l Now if I type =, it moves 3 characters to the right, as expected. Now if I type 1=, it moves 13 characters to the right instead of 3. Now if I type 3=, it moves 33 characters to the right instead of 9. It works

Re: Counts for mapping

2006-09-11 Thread Charles E Campbell Jr
Tom Carr wrote: In particular, here's a solution: map = :RightShiftcr com! -count=1 RightShift call RightShifter(count) fun! RightShifter(cnt) exe norm! .(3*a:cnt).l endfun That's an interesting hack, but there are a few problems with this solution: * This only works correctly on the

Re: Counts for mapping

2006-09-11 Thread Charles E Campbell Jr
Tom Carr wrote: In particular, here's a solution: map = :RightShiftcr com! -count=1 RightShift call RightShifter(count) fun! RightShifter(cnt) exe norm! .(3*a:cnt).l endfun That's an interesting hack, but there are a few problems with this solution: * This only works correctly on the

Re: Vim7: Turn syntax off while diffing

2006-09-11 Thread Charles E Campbell Jr
Yakov Lerner wrote: On 9/10/06, Yakov Lerner [EMAIL PROTECTED] wrote: On 9/10/06, Sven Brueggemann [EMAIL PROTECTED] wrote: Hello, Vim 7 combines syntax colouring and diff colouring when diffing. This often makes the diffs hard to read. Is there a way to automagically turn syntax

Re: Perltidy,VIM for C/C++ visual block cleanup

2006-09-12 Thread Charles E Campbell Jr
Gundala Viswanath wrote: Thanks Yakov, gg=G :help = But it seems to me that works on Global basis strictly. How can we localize the cleanup within a visual block? Moreoever how can we customize the indentation, bracing, etc? Since with Perl this customization is captured within

Re: How does vim recognize file type?

2006-09-18 Thread Charles E Campbell Jr
Andrea Spadaccini wrote: I am using tablatex.vim, ftplugin for LaTeX files, and I have a main latex file and several included .tex files. Well, vim loads the plugin (and the syntax file) when I'm editing the main file, while it doesn't when I'm editing the included files. How can I tell vim

Re: cusor movement

2006-09-18 Thread Charles E Campbell Jr
Tim Chase wrote: is it possible to tell vim(7) *not* to jump to the next line when using object motion (w,b..) such as vim behaves when using l or h ? Please give specific example of what you type in normal mode involving w or b that jumps to the next line, please. When I use w or yw vim

Re: vim | replacement question

2006-09-20 Thread Charles E Campbell Jr
Nikolaos A. Patsopoulos wrote: Another replacement question: how can I replace all occurrence of a pattern except a given one, e.g. the first or third? the code for all occurrences I use is: :%s/a.\{-}//g Thanks in advance, I see that others have given the answer to the specific

Re: Making Autocmd matches buffer's first line

2006-09-20 Thread Charles E Campbell Jr
Yakov Lerner wrote: On 9/20/06, Fabien Meghazi [EMAIL PROTECTED] wrote: But I would like these autocmd's to match those files without .py extensions. My question is : Is it possible to make an autocmd pattern's to match something in the first line's buffer with a regexp eg: (

Re: SR

2006-09-22 Thread Charles E Campbell Jr
Eric Leenman wrote: I have a file where I deleted all lines that don't contain a certain pattern For example I want to delete all lines that don't contain XXX and YYY. :g/PATTERN/cmd executes the given command on all lines containing the PATTERN. :v/PATTERN/cmd executes the given command

Re: LogiPat Problem

2006-09-25 Thread Charles E Campbell Jr
Bill McCarthy wrote: Hello Vim List, Trying out LogiPat (by Charles Campbell) today, I ran into a problem. I tried to find lines that contain abc or def but didn't contain both. Hello! Looks like you ran into a bug. I've loaded LogiPat v3 onto my website which handles :LP

Re: Piping messages from ex commands into a new tab

2006-09-26 Thread Charles E Campbell Jr
Tom Carr wrote: I'm trying to pipe messages from ex commands (e.g. :map , :version) into a new tab. I've found http://vim.sourceforge.net/tips/tip.php?tip_id=95, but I was hoping for a better way. Ideally I would type something like :tabmesages :map and it would show :map in a new tab,

Re: Piping messages from ex commands into a new tab

2006-09-26 Thread Charles E Campbell Jr
Tom Carr wrote: I'm trying to pipe messages from ex commands (e.g. :map , :version) into a new tab. I've found http://vim.sourceforge.net/tips/tip.php?tip_id=95, but I was hoping for a better way. Ideally I would type something like :tabmesages :map and it would show :map in a new tab,

Re: --enable-gui argument... no GUI support

2006-09-26 Thread Charles E Campbell Jr
Akbar wrote: I have the same problem. Installing vim 7.0 source in Suse 10.1, I always get --enable-gui argument... no GUI support I have xorg-x11-devel installed. I have installed libgnome-devel. No luck. Any idea? I suspect that you do the following after unpacking the vim 7.0 source

Re: copy a word without moving cursor

2006-10-02 Thread Charles E Campbell Jr
Osho GG wrote: I am already putting this segment in much larger map that does other things on a contents. However, the way I currently do it has a disadvantage that the cursor moves and then it moves back and then the screen flashes - all for nothing really. ayaw or ayiw doesn't work for me

Re: vim backspace

2006-10-02 Thread Charles E Campbell Jr
cga2000 wrote: I don't suppose there's any way I can save the current interactively- modified colorscheme to a file? Perhaps http://vim.sourceforge.net/scripts/script.php?script_id=1081 will be helpful for what you want to do. Interactively adjust the colorscheme using hicolors'

Re: copy a word without moving cursor

2006-10-08 Thread Charles E. Campbell, Jr.
Osho GG wrote: Hi All, I know this mustbe pretty simple but I can't figure this out. I want to copy a word into a buffer without moving the cursor. Currently I do something like *ayw^O:nohCR to get this effect. But, this seems like such a round about way to do this. Is there a simpler way to

Re: Setting up netrw

2006-10-10 Thread Charles E Campbell Jr
Suresh Govindachar wrote: Close ... From inside gvim, I tried both of the following: :Nread scp://111.11.11.111/home/suresh/examples/mcf/vmul/manager/manager_vmul.c and :sf scp://111.11.11.111/home/suresh/examples/mcf/vmul/manager/manager_vmul.c But the system

Re: Setting up netrw

2006-10-10 Thread Charles E Campbell Jr
Suresh Govindachar wrote: The version of netrw in the vim sources, on vim.org and on your web-site all differ. Since netrw is part of the vim runtime- sources, could you please coordinate your releases with Bram? They are already quite coordinated. Development version appears at my

Re: vim | editing pdf files with vim

2006-10-10 Thread Charles E Campbell Jr
Nikolaos A. Patsopoulos wrote:, is there a way to edit pdf files with vim? If not pdf as is, then eps or postscript? I tried with either format but the text kept been converted to sthl ike ASCII code. For purposes of visualization, using netrw's browser and, with the cursor on the pdf file,

Re: bugs in vim scripting highlighting

2006-10-10 Thread Charles E Campbell Jr
Mikolaj Machowski wrote: Noticed two bugs in vim script highlighting: 1. xnoremap and snoremap are not fully recognized. Compare highlighting of those three lines: inoremap buffer silent expr C-C SIDCtrlC() xnoremap buffer silent expr C-C SIDCtrlC() snoremap buffer silent

Re: Problem in dos runtime on Vim FTP

2006-10-11 Thread Charles E Campbell Jr
A.J.Mechelynck wrote: Bill McCarthy wrote: On Tue 10-Oct-06 9:26pm -0600, A.J.Mechelynck wrote: Bill McCarthy wrote: Since yesterday, 4 files in the dos/autoload directory cannot be downloaded - it doesn't appear to matter which FTP client is used. The four problem files are:

Re: Vim7: Spell checking not working with ft=mail

2006-10-12 Thread Charles E Campbell Jr
[EMAIL PROTECTED] wrote: On Thu, Oct 12, 2006 at 02:40:48PM -0500, Tom Purl wrote: A lot of filetypes have special provisions where they turn spell-checking off in certain areas that you don't want to spell-check. I read about that; however, mail.vim doesn't seem to do that (I could

Re: bugs in vim scripting highlighting

2006-10-13 Thread Charles E Campbell Jr
Hari Krishna Dara wrote: I faced a problem, though it is with netrw, not with vim syntax file. I tried to open the download link from Vim, and got the below error: Error detected while processing function netrw#NetRead: line 275: http://mysite.verizon.net/astronaut/vim/syntax/vim.vim.gz;

Re: VimL and Exuberant tags - Suggestions please

2006-10-13 Thread Charles E Campbell Jr
hdrtag (available at http://mysite.verizon.net/astronaut/src) creates tags for *.vim files. Currently, it supports tags for syntax, match, region, c luster, keyword, function, command, and maps. Regards, Chip Campbell

Re: netrw for new extension

2006-10-13 Thread Charles E Campbell Jr
Hari Krishna Dara wrote: Netrw comes with a few supported formats, and the format is deduced by the extension of the file, which is fair, but is there anyway to configure netrw such that it will recognize new extensions as one of the supported filetypes? E.g., there are several archives that

Re: netrw for new extension

2006-10-13 Thread Charles E Campbell Jr
Hari Krishna Dara wrote: Netrw comes with a few supported formats, and the format is deduced by the extension of the file, which is fair, but is there anyway to configure netrw such that it will recognize new extensions as one of the supported filetypes? E.g., there are several archives that

Re: cursor moves back with ESC

2006-10-16 Thread Charles E Campbell Jr
Lev Lvovsky wrote: I've never actually figured out why upon after typing in insert mode, the cursor moves back one character to the left after pressing escape. What's the reason behind this, and is there any way to turn it off? To best understand this, one needs to use console vim.

Re: split vertically at a tag

2006-10-18 Thread Charles E Campbell Jr
Kamaraju Kusumanchi wrote: If I do ctrl-W ctrl-] in normal mode, vim splits the current window horizontally. Is there any way to achieve the same functionality but with window being split vertically instead of horizontally? Here's another solution: nmap silent F9 :exe 'vert sta

Re: Match something that not in the pattern

2006-10-19 Thread Charles E Campbell Jr
Peng Yu wrote: Hi, I have the following file segments. I want to concatenate all the lines with their next lines, except that it ends with }}. I want to use the pattern \(}}\)[EMAIL PROTECTED]. It seems not working. Would you please help me to figure out how to match the lineend without }}?

Re: Problems with

2006-10-20 Thread Charles E Campbell Jr
Max Dyckhoff wrote: Re-including the list. I only have about 30 maps, and none of them start with . The only thing that I can see which might be affecting anything are these two: ,,b :%s/\(^\t*\):/\1/ecr:%s/\(^\t*\) /\1: /ecr:let @/=cr ,,B :%s/\(^\t*\):/\1/ecr:let @/=cr Now ,, is the

Re: Problems with Align.vim

2006-10-25 Thread Charles E Campbell Jr
Diwaker Gupta wrote: I'm using Vim 7.0.122 on Debian Unstable. I can send output of :version if needed. I've recently started having problems using Align.vim: Error detected while processing function AlignWrapperStart: line 28: E117: Unknown function: Align#AlignPush I've tried installing

Re: Problems with Align.vim

2006-10-25 Thread Charles E Campbell Jr
Benji Fisher wrote: There are a few problems here. First, it is too easy to miss the warning BE SURE TO GET THE LATEST VIMBALL PLUGIN BEFORE ATTEMPTING TO USE SCRIPTS UPLOADED ON OR AFTER AUG 1, 2006 posted on http://mysite.verizon.net/astronaut/vim/index.html . Ideally,

Re: saving and loading views

2006-10-25 Thread Charles E Campbell Jr
Samuel Wright wrote: Hi Guys, I used to have this in .vimrc autocmd BufWinLeave * mkview autocmd BufWinEnter * silent loadview to automatically save and load folds. I have recently added it again, but it does not seem to work in Vim 7 on Win XP. Have I missed anything obvious? Well,

Re: Anyway to sort scripts by last update date? (bad email address)

2006-10-25 Thread Charles E Campbell Jr
[EMAIL PROTECTED] wrote: The vim.sf.net has a script search feature which can sort by Rating,...snip Pan Shizhu: I got this from my attempt to email to you... This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more

Re: chasing symlink

2006-10-26 Thread Charles E Campbell Jr
Yakov Lerner wrote: Let's say I edit file x (vim x) which is a symlink, x-y. (Linux). How can I make a script that opens y instead of x in the buffer (chases the symlinks and opens it) I guess I don't understand exactly what you're doing here. Let me explain: echo junk1 file1 ln -s file1

Re: Terminating search in function

2006-10-26 Thread Charles E Campbell Jr
Meino Christian Cramer wrote: I wrote this snippet: fun! Ffunchdr() let date = strftime( %F ) put='/*-*/' put='/**' put=' *

Re: Inline script execution

2006-10-31 Thread Charles E Campbell Jr
Daryl Lee wrote: I am working my way through the :help scripting explanation (usr_41.txt) and I have a question about the :@ command. I ran the sample given in the explanation, where the simple example is: :let i = 1 :while i 5 : echo count is i : let i += 1

Re: how to make 7.0 behave like 6.4

2006-11-02 Thread Charles E Campbell Jr
longraider wrote: The set autoindent smartindent is the solution, thanks a lot. You know, vim 7.0 hasn't changed the autoindent/smartindent area (except possibly for bug fixes) from v6.4 insofar as I am aware. And I do use autoindent (and cindent). So the question in my mind is: why did

Re: Reduce cursor size

2006-11-02 Thread Charles E Campbell Jr
Billy Patton wrote: In gvim the mouse cursor dissapears when I begin typing. Can this be done in vim? This property is more a function of the xterm/console you're using rather than of vim. Here's an example of how to change color with an xterm (blue on insert, yellow else): if

Re: ':Explore' higlight the results

2006-11-03 Thread Charles E Campbell Jr
[EMAIL PROTECTED] wrote: Hello Vimmers, I've seen recently in the mailing list an interesting post/question about searching for a list of fies containing a pattern. The answer was that we could use :Explore or :vimgrep. For me, the first solution seems the best. I have a friend of mine that

Re: Getting out of netrw

2006-11-03 Thread Charles E Campbell Jr
Jean-Rene David wrote: Say I open vim7's new super duper file explorer netrw to browse some local directory. Say then I decide I don't want to open any new file and just want to go back to what I was doing. What would be the standard way to do that? I can use C-O to eventually land up where I

Re: Getting out of netrw

2006-11-03 Thread Charles E Campbell Jr
Marius Roets wrote: On 11/3/06, Jean-Rene David [EMAIL PROTECTED] wrote: I thought of using :q but that closes vim if only one window is open. Am I missing something obvious? Then F2 opens explorer in a new tab, and leaderq closes the tab, and you should be back where you were before

Re: vim.org refreshed mockup

2006-11-07 Thread Charles E Campbell Jr
Panos Laganakos wrote: I made a mockup of a refreshed version of vim.org, trying to maintain as much of the original look as possible: http://panos.solhost.org/mockups/vimorg-01.png vim tangofied icon by toZth Well, I don't see any checkerboard pattern, but I do find dark grey text on a

Re: Search all text files in a directory for text

2006-11-07 Thread Charles E Campbell Jr
Chuck Mason wrote: Sorry to bring this up again. Was there every any solution to this? Do I just need the latest netrw? I was trying to get :Explore **/pattern working But as I do see the Match n of N in the lower right, the cursor never moves in the browse buffer (with S-Down/S-Up) and

Re: vim.org refreshed mockup

2006-11-08 Thread Charles E Campbell Jr
Richard Querin wrote: On 11/7/06, Brian McKee [EMAIL PROTECTED] wrote: It's IE that adds the dark blue I think Brian Yeah. Just checked. It shows a blue background instead of white in IE6. I assume it's just a .png support problem. No, its not IE6; I'm using Mozilla 1.7.12. Gene K

Re: vim.org refreshed mockup

2006-11-08 Thread Charles E Campbell Jr
Dave Land wrote: According to the tool, the contrast between the grey text and the white background is too low, as is the contrast between the green navigation text and its pale yellow background. I don't think that he specifies the background; instead, its whatever your browser has for a

Re: clearing out an appended-to register

2006-11-09 Thread Charles E Campbell Jr
Lev Lvovsky wrote: So I just discovered the wonders of being able to append to named registers - how though, do I then clear them out once I'm done with their contents? Let's assume you're wishing to clear register A: :let @a= will empty it out. Regards, Chip Campbell

Re: When {rhs} contains a space

2006-11-14 Thread Charles E Campbell Jr
A.J.Mechelynck wrote: Charles E Campbell Jr wrote: (and :nohls will clear the highlighting). Alternatively, :set list will show ~s at the end of lines containing spaces, too. :set list will replace tabs by ^I (two screen cells) unless 'listchars' has been set to include a tab

Re: Setting Up Debugging

2006-11-14 Thread Charles E Campbell Jr
Tom Purl wrote: I'm having a problem with netrw, but before I can properly troubleshoot it, I need to fix debugging. What I would basically like to do is use Vim normally (without having a bunch of debug messages pop up) while all of the messages are written to a file. Here's what I have in

Re: using vimball or netrw

2006-11-16 Thread Charles E Campbell Jr
J A G P R E E T wrote: Hi There, I work on windows OS and want to access(read/write) to remote server(UNIX). From the vim site I came to know this is possible, but how to use it is outa my mind. I check the two plugins netrw and vimball; I'm not getting much understanding regarding these

Re: autocmd and netrw

2006-11-16 Thread Charles E Campbell Jr
Ilya Hegai wrote: Hello, I have such line in my .gvimrc autocmd BufEnter * :lcd %:p:h (this is vim tip: http://vim.sourceforge.net/tips/tip.php?tip_id=101) but when I work with remote files via netrw it produces warning every time, 'cause scp copies remote files to /tmp dir Is there any way

Re: Trouble with syntax highlighting in gvim70

2006-11-16 Thread Charles E Campbell Jr
Dudley Fox wrote: Tony, I actually did have it as a colorscheme originally, but I was still calling it from _vimrc. Which lead to the same problem. I checked on my older machine, still using gvim6x, and it has the highlight commands directly in the _vimrc file. Obviously something changed

Re: search and replace multiple lines

2006-11-16 Thread Charles E Campbell Jr
mark wrote: I want too change the order of three lines globally (there are thousands of entries that need reordering) and don't seem to be able to get my head around how to do it with vi. I want to change the order off these three 1=red 2=blue 3=orange into 3=orange 2=blue 1=red Is

Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread Charles E Campbell Jr
Meino Christian Cramer wrote: From: Charles E Campbell Jr [EMAIL PROTECTED] Subject: Re: Commenting out TeX-text line by line in V-mode Date: Thu, 16 Nov 2006 13:34:16 -0500 How about :[range]g/\S/s/^/%/ which means: over the selected range (which may be the visual range), on all lines

Re: yank and put 'over' instead of 'insert'

2006-11-17 Thread Charles E Campbell Jr
Troy Piggins wrote: I use 'R' replace mode when doing, for example, ascii art etc because it allows me to change characters without affecting the layout of the rest of the window/page. But if I want to yank a section using visual or visual block, is there a way to put 'p' that block in without

Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread Charles E Campbell Jr
A.J.Mechelynck wrote: It should be possible (though less obvious) to do it with only a substitute. Let's try: :','s/^.*\S.*$/# \0 i.e. prepend a hash sign and a space wherever we find start-of-line, zero or more of anything, one nonblank, zero or more of anything, end-of-line (in the

Re: Search and delete

2006-11-27 Thread Charles E Campbell Jr
Krzysztof MaJ wrote: VitaM, how to search in the file based on some regex and when it's matched delete the whole line automatically? :g/pattern/d will delete all lines containing the pattern. You may also specify a range: :5,.g/pattern/d I suggest reading up on :help :g because

Re: I look for make all windows (almost) equally high only. I would not equally wide.

2006-11-30 Thread Charles E Campbell Jr
KLEIN Stéphane wrote: I look for make all windows (almost) equally high only. I would not equally wide. There is this feature ? I would not CTRL-W_= because this command make equally high and wide. Here's what I did to find out: :he windows /equal OK, so here's where to look further:

Re: suggestions for ssh under windows

2006-12-01 Thread Charles E Campbell Jr
Charles E Campbell Jr wrote: I have a netrw user using WinXP who wants to use ssh; currently, he doesn't have such an executable. I tend to use cygwin, but that's like asking one to build a home instead of new cabinets for the kitchen. So, where can he get ssh for WinXP? I'm likely to put

Re: Matching JUST the nth occurence of a text in a line

2006-12-01 Thread Charles E Campbell Jr
Peter Hodge wrote: Try: /^.\{-}home.\{-}\zshome for your reference: \{-} makes the '.' match as little as possible \zs makes the search match begin at this point in the pattern To generalize to the n-th occurrence: (put the qty of skipped matches in N)

Re: Inverse Folding?

2006-12-01 Thread Charles E Campbell Jr
Vigil wrote: Because I often want to concentrate on a small section of code in a large script, and because my terminal window is large, I wondered if it was possible to select some text and have all other text, ie. the surrounding text, fade out in colour, or use a darker colour or

Re: Matching JUST the nth occurence of a text in a line

2006-12-01 Thread Charles E Campbell Jr
[EMAIL PROTECTED] wrote: I am puzzled by a slightly more complicated version: how to match a '%' character following the 2nd occurrence of home? /^.\{-}\%(home.\{-1,}\)\{N}home.\{-}\zs% where N is 1 for the 2nd occurrence (N is 2 for the third occurrence, etc). This pattern

Re: if \xe4==\xe4 failes,why?

2006-12-01 Thread Charles E Campbell Jr
mbbill wrote: I met a very strange problem recently, that is when I set the following options: set encoding=utf-8 set ignorecase then the expression: if \xe4==\xe4 fails. I test it using: if \xe4==\xe4 echo test endif but I got nothing output, why ? Try set encoding=utf-8 if \xe4 ==

Re: if \xe4==\xe4 failes,why?

2006-12-01 Thread Charles E Campbell Jr
A.J.Mechelynck wrote: Charles E Campbell Jr wrote: mbbill wrote: I met a very strange problem recently, that is when I set the following options: set encoding=utf-8 set ignorecase then the expression: if \xe4==\xe4 fails. I test it using: if \xe4==\xe4 echo test endif but I got nothing

Re: Matching JUST the nth occurence of a text in a line

2006-12-01 Thread Charles E Campbell Jr
[EMAIL PROTECTED] wrote: On Fri, Dec 01, 2006 at 10:34:14AM -0500, Charles E Campbell Jr wrote: [EMAIL PROTECTED] wrote: I am puzzled by a slightly more complicated version: how to match a '%' character following the 2nd occurrence of home? /^.\{-}\%(home.\{-1

Re: :Nread errors

2006-12-05 Thread Charles E Campbell Jr
striker wrote: My OS is Mac OS X 10.4.8, so yes, it is Unix/Linux based. After I sent my original e-mail, I did think to check where $VIMRUNTIME was located. I removed all instances of anything vim* related. I then attempted the :Nread command and got what I expected... E492: Not an

Re: Manpageviewer problem

2006-12-07 Thread Charles E Campbell Jr
Guido Van Hoecke wrote: Hi, I recently started using Dr.Chips Manpageviewer http://vim.sourceforge.net/scripts/script.php?script_id=489 http://mysite.verizon.net/astronaut/vim/vbafiles/manpageview.vba.gz There's one problem, though. It has problems to display certain characters (in vim as

Re: regexp substitution problem

2006-12-12 Thread Charles E Campbell Jr
Bram Kuijper wrote: I am quite new to vim and just started to use regular expressions to replace certain amounts of text. For example, in the following piece of text I would like to keep only the first column and delete the rest: optimal_value_viability | real| default 0.0

Re: regexp substitution problem

2006-12-12 Thread Charles E Campbell Jr
Bram Kuijper wrote: I am quite new to vim and just started to use regular expressions to replace certain amounts of text. For example, in the following piece of text I ... Whoops! Looks like I removed the first column, but you wanted to keep just the first column. Try :%s/\s*|.*$//

Re: grep and regular expression

2006-12-14 Thread Charles E Campbell Jr
Dan Mergens wrote: Vim does not use strict regular expressions and grep does not use regular expressions for pattern matching. I find this comment about Vim curious. Do you perhaps mean that Vim does not use Perl's regular expressions? Grep also uses regular expressions, BTW, although

Re: grep and regular expression

2006-12-14 Thread Charles E Campbell Jr
Dan Mergens wrote: I would have to defer to the regular expression experts, but VIM does not use the standard regular expressions that work on the command line, in say, Linux. Specifically, in the example cited, '/s' was used for whitespace matching, which is not available in standard

Re: Remember where I left off

2006-12-20 Thread Charles E Campbell Jr
Jason Morehouse wrote: I recall at one point, Vim would remember where I left off in a file, and place me back there when I started. I don't think it's worked since I switch to 7, and don't recall the vimrc setting. Any ideas? Check out tip Restore cursor to file position in previous

Re: Using vim to as a pager for manual pages.

2006-12-29 Thread Charles E Campbell Jr
Zvi Har'El wrote: I am using Linux in a UTF-8 locale, and I have a problem with using less as a pager for manual pages: I cannot search for options, since they use a dash instead of a minus sign, and I don't have an easy way to type the hyphen (I have put some xterm definitions for various

Re: Questions about syntax highlight script.

2007-01-04 Thread Charles E Campbell Jr
[EMAIL PROTECTED] wrote: Hi vimmers, I've got some question when writing my syntax highlight script. Q1. The language requires a ^M character as a keyword. The ^M character is by default highlighted but I want to highlight it to some other color, at least it should be different from ^L and

Re: g?vim and bizarre font request.

2007-01-04 Thread Charles E Campbell Jr
Hugh Sasse wrote: I am interested in exploring Lisp before too long. However, I have a physical problem with the parentheses. You may find rainbow.vim helpful; see http://mysite.verizon.net/astronaut/vim/index.html#RAINBOW It colorizes brackets [] {} () based on nesting level. Regards,

Re: g?vim and bizarre font request.

2007-01-04 Thread Charles E Campbell Jr
Hugh Sasse wrote: I am interested in exploring Lisp before too long. However, I have a physical problem with the parentheses. My nystagmus means that just outside the subitizing range my time to count parentheses increases dramatically. According to wikipedia it should increase at roughly

Re: dictionary fun makes gvim crash

2007-01-04 Thread Charles E Campbell Jr
Kim Schulz wrote: Hi I get gvim to crash every time I try the following: let mynumbers = {0:'zero',1:'one',2:'two',3:'three',4:'four', 5:'five',6:'six',7:'seven',8:'eight',9:'nine'} function mynumbers.convert(number) dict return join(map(split(a:number,'\zs'), 'get(self,

Re: g?vim and bizarre font request.

2007-01-04 Thread Charles E Campbell Jr
Hugh Sasse wrote: On Thu, 4 Jan 2007, Charles E Campbell Jr wrote: Hugh Sasse wrote: I am interested in exploring Lisp before too long. However, I have a physical problem with the parentheses. You may find rainbow.vim helpful; see http://mysite.verizon.net/astronaut/vim

Re: HTML files don't auto indent, everything else does

2007-01-04 Thread Charles E Campbell Jr
thesheep wrote: For some reason the auto-indent features aren't working with HTML source files (and I want them to). I've tried these: :filetype indent on :set autoindent I've also tried all these kinds of things: :set shiftwidth=2 :set softtabstop=2 And then doing 'gg=G' to auto indent.

Re: How to open multiple files in split windows?

2007-01-05 Thread Charles E Campbell Jr
Peng Yu wrote: gvim a b The above command will open a and b. But only one file will be show at one time. How to show them in to split windows? Tim already showed how to open the two files in split windows by modifying the command above. However, if one has already typed gvim a b and then

Re: Find and replace in visual area.

2007-01-08 Thread Charles E Campbell Jr
Silva, Paulo wrote: Greetings, I'm trying to do a replace in a selection. After selecting the area, with v, directional keys, v again (or not - both give the same result). Then I type :%s/\%V20/21/ and I get: E71: Invalid character after \% This works the same with any caracter that I put

Re: % jumping over {} in c-files in the midst of {{{ folds

2007-01-08 Thread Charles E Campbell Jr
Suresh Govindachar wrote: (snip) Enter following text: if(1) { /* --- {{{3 */ } Now try to jump between { using %. Bug: The { in the manual fold-markers interferes with %-jumping. [comments on using the matchit plugin] % is a feature of Vim -- I am not

Re: Find and replace in visual area.

2007-01-09 Thread Charles E Campbell Jr
Silva, Paulo wrote: Nope, that didn't helped much. But no worries, the simple replace when visual is still selected works fine. I gess I'll never know why, but then again it dosen't matter really if I can do it some other way. In that case, you may wish to consider vis.vim -- it allows you

Re: Reformat in visual area - vmap question

2007-01-09 Thread Charles E Campbell Jr
John Cordes wrote: I have *very* little experience writing 'map' commands for my .vimrc (Linux). For some years I've had the following two commands for reformatting with the par utility. reformat paragraph with no arguments: map ** {!}par^M} reformat paragraph with arguments: map *^V

<    1   2   3   4   >