Slightly off-topic: Using IRC freenode #vim

2006-05-30 Thread Peter Hodge
Hi, I'm having trouble using the #vim channel on irc.freenode.net and the Wiki FAQ isn't operational at the moment. I've registered my nick with nickserv but still I join #vim and I don't see any conversation happening, does anyone know if I have left something out? output of /whois toomuchphp:

Trying to use GetLatestVimScripts on Mac OS X

2006-05-30 Thread Peter Hodge
Hi, Just discovered GetLatestVimScripts command, but it doesn't work on my Mac because I don't have the 'wget' tool. Does anyone know where I could get it from? regards, Peter regards, Peter On Yahoo!7 Dating: It's free

Re: Goto file under cursor with line number

2006-06-02 Thread Peter Hodge
Hi, I should probably add this to vim.org as a Plugin or something at some stage. Drop all this stuff in your .vimrc and then 'gf' will jump to the file + line number, and 'gsf' will split the window then jump to the file + line number.

Re: syntax match question

2006-06-06 Thread Peter Hodge
Hi, So you want something like: highlight all var options using this match syntax match allVarOptions \%(\s\|^\)\zs-\w\+ highlight the keywords within allVarOptions: note: because '-' is an iskeyword character, you have to use a match instead. syntax match allVarOptionKeywords

When is a syntax file too big?

2006-06-18 Thread Peter Hodge
Hello all, I have recently taken over maintainance of the PHP syntax file which was rather neglected for around 2 years. PHP is growing quite rapidly and unfortunately that means that by now there are well over 1700 keywords which need to be correctly identified, and my next release of the

Re: PHP fold html

2006-06-28 Thread Peter Hodge
Hi, You can achieve this by setting setting foldmethod=marker, which automatically creates folds at all {{{ and }}} pairs. See :help fold-marker for more information. Adding to the syntax file should not be necessary. regards, Peter --- Silent1 [EMAIL PROTECTED] wrote: i added this to

For Vim + PHP users: regarding the PHP syntax

2006-07-03 Thread Peter Hodge
Greetings fellow PHP developers, You may not be aware that as of a month ago, I have taken up maintenance of the PHP syntax file for Vim, and the latest versions can be found here: http://www.vim.org/scripts/script.php?script_id=1571 Version 0.9 (the initial upload) is currently distributed

Re: Modificaton needed to cobol.vim syntax file.

2006-07-04 Thread Peter Hodge
Hi, Does enabling the legacy code option fix the problem? Try: :let cobol_legacy_code = 1 :syntax on and :help cobol ... for more information. regards, Peter --- John R. Culleton [EMAIL PROTECTED] wrote: At present if syntax is on and the filetype is e.g., cbl and the file is a

How do I stop a mapping from looking like a mapping?

2006-07-12 Thread Peter Hodge
Hello all, I want to make a mapping like this: :inoremap foreach foreach() {CR}ESCk$3hi The end result being that when I type: foreach I should get foreach() { } However, if I type anything beginning with 'for', the letters disappear until I type something that is not part of the

Re: How do I stop a mapping from looking like a mapping?

2006-07-12 Thread Peter Hodge
--- Tim Chase [EMAIL PROTECTED] wrote: I want to make a mapping like this: :inoremap foreach foreach() {CR}ESCk$3hi The end result being that when I type: foreach I should get foreach() { } Sounds more like you're reaching for an abbreviation rather than

Re: How do I stop a mapping from looking like a mapping?

2006-07-13 Thread Peter Hodge
Hi Hari, Yakov, Thank you very much for your help! Yakov, thank you for an effective solution, Hari thank you for providing such a flexible way to use it! kind regards, Peter On Yahoo!7 Dating: It's free to join and check

Re: perlcomplete.vim -- anyone working on this?

2006-07-16 Thread Peter Hodge
Hello, I do believe that if you 'set verbose=2' and then 'set isk?' vim will tell you where it was last set. I was having the same problem Saturday night when the ftplugin/php.vim was adding '$' to isk. I found that adding set isk-=$ to ~/.vim/ftplugin/php.vim did *not* work, but adding it to

Re: perlcomplete.vim -- anyone working on this?

2006-07-16 Thread Peter Hodge
PROTECTED] wrote: Oh. Grr, I hate it when plugins go changing the absolute value of your settings. I had a perl_doc.vim ftplugin that was setlocal iskeyword=a-z,A-Z,48-57,:,/,.ing, which must have been being sourced after perl.vim. Thanks, Peter. On Mon, 17 Jul 2006, Peter Hodge wrote: I

Re: Color Question

2006-07-17 Thread Peter Hodge
Hi Ralf, The colorscheme 'morning' has very little Cyan in it - cyan is the default for the 'Identifier' group, which is used for $variables and functions(). Just add something like this to colors/morning.vim: highlight Identifier ctermfg=Red guifg=Red If you want function calls in a

RE: colors

2006-07-18 Thread Peter Hodge
Hi Bill, You do not have to program a new colorscheme. If you run this command: :source $VIMRUNTIME/syntax/hitest.vim ... you will get a window containing all the highlighting colours used by Vim. There's hundreds of colours listed, but there are prossibly only two that you want to change,

Re: :edit {file} question

2006-07-19 Thread Peter Hodge
Hi Malahal, You can use ':S' to open a new File Explorer window or ':E' to open file explorer in the current window. regards, Peter --- [EMAIL PROTECTED] wrote: What is the easiest way to edit a file that is in the same directory as the current file? E.g. I open a file like this: vim

Re: using syntax match two time in one line? fst blocks snd?

2006-07-24 Thread Peter Hodge
Hi Marc, I am assuming that you have output like this: --- | Field1 | Field2 | Field3 | Field4 | ... | --- | Value1 | Value2 | Value3 | Value4 | ... | --- In which

Syntax Feature Request

2006-07-27 Thread Peter Hodge
Hello all, I just want to throw this idea out there as a potential solution to the problems I am having with the PHP syntax. It would be helpful to be able to name sequential 'nextgroups' for regions and matches, so that the syntax will highlight an area using certain groups in specific order.

Re: au! failure in vimrc

2006-07-31 Thread Peter Hodge
Hi Bill, vimrc is read before plugins, so your au! command in .vimrc can't replace the AsNeeded autocommand because AsNeeded hasn't been defined yet. regards, Peter --- Bill McCarthy [EMAIL PROTECTED] wrote: Hello Vim List, Suppose two plugins define autocmds, so after start Vim,

Re: Automatic updating file content

2006-08-01 Thread Peter Hodge
Hi Tien, You can use ':e[dit]' to reload the current file. Perhaps you could set up something with an autocommand based on the CursorHold event and reduce the updatetime to half a second? For example: set updatetime=500 augroup RefreshFile autocmd! autocmd CursorHold somefile.log edit

Re: Sorting columns in a file

2006-08-03 Thread Peter Hodge
Hi Eric, I am assuming you want to re-order the columns horizontally, in which case Visual Block Mode is what you want. Press CTRL+V to start selecting a column, use 'x' to delete it, and 'P' (upper-case P) to paste it (I find upper-case P is more logical for Visual Block paste). HTH, regards,

Re: Smarter Indent (an odd problem)

2006-08-05 Thread Peter Hodge
Hi Yakov, --- Yakov Lerner [EMAIL PROTECTED] wrote: Must be possible using CursorMoves autoevent, except that I don't see in syntax/html.vim how ?php ... ? is handled. Is is indeed in syntax /html.vim ? PHP stuff is in syntax/php.vim which loads html.vim inside it. regards, Peter Send

Re: PCRE? Perl Compatible Regular Expressions?

2006-08-08 Thread Peter Hodge
Hi David, If you begin your pattern with '\v', then every character except [_a-z0-9] becomes 'special'. This allows you to use tokens like '?', '(' and '+' without a backslash. Unfortunately, you can't use '(?:' and friends. Maybe there should be a modifier like '\v' which makes the pattern

Re: can we set vim to use magic=very ??

2006-08-10 Thread Peter Hodge
Hi Martin, Unfortunately, I don't think there's any way to use \v by default for every pattern. It may help to remember that when you have the default 'magic' option set, Vim only recognizes 5 special characters without backslash: ^ $ . * [ (if there is a matching ] to make a

% does not work with ' ( '

2006-08-21 Thread Peter Hodge
Hello, Is there any way to make % jump to the correct parenthesis and ignore a '(' inside a single-quoted string? For example: if('string(string') Pressing % while the cursor is at the end of the line will jump to the wrong '('. Is there any way to fix this? The help page on % does not

Re: % does not work with ' ( ' - never mind

2006-08-22 Thread Peter Hodge
Sorry, disregard last post, % wasn't working because I didn't actually have % in cpoptions yet. --- Peter Hodge [EMAIL PROTECTED] wrote: Hello, Is there any way to make % jump to the correct parenthesis and ignore a '(' inside a single-quoted string? For example: if('string(string

Re: highlight setting overwritten

2006-08-22 Thread Peter Hodge
Hello, Another way to get around this is to add something like this to your _vimrc: augroup MyColors au! au ColorScheme * highlight Comment guifg=Darkgreen au ColorScheme * highlight Identifier guifg=Blue [ ... etc ... ] augroup end execute the commands now in case they aren't

Re: Python Script Execution Support in ViM

2006-08-23 Thread Peter Hodge
Hello Barry, For PHP, I use a command like ':!php %' (or ':!php %' for windows) to run a file through PHP. From there, it's not hard to set up a mapping ':nnoremap F5 :!python %' or a menu command ':nnoremenu Python.Run :!python %', or an auto-command to run the script when it is saved

Re: How to create a plugin that runs after any skeletons are loaded as part of BufNewFile.

2006-08-27 Thread Peter Hodge
Hello, --- Elliot Shank [EMAIL PROTECTED] wrote: What I'm trying to do is create a plugin that acts based upon the contents of an arbitrary file buffer as soon after it has loaded its contents as possible. For existing files, using a BufReadPost autocmd is fine. For new file buffers

Re: cursorline highlight error

2006-08-29 Thread Peter Hodge
Hi Paul, You are doing the same as this: :set highlight - shows contents of 'highlight' option :set cursorline - activates 'cursorline' option ... but in the one command: :set highlight cursorline - shows contents of 'highlight' option and activate 'cursorline' option Just use 'set

again: % does not work with ' ( '

2006-08-29 Thread Peter Hodge
Hello, I don't know what I was smoking last time I posted this question, but it definitely is not working for me now: If I have the following code: if('string(string') and I press % while the cursor is on the last ')', it correctly jumps to the first '('. But, if I change the quotes to

Re: again: % does not work with ' ( '

2006-08-29 Thread Peter Hodge
Sorry, In my example I meant to use if(string(string) and not if('string(string') because double-quotes DO work, single-quotes do not. - Peter --- Peter Hodge [EMAIL PROTECTED] wrote: Hello, I don't know what I was smoking last time I posted this question, but it definitely

Re: Re [2]: again: % does not work with ' ( '

2006-08-30 Thread Peter Hodge
Hey, Thanks for that important clue. It seems the secret to making it work is in the values of the b:match_skip and b:match_words variables. Thank you, this problem has been bugging me for a while. regards, Peter Addendum: It depends on the 'filetype' and possibly on whether %-jumping

Re: unmatched strings

2006-09-02 Thread Peter Hodge
--- Tim Chase [EMAIL PROTECTED] wrote: Is there a way to highlight unmatched strings for and ' in a syntax file? What is an unmatched string? Here's two matches which will find a string that extends to the end of the line: syntax match Error /\%(\\.\|[^]\)*$/ syntax match Error

Re: syntax borked

2006-09-04 Thread Peter Hodge
Hello Jorge, The problem is solved if you change this line: 768 sub reloadlist{ to this: 768 sub reloadlist { It looks as though it is a bug in the perl syntax file. You should send the maintainer an email with your perl code snippet, and he should be able to fix it. It probably never

Re: syntax borked

2006-09-04 Thread Peter Hodge
--- A.J.Mechelynck [EMAIL PROTECTED] wrote: It doesn't. After pasting into an empty buffer via the clipboard, block-deleting the column of numbers (from the left margin up to, but not including, the s in sub at top and the last } at bottom) and setting 'filetype' to perl, I see all

Re: syntax borked

2006-09-05 Thread Peter Hodge
--- Jorge Almeida [EMAIL PROTECTED] wrote: It appears there is a bug in the syntax file (see reply by Peter Hodge). This brings up the question: How to install a syntax file without poluting the distribution system? In gentoo, the file is (for version 6.4): /usr/share/vim/vim64/syntax

Syntax question regarding \%[

2006-09-05 Thread Peter Hodge
Hello all, Given the following text: inte integ intege integer inter interv interva interval is there any easy way to make these two commands work? syntax match Error /int\%[eger]/ syntax match Error /int\%[erval]/ The second match begins taking priority as soon as the

Re: Syntax question regarding \%[

2006-09-06 Thread Peter Hodge
Hello everyone, Thank you for your help ... syn keyword Error inte[ger] inte[rval] Unfortunately I need to use matches because the 'words' contain the '.' character, and I also need to be able to use a look-behind assertion. The thing is, I wanted to be able to write each match so that

Re: Syntax question regarding \%[

2006-09-06 Thread Peter Hodge
Hello, --- A.J.Mechelynck [EMAIL PROTECTED] wrote: So, it matches a part-word. Try adding an end-of-word pattern atom \ before the ending slash (but after the ending bracket) on each line. You wouldn't want session.cookie_nomatch to be matched as far as session.cookie_ would you?

Re: question about syntax highlighting

2006-09-07 Thread Peter Hodge
Hello, --- A.J.Mechelynck [EMAIL PROTECTED] wrote: If you have found a colorscheme which satisfies you almost, but not completely, copy it to ~/.vim/colors/ under a different name (ending in .vim) and modify it there. Then you can set gui=bold for Function or cFunction in your own

+clientserver on Mac OS X

2006-09-07 Thread Peter Hodge
Hello, Is it possible to run the clientserver feature on Mac OS X? I cannot see anywhere in the help that directly states that clientserver only runs on Windows or X11. regards, Peter regards, Peter On Yahoo!7 Answers:

Re: question about syntax highlighting

2006-09-07 Thread Peter Hodge
Hello, Does this actually work for you? IIRC, after colorschemes didn't work for me, so I concluded that :colorscheme foobar is equivalent to :runtime colors/foobar.vim not :runtime! colors/foobar.vim. I'm not quite sure what you mean. 'after' colorschemes had never worked for me

How do I get back the old insert-completion behaviour?

2006-09-11 Thread Peter Hodge
Hello, In Vim 6.2, insert-completion would start when I type CTRL-X or CTRL-N, but it would stop as soon as I used typed another letter or pressed backspace. Now in Vim 7, when I type BS or another character, insert-completion does a 'refresh' to give me the complete list of ... er, completions.

Re: Counts for mapping

2006-09-11 Thread Peter Hodge
--- Benji Fisher [EMAIL PROTECTED] wrote: :nnoremap = @='3l'CR Thank you! I've been trying to figure out how to do that for 2 years. cheers, Peter Do you Yahoo!? Yahoo! Dating: Get busy flirting with your 7-day free

Re: Two problems

2006-09-13 Thread Peter Hodge
Hello, --- Meino Christian Cramer [EMAIL PROTECTED] wrote: 1.) Splitting line into two from normal mode. My current concept (hu...great word...;) to split a line into two is (starting and ending in normal mode, which is wanted): i Ctrl-j esc Are there

Re: Two problems

2006-09-14 Thread Peter Hodge
--- Andrea Spadaccini [EMAIL PROTECTED] wrote: Well.. the vim book is for vim 5.7.. Are there any plans to make a new version for vim 7.x? I would buy it if only it was up-to-date! :) Many of Vim's best features were included in 5.7. It is still a great book to get you from a novice to

Re: find word under cursor

2006-09-16 Thread Peter Hodge
Hello, What * picks up depends on the value of the 'iskeyword' option. It seems as though your value of 'iskeyword' is including '('. Try ':set isk-=('. Also have a look at ':set iskeyword?' and ':help iskeyword'. regards, Peter --- Fabian Braennstroem [EMAIL PROTECTED] wrote: Hi, I

Re: glued Cursor trick anyone ?

2006-09-19 Thread Peter Hodge
--- Meino Christian Cramer [EMAIL PROTECTED] wrote: Hi, I would like to accomplish three tricks: 1.) Suppose you have a source code and have started an new search task recently. With n you are jumping from match to match. Sometimes the next match is right on the last line

Re: Spell and Perl source highlighting

2006-09-28 Thread Peter Hodge
Hello, Finally, when spell check is enabled and syntax highlighting is also enabled, there vim is highlighting some text in a way that the foreground and background colors are the same -- so the text vanishes from view. Maybe the solution is to not have syntax and spell highlighting enabled

Re: Colorschemes Need Updating

2006-10-02 Thread Peter Hodge
Hello, I found no way to change Gvim's default highlighting for these groups. What I found is a mapping of the groups to group names in the setting 'highlight'. I believe you're supposed to change these default mappings in your .vimrc file, but unfortunately your changes will get lost as

BUG? getchar(0) and getchar(1) do not detect ESC

2006-10-03 Thread Peter Hodge
Hello all, I am having trouble with getchar() detecting ESC. If I use getchar(0) or getchar(1), it will not pick up an ESC keystroke. You can replicate this by using the command: :sleep 3 | echo getchar(0) ... and pressing ESC quickly before the getchar() function is called. In GUI Vim, I

Re: Local scope ?

2006-10-03 Thread Peter Hodge
Hello, Hi, when writing a function in vim script sometimes it makes sense to change options of vim. Are these changes local to the function ? No, they persist after the function is ended. As a simple example, you could use a function like the following to toggle the 'number' option.

Re: syntax highlighting not working when loading a session

2006-10-11 Thread Peter Hodge
+ else + let b:fortran_fixed_source = 1 + endif regards, Peter --- Kamaraju Kusumanchi [EMAIL PROTECTED] wrote: On Wednesday 11 October 2006 19:31, Peter Hodge wrote: At any rate, using ':setfiletype fortran' should fix the problem straight away. No. This does not change

Re: syntax highlighting not working when loading a session

2006-10-11 Thread Peter Hodge
Thanks a lot. Your solution works perfectly. One small question. In my previous .vimrc, I had this varible called fortran_free_source. Do I need to worry about it in ~/.vim/ftplugin/fortran.vim or can I just forget about its existence completely? It shouldn't exist any more once you take

Re: Planet Vim

2006-10-12 Thread Peter Hodge
--- Panos Laganakos [EMAIL PROTECTED] wrote: I searched the archives, but didn't find any reference to this. Google can't find it either, so therefore it can't exist. Are there enough people out there users/developers that blog about Vim? Personally I don't think so, but one way is to set up

Re: VimL and Exuberant tags - Suggestions please

2006-10-12 Thread Peter Hodge
Hello David, Can I suggest support for these commands: :set/setlocal/setglobal :syntax :highlight (and maybe :HiLink because it is so commonly used) Some examples: set foldmethod=syntax setlocal formatoptions+=roq setglobal completeopt-=preview syntax keyword phpFunction ...

Re: cursor moves back with ESC

2006-10-16 Thread Peter Hodge
--- Yakov Lerner [EMAIL PROTECTED] wrote: On 10/16/06, Lev Lvovsky [EMAIL PROTECTED] wrote: Hello, 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

Re: substitude, write and close with one command

2006-10-16 Thread Peter Hodge
--- Tomas Lovetinsky [EMAIL PROTECTED] wrote: Hi, I would like to ask you for help with my problem. I think it is simple but in fact I'm not able to find the solution as quickly as I need. I need to do sometink like :s/a/b/g :wq It means to substitute, write and close file. Hello, You

Re: replace using variable

2006-10-16 Thread Peter Hodge
--- Akbar [EMAIL PROTECTED] wrote: Hi, I have these words: p1. I am good/p p2. You sucks!/p p3. Take that, moron/p I want to change those sentences into: p id=11. I am good/p p id=22. You sucks!/p p id=33. Take that, moron/p How do I do that using vim replace command? All I can

Re: How to find a file.

2006-10-17 Thread Peter Hodge
--- Zheng Da [EMAIL PROTECTED] wrote: Hello. I want to open a file, and I know its name, but don't know the path. I want to use the command find. For example I want to open the file space.cc, and use the command :find space.cc. I know the file may be in the current directory, or the

Re: Contextual 'iskeyword'?

2006-10-17 Thread Peter Hodge
--- Benji Fisher [EMAIL PROTECTED] wrote: On Tue, Oct 17, 2006 at 05:43:08AM -0500, Tim Chase wrote: In some text, I've got compound words separated by a single hyphen. For convenience of yanking, I've added the hyphen to my iskeyword setting which works nicely for the most part.

Re: Mapping doesn't work in putty.

2006-10-18 Thread Peter Hodge
Perhaps you could use: map [ctrl-v][ctrl-left] :tabpCR map [ctrl-v][ctrl-right] :tabnCR Except instead of typing 'ctrl-v' and 'ctrl-left' literally, you type those combinations instead. This will map the exact escape sequences that your terminal is sending. regards, Peter --- J A G P R

Re: Fighting with comments

2006-10-18 Thread Peter Hodge
--- Gary Johnson [EMAIL PROTECTED] wrote: On 2006-10-18, eric1235711 [EMAIL PROTECTED] wrote: Yakov Lerner-3 wrote: On 10/18/06, eric1235711 [EMAIL PROTECTED] wrote: Hello I´m PHP programmer and I started programming in gVim last weak, and I´m liking it very much

BUG: formatoptions+=t makes comments wrap (incorrectly) when they shouldn't

2006-10-18 Thread Peter Hodge
Hello, When I have formatoptions=t, it makes comment lines wrap when they shouldn't, and it also ignores whatever comment leader is defined in 'comments'. To reproduce: :set formatoptions=roc :set comments=b:% :set textwidth=30 % type these lines of text % as one line, and notice

Re: Match something that not in the pattern

2006-10-18 Thread Peter Hodge
--- Peng Yu [EMAIL PROTECTED] 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. [EMAIL PROTECTED] is the look-ahead assersion, you

Re: What's the exact meaning of the set 'background'?

2006-10-18 Thread Peter Hodge
Hello, If you change the background=light, Vim reloads the colorscheme so it has a chance to give you new colors. But if the colorscheme changes background=dark again, then Vim knows that the colorscheme isn't capable of picking colors for a light background. In that case, Vim will just ignore

Spam on vim.org

2006-10-22 Thread Peter Hodge
Hello, Can the person responsible please remove this spam from vim.org? http://www.vim.org/tips/tip.php?tip_id=1367 regards, Peter Do you Yahoo!? Yahoo!7 Time Capsule - Make your mark and be a part of history

Bold font in OS X GUI?

2006-10-24 Thread Peter Hodge
Hello, I am having trouble with OS X GUI, none of the highlighting is in Bold. Is this a Bug, or does Bold font just not work in the OS X gui? regards, peter On Yahoo!7 Want to make technology work harder for your

Re: Bold font in OS X GUI?

2006-10-25 Thread Peter Hodge
--- A.J.Mechelynck [EMAIL PROTECTED] wrote: Peter Hodge wrote: Hello, I am having trouble with OS X GUI, none of the highlighting is in Bold. Is this a Bug, or does Bold font just not work in the OS X gui? regards, peter It may depend on your 'guifont'. Some font faces

Re: Need to write a language

2006-10-25 Thread Peter Hodge
--- Billy Patton [EMAIL PROTECTED] wrote: I'm in the semiconductor industry. My job is to create data and to run regression tests on that data for the validation of physical layout rules. Skip to bottom for questions, if you don't want to read my ramblings. The current problem is tha

Re: Key mapping on , and . with CTRL

2006-10-27 Thread Peter Hodge
Hello, I think it depends on what your terminal can understand. One way you can find it out is to type ':map ' (using command mode), then press CTRL-V and then the key sequence you want to map. For example, to map CTRL-L you could use ':map CTRL-VCTRL-L'. regards, Peter --- Zhaojun WU

Re: Agonized by auto changed cursor to next line when typing.

2006-11-02 Thread Peter Hodge
--- Shark Wang [EMAIL PROTECTED] wrote: Hi, I was agonized by GVim 7.0, the editor always auto changed my cursor to next line, when I typed with long line ( less than the wrap margin ) or end tag element, such as /table. the following is my vimrc, you could see that I had disabled

Re: vim.org refreshed mockup

2006-11-07 Thread Peter Hodge
--- Ricardo SIGNES [EMAIL PROTECTED] wrote: * Panos Laganakos [EMAIL PROTECTED] [2006-11-07T12:59:57] 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

Re: compile code from within vim

2006-11-26 Thread Peter Hodge
Hello, Probably the most straightforward way to do this in your ~/.vimrc file: nnoremap F3 :call CompileScript()CR function! CompileScript() the name of the current file let fname = expand('%') can't compile unless the file is saved if modified echo printf('Please

Re: I look for php abbreviations configuration script...

2006-11-27 Thread Peter Hodge
Hello, What does a 'php abbreviations configuration script' do? regards, Peter --- KLEIN Stéphane [EMAIL PROTECTED] wrote: Hello, I look for php abbreviations configuration script. There aren't ? Thanks Stephane Send instant messages to your online friends

Re: finding extra { braces

2006-11-30 Thread Peter Hodge
Hello Yakov, One way is to have Vim fold the { } regions. I think this is already set up in the C syntax, so you just need to ':set foldmethod=syntax'. You may also want to ':set foldcolumn=4' (or whatever number works for you). Note how the left side of the display shows you where each fold

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

2006-11-30 Thread Peter Hodge
Hello, 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 regards, Peter --- zzapper [EMAIL PROTECTED] wrote: Hi given a sample text below home home gg home xxx home

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

2006-11-30 Thread Peter Hodge
--- Bill McCarthy [EMAIL PROTECTED] wrote: On Thu 30-Nov-06 9:20pm -0600, 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 One might think

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

2006-11-30 Thread Peter Hodge
--- Bill McCarthy [EMAIL PROTECTED] wrote: On Thu 30-Nov-06 10:24pm -0600, you wrote: --- Bill McCarthy [EMAIL PROTECTED] wrote: On Thu 30-Nov-06 9:20pm -0600, Peter Hodge wrote: Try: /^.\{-}home.\{-}\zshome for your reference: \{-} makes the '.' match

Re: Help with syntax file

2006-12-21 Thread Peter Hodge
Hello, The raw syntax string item is defined so as to skip over a [\]. You just need to remove the 'skip=+\\+' part from this line: syn region dRawString start=+r+ skip=+\\+ end=+[cwd]\=+ [EMAIL PROTECTED] change to syn region dRawString start=+r+ end=+[cwd]\=+ [EMAIL PROTECTED] regards,

Re: Folding to produce a high-level index of code

2007-01-09 Thread Peter Hodge
Hello, Try this script: http://www.vim.org/scripts/script.php?script_id=1623 regards, Peter --- Noah Spurrier [EMAIL PROTECTED] wrote: I have folding set to use expr. I have a foldexpr that identifies lines for functions and classes in PHP. Lines that are part of a function are folded.

Re: Web-based editing [Was :wq vs ZZ]

2007-02-14 Thread Peter Hodge
--- Bram Moolenaar [EMAIL PROTECTED] wrote: Pete Johns wrote: On Tue, 2007-02-13 at 16:07:32 -0700, [EMAIL PROTECTED] sent: (Sorry guys, my web-based editor, which I must use at work becauseof IT paranoia about SMTP, simply will not let me reply at the end rather than beginning of

Re: Optimum syntax file size...

2007-02-19 Thread Peter Hodge
Hello, If it is a C-style syntax where you're matching together lots of { } areas (or if/endif blocks, etc), using regions, then you should provide an option to turn it on/off, because this can be slow on large files (and get out of sync). Thousands of keywords probably isn't an issue, but if

Re: hi Comment guifg=white guibg=black in ~/.vimrc ignored

2007-03-01 Thread Peter Hodge
--- Hugh Sasse [EMAIL PROTECTED] wrote: On Thu, 1 Mar 2007, Alexander Farber wrote: Hello Hugh, On 3/1/07, Hugh Sasse [EMAIL PROTECTED] wrote: Actually I edit .sh, .pl, .c, .h, .java and .as files and like to have similar colors (like inverted comments) everywhere. So probably

Re: Any way to have multiple setfiletype's?

2007-03-08 Thread Peter Hodge
--- Kevin Old [EMAIL PROTECTED] wrote: Hello everyone, I've recently found the new HTML.zip (http://www.vim.org/scripts/script.php?script_id=453) utility and want to use it with my setup. By itself HTML.zip works fine. Thing is, I use HTML::Mason as my template language for Perl and I

Re: Newbee question:Why don't I have the syntax highlighting when editing files like *.sh *.xml,etc?

2007-04-02 Thread Peter Hodge
Hello, Also you can use :set ft? syntax? to see which filetype has been detected, and which syntax has been activated. regards, Peter --- Xi Juanjie [EMAIL PROTECTED] wrote: syntax on should be ok. Please use :version to confirm your vim was compiled with +syntax function and keep

Re: completion menu colors

2007-04-02 Thread Peter Hodge
--- fREW [EMAIL PROTECTED] wrote: Hi all, Is there a way to change the completion menu colors? Change the highlighting options for the Pmenu* highlight groups: :hi Pmenu ctermfg=Cyanctermbg=Blue cterm=None guifg=Cyan guibg=DarkBlue :hi PmenuSel ctermfg=White ctermbg=Blue

Re: case of very slow regex search

2007-04-03 Thread Peter Hodge
--- Yakov Lerner [EMAIL PROTECTED] wrote: I use sometimes the regex that finds paragraphs containing given words w1,w2,... in any order ( I define paragraph as separated by lines, \n\n). I use the pattern like this: (two-word example, w1 and w2, but easily expandable for N words):

Re: Using variables in syntax definitions

2007-04-10 Thread Peter Hodge
Hello, You'll probably need to use 'execute': execute 'syn match myPattern' s:mypattern but again, highlighting won't work for you then. regards, Peter --- Ian Tegebo [EMAIL PROTECTED] wrote: Is doesn't seem possible to store my patterns in variables for use in syntax definitions

Re: wish: collaboration of N vim instances editing same file

2007-04-11 Thread Peter Hodge
Hello Yakov, Couldn't you hook into the FileChangedShell autocmd event and merge the changes into your buffer from there? You can also handle the swap file message with SwapExists event. regards, Peter --- Yakov Lerner [EMAIL PROTECTED] wrote: Hello Bram, Is it possible to add this item to

RE: wish: collaboration of N vim instances editing same file

2007-04-23 Thread Peter Hodge
Hello, Couldn't the 'patch' command do this? E.g., Vim#1 has made some changes to example.c (but not saved them), and Vim#2 makes some different changes and saves them. Vim#1 sees that example.c has changed, and makes a diff between the new example.c and what it originally was, and also makes a

Re: foldmethod=expr very slow

2006-07-24 Thread Peter Hodge
Hi Thore, I've never tried folding like this before, and unfortunately I don't have time to try out this 'optimized' version, but it may work faster for you (I've just replaced the regex matches with stridx and rearranged the code flow): set foldexpr=GetFoldLevel() function! GetFoldLevel()

Re: foldmethod=expr very slow

2006-07-26 Thread Peter Hodge
Hi Thore, You can probably get away with foldmethod=expr in large files by de-activating it in Insert mode. I.e., add this to your after/ftplugin/php.vim: augroup FastFold autocmd! autocmd InsertEnter * if ft == 'php' | setlocal foldmethod=manual | endif autocmd Insertleave * if ft ==

Syntax Feature Request

2006-07-27 Thread Peter Hodge
Hello all, I just want to throw this idea out there as a potential solution to the problems I am having with the PHP syntax. It would be helpful to be able to name sequential 'nextgroups' for regions and matches, so that the syntax will highlight an area using certain groups in specific order.

Re: Problem with completion

2006-08-21 Thread Peter Hodge
Hi Srinath, For now, I am just going to set noignorecase to get around this, but it would be nice if this were fixed. On another note, I would like an option which only ignores case when searching. When doing completion, I have taken the trouble of typing Graph with a capital G, so I don't

Re: indenting weirdness

2006-09-06 Thread Peter Hodge
Hello scott, The 'filetype=' message is what happens when you use ':set filetype=' and don't specify any filetype. If you have 'cindent' turned on, Vim will add an indent after a line ending in a comma (,) and your sample sentence does. Use ':set cindent?' to check if it is turned on. regards,

Fixed: prevent slowness from Insert mode completion

2006-09-13 Thread Peter Hodge
*** *** 3019,3024 --- 3019,3031 p = line + curwin-w_cursor.col; mb_ptr_back(line, p); + /* + * PETER HODGE - if completeopt contains 'stop', then stop + * insert completion when backspace is used + */ + if (vim_strchr(p_cot, 's') != NULL

Re: Fixed: prevent slowness from Insert mode completion

2006-09-13 Thread Peter Hodge
1. The second title above is misleading. Bram uses (after patch nnn) when a patch _depends_ on another, i.e., requires patch nnn to have been applied previously, usually because the later patch fixes a bug introduced by the earlier one. For instance, official patch 7.0.057 is labeled

Re: distributing experimental patches with vim ?

2006-09-14 Thread Peter Hodge
Hello Yakov, If I recall correctly, didn't you write the shell script which automatically patches and installs Vim 7? If so, why not expand on it to allow (optionally) installing unofficial patches from vim.org as well? Maybe a '--with-patch=script_id' argument would work? regards, Peter

  1   2   >